From 7a5ee35b51b3421fc03efbacc1f557054d2404a4 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Mon, 2 Jul 2018 15:16:35 -0700 Subject: [PATCH 001/370] initial commit of generated library --- packages/google-cloud-iot/README.md | 82 + packages/google-cloud-iot/package.json | 44 + .../google/cloud/iot/v1/device_manager.proto | 419 +++++ .../google/cloud/iot/v1/resources.proto | 385 ++++ .../smoke-test/device_manager_smoke_test.js | 92 + packages/google-cloud-iot/src/index.js | 79 + .../src/v1/device_manager_client.js | 1581 +++++++++++++++++ .../src/v1/device_manager_client_config.json | 120 ++ .../google/cloud/iot/v1/doc_device_manager.js | 394 ++++ .../doc/google/cloud/iot/v1/doc_resources.js | 577 ++++++ .../v1/doc/google/iam/v1/doc_iam_policy.js | 93 + .../src/v1/doc/google/iam/v1/doc_policy.js | 162 ++ .../src/v1/doc/google/protobuf/doc_any.js | 131 ++ .../src/v1/doc/google/protobuf/doc_empty.js | 34 + .../v1/doc/google/protobuf/doc_field_mask.js | 230 +++ .../v1/doc/google/protobuf/doc_timestamp.js | 113 ++ .../src/v1/doc/google/rpc/doc_status.js | 92 + packages/google-cloud-iot/src/v1/index.js | 19 + packages/google-cloud-iot/synth.py | 45 + packages/google-cloud-iot/test/gapic-v1.js | 1032 +++++++++++ 20 files changed, 5724 insertions(+) create mode 100644 packages/google-cloud-iot/README.md create mode 100644 packages/google-cloud-iot/package.json create mode 100644 packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto create mode 100644 packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto create mode 100644 packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js create mode 100644 packages/google-cloud-iot/src/index.js create mode 100644 packages/google-cloud-iot/src/v1/device_manager_client.js create mode 100644 packages/google-cloud-iot/src/v1/device_manager_client_config.json create mode 100644 packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js create mode 100644 packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js create mode 100644 packages/google-cloud-iot/src/v1/index.js create mode 100644 packages/google-cloud-iot/synth.py create mode 100644 packages/google-cloud-iot/test/gapic-v1.js diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md new file mode 100644 index 00000000000..70ffd3b3eb2 --- /dev/null +++ b/packages/google-cloud-iot/README.md @@ -0,0 +1,82 @@ +# Node.js Client for Cloud IoT API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning)) + +[Cloud IoT API][Product Documentation]: +Registers and manages IoT (Internet of Things) devices that connect to the +Google Cloud Platform. +- [Client Library Documentation][] +- [Product Documentation][] + +## Quick Start +In order to use this library, you first need to go through the following +steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +3. [Enable the Cloud IoT API.](https://console.cloud.google.com/apis/api/iot) +4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) + +### Installation +``` +$ npm install --save @google-cloud/iot +``` + +### Preview +#### DeviceManagerClient +```js + const iot = require('@google-cloud/iot'); + + var client = iot.DeviceManagerClient({ + // optional auth parameters. + }); + + // Iterate over all elements. + var formattedParent = client.locationPath(projectId, "us-central1"); + + client.listDeviceRegistries({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 formattedParent2 = client.locationPath(projectId, "us-central1"); + + + 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.listDeviceRegistries(nextRequest, options).then(callback); + } + } + client.listDeviceRegistries({parent: formattedParent2}, options) + .then(callback) + .catch(err => { + console.error(err); + }); +``` + +### Next Steps +- Read the [Client Library Documentation][] for Cloud IoT API + to see other available methods on the client. +- Read the [Cloud IoT 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. + +[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/iot +[Product Documentation]: https://cloud.google.com/iot \ No newline at end of file diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json new file mode 100644 index 00000000000..e515575d835 --- /dev/null +++ b/packages/google-cloud-iot/package.json @@ -0,0 +1,44 @@ +{ + "repository": "GoogleCloudPlatform/google-cloud-node", + "name": "@google-cloud/iot", + "version": "0.1.0", + "author": "Google LLC", + "description": "Cloud IoT API client for Node.js", + "main": "src/index.js", + "files": [ + "protos", + "src", + "AUTHORS", + "COPYING" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google iot", + "iot", + "Cloud IoT API" + ], + "dependencies": { + "google-gax": "^0.17.1", + "lodash.merge": "^4.6.0" + }, + "devDependencies": { + "mocha": "^3.2.0", + "through2": "^2.0.3" + }, + "scripts": { + "publish-module": "node ../../scripts/publish.js iot", + "smoke-test": "mocha smoke-test/*.js --timeout 5000", + "test": "mocha test/*.js" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=4.0.0" + } +} diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto new file mode 100644 index 00000000000..dd9f994107e --- /dev/null +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto @@ -0,0 +1,419 @@ +// 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.cloud.iot.v1; + +import "google/api/annotations.proto"; +import "google/cloud/iot/v1/resources.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot"; +option java_multiple_files = true; +option java_outer_classname = "DeviceManagerProto"; +option java_package = "com.google.cloud.iot.v1"; + + +// Internet of things (IoT) service. Allows to manipulate device registry +// instances and the registration of devices (Things) to the cloud. +service DeviceManager { + // Creates a device registry that contains devices. + rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/registries" + body: "device_registry" + }; + } + + // Gets a device registry configuration. + rpc GetDeviceRegistry(GetDeviceRegistryRequest) returns (DeviceRegistry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/registries/*}" + }; + } + + // Updates a device registry configuration. + rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) returns (DeviceRegistry) { + option (google.api.http) = { + patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}" + body: "device_registry" + }; + } + + // Deletes a device registry configuration. + rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/registries/*}" + }; + } + + // Lists device registries. + rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/registries" + }; + } + + // Creates a device in a device registry. + rpc CreateDevice(CreateDeviceRequest) returns (Device) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/registries/*}/devices" + body: "device" + }; + } + + // Gets details about a device. + rpc GetDevice(GetDeviceRequest) returns (Device) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" + } + }; + } + + // Updates a device. + rpc UpdateDevice(UpdateDeviceRequest) returns (Device) { + option (google.api.http) = { + patch: "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}" + body: "device" + additional_bindings { + patch: "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}" + body: "device" + } + }; + } + + // Deletes a device. + rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" + } + }; + } + + // List devices in a device registry. + rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/registries/*}/devices" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/groups/*}/devices" + } + }; + } + + // Modifies the configuration for the device, which is eventually sent from + // the Cloud IoT Core servers. Returns the modified configuration version and + // its metadata. + rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) returns (DeviceConfig) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig" + body: "*" + } + }; + } + + // Lists the last few versions of the device configuration in descending + // order (i.e.: newest first). + rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) returns (ListDeviceConfigVersionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions" + } + }; + } + + // Lists the last few versions of the device state in descending order (i.e.: + // newest first). + rpc ListDeviceStates(ListDeviceStatesRequest) returns (ListDeviceStatesResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states" + } + }; + } + + // Sets the access control policy on the specified resource. Replaces any + // existing policy. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy" + body: "*" + } + }; + } + + // Gets the access control policy for a resource. + // Returns an empty policy if the resource exists and does not have a policy + // set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy" + body: "*" + } + }; + } + + // Returns permissions that a caller has on the specified resource. + // If the resource does not exist, this will return an empty set of + // permissions, not a NOT_FOUND error. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// Request for `CreateDeviceRegistry`. +message CreateDeviceRegistryRequest { + // The project and cloud region where this device registry must be created. + // For example, `projects/example-project/locations/us-central1`. + string parent = 1; + + // The device registry. The field `name` must be empty. The server will + // generate that field from the device registry `id` provided and the + // `parent` field. + DeviceRegistry device_registry = 2; +} + +// Request for `GetDeviceRegistry`. +message GetDeviceRegistryRequest { + // The name of the device registry. For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + string name = 1; +} + +// Request for `DeleteDeviceRegistry`. +message DeleteDeviceRegistryRequest { + // The name of the device registry. For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + string name = 1; +} + +// Request for `UpdateDeviceRegistry`. +message UpdateDeviceRegistryRequest { + // The new values for the device registry. The `id` field must be empty, and + // the `name` field must indicate the path of the resource. For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + DeviceRegistry device_registry = 1; + + // Only updates the `device_registry` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + // Mutable top-level fields: `event_notification_config`, `http_config`, + // `mqtt_config`, and `state_notification_config`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request for `ListDeviceRegistries`. +message ListDeviceRegistriesRequest { + // The project and cloud region path. For example, + // `projects/example-project/locations/us-central1`. + string parent = 1; + + // The maximum number of registries to return in the response. If this value + // is zero, the service will select a default size. A call may return fewer + // objects than requested, but if there is a non-empty `page_token`, it + // indicates that more entries are available. + int32 page_size = 2; + + // The value returned by the last `ListDeviceRegistriesResponse`; indicates + // that this is a continuation of a prior `ListDeviceRegistries` call, and + // that the system should return the next page of data. + string page_token = 3; +} + +// Response for `ListDeviceRegistries`. +message ListDeviceRegistriesResponse { + // The registries that matched the query. + repeated DeviceRegistry device_registries = 1; + + // If not empty, indicates that there may be more registries that match the + // request; this value should be passed in a new + // `ListDeviceRegistriesRequest`. + string next_page_token = 2; +} + +// Request for `CreateDevice`. +message CreateDeviceRequest { + // The name of the device registry where this device should be created. + // For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + string parent = 1; + + // The device registration details. The field `name` must be empty. The server + // will generate that field from the device registry `id` provided and the + // `parent` field. + Device device = 2; +} + +// Request for `GetDevice`. +message GetDeviceRequest { + // The name of the device. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + string name = 1; + + // The fields of the `Device` resource to be returned in the response. If the + // field mask is unset or empty, all fields are returned. + google.protobuf.FieldMask field_mask = 2; +} + +// Request for `UpdateDevice`. +message UpdateDeviceRequest { + // The new values for the device registry. The `id` and `num_id` fields must + // be empty, and the field `name` must specify the name path. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + Device device = 2; + + // Only updates the `device` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + // Mutable top-level fields: `credentials`, `blocked`, and `metadata` + google.protobuf.FieldMask update_mask = 3; +} + +// Request for `DeleteDevice`. +message DeleteDeviceRequest { + // The name of the device. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + string name = 1; +} + +// Request for `ListDevices`. +message ListDevicesRequest { + // The device registry path. Required. For example, + // `projects/my-project/locations/us-central1/registries/my-registry`. + string parent = 1; + + // A list of device numerical ids. If empty, it will ignore this field. This + // field cannot hold more than 10,000 entries. + repeated uint64 device_num_ids = 2; + + // A list of device string identifiers. If empty, it will ignore this field. + // For example, `['device0', 'device12']`. This field cannot hold more than + // 10,000 entries. + repeated string device_ids = 3; + + // The fields of the `Device` resource to be returned in the response. The + // fields `id`, and `num_id` are always returned by default, along with any + // other fields specified. + google.protobuf.FieldMask field_mask = 4; + + // The maximum number of devices to return in the response. If this value + // is zero, the service will select a default size. A call may return fewer + // objects than requested, but if there is a non-empty `page_token`, it + // indicates that more entries are available. + int32 page_size = 100; + + // The value returned by the last `ListDevicesResponse`; indicates + // that this is a continuation of a prior `ListDevices` call, and + // that the system should return the next page of data. + string page_token = 101; +} + +// Response for `ListDevices`. +message ListDevicesResponse { + // The devices that match the request. + repeated Device devices = 1; + + // If not empty, indicates that there may be more devices that match the + // request; this value should be passed in a new `ListDevicesRequest`. + string next_page_token = 2; +} + +// Request for `ModifyCloudToDeviceConfig`. +message ModifyCloudToDeviceConfigRequest { + // The name of the device. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + string name = 1; + + // The version number to update. If this value is zero, it will not check the + // version number of the server and will always update the current version; + // otherwise, this update will fail if the version number found on the server + // does not match this version number. This is used to support multiple + // simultaneous updates without losing data. + int64 version_to_update = 2; + + // The configuration data for the device. + bytes binary_data = 3; +} + +// Request for `ListDeviceConfigVersions`. +message ListDeviceConfigVersionsRequest { + // The name of the device. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + string name = 1; + + // The number of versions to list. Versions are listed in decreasing order of + // the version number. The maximum number of versions retained is 10. If this + // value is zero, it will return all the versions available. + int32 num_versions = 2; +} + +// Response for `ListDeviceConfigVersions`. +message ListDeviceConfigVersionsResponse { + // The device configuration for the last few versions. Versions are listed + // in decreasing order, starting from the most recent one. + repeated DeviceConfig device_configs = 1; +} + +// Request for `ListDeviceStates`. +message ListDeviceStatesRequest { + // The name of the device. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + string name = 1; + + // The number of states to list. States are listed in descending order of + // update time. The maximum number of states retained is 10. If this + // value is zero, it will return all the states available. + int32 num_states = 2; +} + +// Response for `ListDeviceStates`. +message ListDeviceStatesResponse { + // The last few device states. States are listed in descending order of server + // update time, starting from the most recent one. + repeated DeviceState device_states = 1; +} diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto new file mode 100644 index 00000000000..54294763707 --- /dev/null +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto @@ -0,0 +1,385 @@ +// 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.cloud.iot.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.iot.v1"; + + +// The device resource. +message Device { + // The user-defined device identifier. The device ID must be unique + // within a device registry. + string id = 1; + + // The resource path name. For example, + // `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + // `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + // When `name` is populated as a response from the service, it always ends + // in the device numeric ID. + string name = 2; + + // [Output only] A server-defined unique numeric ID for the device. This is a + // more compact way to identify devices, and it is globally unique. + uint64 num_id = 3; + + // The credentials used to authenticate this device. To allow credential + // rotation without interruption, multiple device credentials can be bound to + // this device. No more than 3 credentials can be bound to a single device at + // a time. When new credentials are added to a device, they are verified + // against the registry credentials. For details, see the description of the + // `DeviceRegistry.credentials` field. + repeated DeviceCredential credentials = 12; + + // [Output only] The last time an MQTT `PINGREQ` was received. This field + // applies only to devices connecting through MQTT. MQTT clients usually only + // send `PINGREQ` messages if the connection is idle, and no other messages + // have been sent. Timestamps are periodically collected and written to + // storage; they may be stale by a few minutes. + google.protobuf.Timestamp last_heartbeat_time = 7; + + // [Output only] The last time a telemetry event was received. Timestamps are + // periodically collected and written to storage; they may be stale by a few + // minutes. + google.protobuf.Timestamp last_event_time = 8; + + // [Output only] The last time a state event was received. Timestamps are + // periodically collected and written to storage; they may be stale by a few + // minutes. + google.protobuf.Timestamp last_state_time = 20; + + // [Output only] The last time a cloud-to-device config version acknowledgment + // was received from the device. This field is only for configurations + // sent through MQTT. + google.protobuf.Timestamp last_config_ack_time = 14; + + // [Output only] The last time a cloud-to-device config version was sent to + // the device. + google.protobuf.Timestamp last_config_send_time = 18; + + // If a device is blocked, connections or requests from this device will fail. + // Can be used to temporarily prevent the device from connecting if, for + // example, the sensor is generating bad data and needs maintenance. + bool blocked = 19; + + // [Output only] The time the most recent error occurred, such as a failure to + // publish to Cloud Pub/Sub. This field is the timestamp of + // 'last_error_status'. + google.protobuf.Timestamp last_error_time = 10; + + // [Output only] The error message of the most recent error, such as a failure + // to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + // field. If no errors have occurred, this field has an empty message + // and the status code 0 == OK. Otherwise, this field is expected to have a + // status code other than OK. + google.rpc.Status last_error_status = 11; + + // The most recent device configuration, which is eventually sent from + // Cloud IoT Core to the device. If not present on creation, the + // configuration will be initialized with an empty payload and version value + // of `1`. To update this field after creation, use the + // `DeviceManager.ModifyCloudToDeviceConfig` method. + DeviceConfig config = 13; + + // [Output only] The state most recently received from the device. If no state + // has been reported, this field is not present. + DeviceState state = 16; + + // The metadata key-value pairs assigned to the device. This metadata is not + // interpreted or indexed by Cloud IoT Core. It can be used to add contextual + // information for the device. + // + // Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + // be less than 128 bytes in length. + // + // Values are free-form strings. Each value must be less than or equal to 32 + // KB in size. + // + // The total size of all keys and values must be less than 256 KB, and the + // maximum number of key-value pairs is 500. + map metadata = 17; +} + +// A container for a group of devices. +message DeviceRegistry { + // The identifier of this device registry. For example, `myRegistry`. + string id = 1; + + // The resource path name. For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + string name = 2; + + // The configuration for notification of telemetry events received from the + // device. All telemetry events that were successfully published by the + // device and acknowledged by Cloud IoT Core are guaranteed to be + // delivered to Cloud Pub/Sub. If multiple configurations match a message, + // only the first matching configuration is used. If you try to publish a + // device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + // for the device's registry, the connection closes automatically. If you try + // to do so using an HTTP connection, an error is returned. Up to 10 + // configurations may be provided. + repeated EventNotificationConfig event_notification_configs = 10; + + // The configuration for notification of new states received from the device. + // State updates are guaranteed to be stored in the state history, but + // notifications to Cloud Pub/Sub are not guaranteed. For example, if + // permissions are misconfigured or the specified topic doesn't exist, no + // notification will be published but the state will still be stored in Cloud + // IoT Core. + StateNotificationConfig state_notification_config = 7; + + // The MQTT configuration for this device registry. + MqttConfig mqtt_config = 4; + + // The DeviceService (HTTP) configuration for this device registry. + HttpConfig http_config = 9; + + // The credentials used to verify the device credentials. No more than 10 + // credentials can be bound to a single registry at a time. The verification + // process occurs at the time of device creation or update. If this field is + // empty, no verification is performed. Otherwise, the credentials of a newly + // created device or added credentials of an updated device should be signed + // with one of these registry credentials. + // + // Note, however, that existing devices will never be affected by + // modifications to this list of credentials: after a device has been + // successfully created in a registry, it should be able to connect even if + // its registry credentials are revoked, deleted, or modified. + repeated RegistryCredential credentials = 8; +} + +// The configuration of MQTT for a device registry. +message MqttConfig { + // If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + // connections to this registry will fail. + MqttState mqtt_enabled_state = 1; +} + +// The configuration of the HTTP bridge for a device registry. +message HttpConfig { + // If enabled, allows devices to use DeviceService via the HTTP protocol. + // Otherwise, any requests to DeviceService will fail for this registry. + HttpState http_enabled_state = 1; +} + +// The configuration for forwarding telemetry events. +message EventNotificationConfig { + // If the subfolder name matches this string exactly, this configuration will + // be used. The string must not include the leading '/' character. If empty, + // all strings are matched. This field is used only for telemetry events; + // subfolders are not supported for state changes. + string subfolder_matches = 2; + + // A Cloud Pub/Sub topic name. For example, + // `projects/myProject/topics/deviceEvents`. + string pubsub_topic_name = 1; +} + +// The configuration for notification of new states received from the device. +message StateNotificationConfig { + // A Cloud Pub/Sub topic name. For example, + // `projects/myProject/topics/deviceEvents`. + string pubsub_topic_name = 1; +} + +// A server-stored registry credential used to validate device credentials. +message RegistryCredential { + // The credential data. Reserved for expansion in the future. + oneof credential { + // A public key certificate used to verify the device credentials. + PublicKeyCertificate public_key_certificate = 1; + } +} + +// Details of an X.509 certificate. For informational purposes only. +message X509CertificateDetails { + // The entity that signed the certificate. + string issuer = 1; + + // The entity the certificate and public key belong to. + string subject = 2; + + // The time the certificate becomes valid. + google.protobuf.Timestamp start_time = 3; + + // The time the certificate becomes invalid. + google.protobuf.Timestamp expiry_time = 4; + + // The algorithm used to sign the certificate. + string signature_algorithm = 5; + + // The type of public key in the certificate. + string public_key_type = 6; +} + +// A public key certificate format and data. +message PublicKeyCertificate { + // The certificate format. + PublicKeyCertificateFormat format = 1; + + // The certificate data. + string certificate = 2; + + // [Output only] The certificate details. Used only for X.509 certificates. + X509CertificateDetails x509_details = 3; +} + +// A server-stored device credential used for authentication. +message DeviceCredential { + // The credential data. Reserved for expansion in the future. + oneof credential { + // A public key used to verify the signature of JSON Web Tokens (JWTs). + // When adding a new device credential, either via device creation or via + // modifications, this public key credential may be required to be signed by + // one of the registry level certificates. More specifically, if the + // registry contains at least one certificate, any new device credential + // must be signed by one of the registry certificates. As a result, + // when the registry contains certificates, only X.509 certificates are + // accepted as device credentials. However, if the registry does + // not contain a certificate, self-signed certificates and public keys will + // be accepted. New device credentials must be different from every + // registry-level certificate. + PublicKeyCredential public_key = 2; + } + + // [Optional] The time at which this credential becomes invalid. This + // credential will be ignored for new client authentication requests after + // this timestamp; however, it will not be automatically deleted. + google.protobuf.Timestamp expiration_time = 6; +} + +// A public key format and data. +message PublicKeyCredential { + // The format of the key. + PublicKeyFormat format = 1; + + // The key data. + string key = 2; +} + +// The device configuration. Eventually delivered to devices. +message DeviceConfig { + // [Output only] The version of this update. The version number is assigned by + // the server, and is always greater than 0 after device creation. The + // version must be 0 on the `CreateDevice` request if a `config` is + // specified; the response of `CreateDevice` will always have a value of 1. + int64 version = 1; + + // [Output only] The time at which this configuration version was updated in + // Cloud IoT Core. This timestamp is set by the server. + google.protobuf.Timestamp cloud_update_time = 2; + + // [Output only] The time at which Cloud IoT Core received the + // acknowledgment from the device, indicating that the device has received + // this configuration version. If this field is not present, the device has + // not yet acknowledged that it received this version. Note that when + // the config was sent to the device, many config versions may have been + // available in Cloud IoT Core while the device was disconnected, and on + // connection, only the latest version is sent to the device. Some + // versions may never be sent to the device, and therefore are never + // acknowledged. This timestamp is set by Cloud IoT Core. + google.protobuf.Timestamp device_ack_time = 3; + + // The device configuration data. + bytes binary_data = 4; +} + +// The device state, as reported by the device. +message DeviceState { + // [Output only] The time at which this state version was updated in Cloud + // IoT Core. + google.protobuf.Timestamp update_time = 1; + + // The device state data. + bytes binary_data = 2; +} + +// Indicates whether an MQTT connection is enabled or disabled. See the field +// description for details. +enum MqttState { + // No MQTT state specified. If not specified, MQTT will be enabled by default. + MQTT_STATE_UNSPECIFIED = 0; + + // Enables a MQTT connection. + MQTT_ENABLED = 1; + + // Disables a MQTT connection. + MQTT_DISABLED = 2; +} + +// Indicates whether DeviceService (HTTP) is enabled or disabled for the +// registry. See the field description for details. +enum HttpState { + // No HTTP state specified. If not specified, DeviceService will be + // enabled by default. + HTTP_STATE_UNSPECIFIED = 0; + + // Enables DeviceService (HTTP) service for the registry. + HTTP_ENABLED = 1; + + // Disables DeviceService (HTTP) service for the registry. + HTTP_DISABLED = 2; +} + +// The supported formats for the public key. +enum PublicKeyCertificateFormat { + // The format has not been specified. This is an invalid default value and + // must not be used. + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; + + // An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), + // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and + // `-----END CERTIFICATE-----`. + X509_CERTIFICATE_PEM = 1; +} + +// The supported formats for the public key. +enum PublicKeyFormat { + // The format has not been specified. This is an invalid default value and + // must not be used. + UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; + + // An RSA public key encoded in base64, and wrapped by + // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be + // used to verify `RS256` signatures in JWT tokens ([RFC7518]( + // https://www.ietf.org/rfc/rfc7518.txt)). + RSA_PEM = 3; + + // As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( + // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + RSA_X509_PEM = 1; + + // Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in + // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END + // PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` + // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is + // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. + ES256_PEM = 2; + + // As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( + // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + ES256_X509_PEM = 4; +} diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js new file mode 100644 index 00000000000..2853e048fc2 --- /dev/null +++ b/packages/google-cloud-iot/smoke-test/device_manager_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('DeviceManagerSmokeTest', () => { + 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 iot = require('../src'); + + var client = new iot.v1.DeviceManagerClient({ + // optional auth parameters. + }); + + // Iterate over all elements. + var formattedParent = client.locationPath(projectId, "us-central1"); + + client.listDeviceRegistries({parent: formattedParent}) + .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 iot = require('../src'); + + var client = new iot.v1.DeviceManagerClient({ + // optional auth parameters. + }); + + // Or obtain the paged response. + var formattedParent = client.locationPath(projectId, "us-central1"); + + + 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.listDeviceRegistries(nextRequest, options).then(callback); + } + } + client.listDeviceRegistries({parent: formattedParent}, options) + .then(callback) + .then(done) + .catch(done); + }); + + it('successfully makes a call to the service using streaming', done => { + const iot = require('../src'); + + var client = new iot.v1.DeviceManagerClient({ + // optional auth parameters. + }); + + var formattedParent = client.locationPath(projectId, "us-central1"); + client.listDeviceRegistriesStream({parent: formattedParent}) + .on('data', element => { + console.log(element); + }) + .on('error', done) + .on('end', done); + }); +}); diff --git a/packages/google-cloud-iot/src/index.js b/packages/google-cloud-iot/src/index.js new file mode 100644 index 00000000000..d53593512c4 --- /dev/null +++ b/packages/google-cloud-iot/src/index.js @@ -0,0 +1,79 @@ +// 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.cloud + */ +/** + * @namespace google.cloud.iot + */ +/** + * @namespace google.cloud.iot.v1 + */ + +'use strict'; + +// Import the clients for each version supported by this package. +const gapic = Object.freeze({ + v1: require('./v1'), +}); + +/** + * The `@google-cloud/iot` package has the following named exports: + * + * - `DeviceManagerClient` - Reference to + * {@link v1.DeviceManagerClient} + * - `v1` - This is used for selecting or pinning a + * particular backend service version. It exports: + * - `DeviceManagerClient` - Reference to + * {@link v1.DeviceManagerClient} + * + * @module {object} @google-cloud/iot + * @alias nodejs-iot + * + * @example Install the client library with npm: + * npm install --save @google-cloud/iot + * + * @example Import the client library: + * const iot = require('@google-cloud/iot'); + * + * @example Create a client that uses Application Default Credentials (ADC): + * const client = new iot.DeviceManagerClient(); + * + * @example Create a client with explicit credentials: + * const client = new iot.DeviceManagerClient({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json', + * }); + */ + +/** + * @type {object} + * @property {constructor} DeviceManagerClient + * Reference to {@link v1.DeviceManagerClient} + */ +module.exports = gapic.v1; + +/** + * @type {object} + * @property {constructor} DeviceManagerClient + * Reference to {@link v1.DeviceManagerClient} + */ +module.exports.v1 = gapic.v1; + +// Alias `module.exports` as `module.exports.default`, for future-proofing. +module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js new file mode 100644 index 00000000000..07039e49abb --- /dev/null +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -0,0 +1,1581 @@ +// 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('./device_manager_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); + +const VERSION = require('../../package.json').version; + +/** + * Internet of things (IoT) service. Allows to manipulate device registry + * instances and the registration of devices (Things) to the cloud. + * + * @class + * @memberof v1 + */ +class DeviceManagerClient { + /** + * Construct an instance of DeviceManagerClient. + * + * @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 = 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}`, + `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/cloud/iot/v1/device_manager.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 = { + locationPathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}' + ), + registryPathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}' + ), + devicePathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' + ), + }; + + // 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 = { + listDeviceRegistries: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'deviceRegistries' + ), + listDevices: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'devices' + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.cloud.iot.v1.DeviceManager', + 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.cloud.iot.v1.DeviceManager. + var deviceManagerStub = gaxGrpc.createStub( + protos.google.cloud.iot.v1.DeviceManager, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var deviceManagerStubMethods = [ + 'createDeviceRegistry', + 'getDeviceRegistry', + 'updateDeviceRegistry', + 'deleteDeviceRegistry', + 'listDeviceRegistries', + 'createDevice', + 'getDevice', + 'updateDevice', + 'deleteDevice', + 'listDevices', + 'modifyCloudToDeviceConfig', + 'listDeviceConfigVersions', + 'listDeviceStates', + 'setIamPolicy', + 'getIamPolicy', + 'testIamPermissions', + ]; + for (let methodName of deviceManagerStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + deviceManagerStub.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 'cloudiot.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/cloudiot', + ]; + } + + /** + * 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 -- + // ------------------- + + /** + * Creates a device registry that contains devices. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @param {Object} request.deviceRegistry + * The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * + * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * var deviceRegistry = {}; + * var request = { + * parent: formattedParent, + * deviceRegistry: deviceRegistry, + * }; + * client.createDeviceRegistry(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createDeviceRegistry(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.createDeviceRegistry(request, options, callback); + } + + /** + * Gets a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * client.getDeviceRegistry({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getDeviceRegistry(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.getDeviceRegistry(request, options, callback); + } + + /** + * Updates a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.deviceRegistry + * The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} + * @param {Object} request.updateMask + * Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * + * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var deviceRegistry = {}; + * var updateMask = {}; + * var request = { + * deviceRegistry: deviceRegistry, + * updateMask: updateMask, + * }; + * client.updateDeviceRegistry(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateDeviceRegistry(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'device_registry.name': request.deviceRegistry.name + }); + + return this._innerApiCalls.updateDeviceRegistry(request, options, callback); + } + + /** + * Deletes a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * client.deleteDeviceRegistry({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteDeviceRegistry(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.deleteDeviceRegistry(request, options, callback); + } + + /** + * Lists device registries. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * + * 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 [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * + * client.listDeviceRegistries({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.locationPath('[PROJECT]', '[LOCATION]'); + * + * + * 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.listDeviceRegistries(nextRequest, options).then(callback); + * } + * } + * client.listDeviceRegistries({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listDeviceRegistries(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.listDeviceRegistries(request, options, callback); + } + + /** + * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * client.listDeviceRegistriesStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listDeviceRegistriesStream(request, options) { + options = options || {}; + + return this._descriptors.page.listDeviceRegistries.createStream( + this._innerApiCalls.listDeviceRegistries, + request, + options + ); + }; + + /** + * Creates a device in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {Object} request.device + * The device registration details. The field `name` must be empty. The server + * will generate that field from the device registry `id` provided and the + * `parent` field. + * + * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [Device]{@link google.cloud.iot.v1.Device}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * var device = {}; + * var request = { + * parent: formattedParent, + * device: device, + * }; + * client.createDevice(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createDevice(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.createDevice(request, options, callback); + } + + /** + * Gets details about a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {Object} [request.fieldMask] + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. + * + * 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 [Device]{@link google.cloud.iot.v1.Device}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * client.getDevice({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getDevice(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.getDevice(request, options, callback); + } + + /** + * Updates a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.device + * The new values for the device registry. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} + * @param {Object} request.updateMask + * Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * + * 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 [Device]{@link google.cloud.iot.v1.Device}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var device = {}; + * var updateMask = {}; + * var request = { + * device: device, + * updateMask: updateMask, + * }; + * client.updateDevice(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateDevice(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'device.name': request.device.name + }); + + return this._innerApiCalls.updateDevice(request, options, callback); + } + + /** + * Deletes a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * client.deleteDevice({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteDevice(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.deleteDevice(request, options, callback); + } + + /** + * List devices in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} [request.deviceNumIds] + * A list of device numerical ids. If empty, it will ignore this field. This + * field cannot hold more than 10,000 entries. + * @param {string[]} [request.deviceIds] + * A list of device string identifiers. If empty, it will ignore this field. + * For example, `['device0', 'device12']`. This field cannot hold more than + * 10,000 entries. + * @param {Object} [request.fieldMask] + * The fields of the `Device` resource to be returned in the response. The + * fields `id`, and `num_id` are always returned by default, along with any + * other fields specified. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * + * 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 [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * + * client.listDevices({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.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * + * + * 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.listDevices(nextRequest, options).then(callback); + * } + * } + * client.listDevices({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listDevices(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.listDevices(request, options, callback); + } + + /** + * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} [request.deviceNumIds] + * A list of device numerical ids. If empty, it will ignore this field. This + * field cannot hold more than 10,000 entries. + * @param {string[]} [request.deviceIds] + * A list of device string identifiers. If empty, it will ignore this field. + * For example, `['device0', 'device12']`. This field cannot hold more than + * 10,000 entries. + * @param {Object} [request.fieldMask] + * The fields of the `Device` resource to be returned in the response. The + * fields `id`, and `num_id` are always returned by default, along with any + * other fields specified. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * client.listDevicesStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listDevicesStream(request, options) { + options = options || {}; + + return this._descriptors.page.listDevices.createStream( + this._innerApiCalls.listDevices, + request, + options + ); + }; + + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {string} request.binaryData + * The configuration data for the device. + * @param {number} [request.versionToUpdate] + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * var binaryData = ''; + * var request = { + * name: formattedName, + * binaryData: binaryData, + * }; + * client.modifyCloudToDeviceConfig(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + modifyCloudToDeviceConfig(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.modifyCloudToDeviceConfig(request, options, callback); + } + + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} [request.numVersions] + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * client.listDeviceConfigVersions({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + listDeviceConfigVersions(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.listDeviceConfigVersions(request, options, callback); + } + + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} [request.numStates] + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * client.listDeviceStates({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + listDeviceStates(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.listDeviceStates(request, options, callback); + } + + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * `resource` is usually specified as a path. For example, a Project + * resource is specified as `projects/{project}`. + * @param {Object} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * + * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * var policy = {}; + * var request = { + * resource: formattedResource, + * policy: policy, + * }; + * client.setIamPolicy(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + setIamPolicy(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'resource': request.resource + }); + + return this._innerApiCalls.setIamPolicy(request, options, callback); + } + + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * `resource` is usually specified as a path. For example, a Project + * resource is specified as `projects/{project}`. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * client.getIamPolicy({resource: formattedResource}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getIamPolicy(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'resource': request.resource + }); + + return this._innerApiCalls.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * `resource` is usually specified as a path. For example, a Project + * resource is specified as `projects/{project}`. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * var client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * var permissions = []; + * var request = { + * resource: formattedResource, + * permissions: permissions, + * }; + * client.testIamPermissions(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + testIamPermissions(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'resource': request.resource + }); + + return this._innerApiCalls.testIamPermissions(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified location resource name string. + * + * @param {String} project + * @param {String} location + * @returns {String} + */ + locationPath(project, location) { + return this._pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Return a fully-qualified registry resource name string. + * + * @param {String} project + * @param {String} location + * @param {String} registry + * @returns {String} + */ + registryPath(project, location, registry) { + return this._pathTemplates.registryPathTemplate.render({ + project: project, + location: location, + registry: registry, + }); + } + + /** + * Return a fully-qualified device resource name string. + * + * @param {String} project + * @param {String} location + * @param {String} registry + * @param {String} device + * @returns {String} + */ + devicePath(project, location, registry, device) { + return this._pathTemplates.devicePathTemplate.render({ + project: project, + location: location, + registry: registry, + device: device, + }); + } + + /** + * Parse the locationName from a location resource. + * + * @param {String} locationName + * A fully-qualified path representing a location resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromLocationName(locationName) { + return this._pathTemplates.locationPathTemplate + .match(locationName) + .project; + } + + /** + * Parse the locationName from a location resource. + * + * @param {String} locationName + * A fully-qualified path representing a location resources. + * @returns {String} - A string representing the location. + */ + matchLocationFromLocationName(locationName) { + return this._pathTemplates.locationPathTemplate + .match(locationName) + .location; + } + + /** + * Parse the registryName from a registry resource. + * + * @param {String} registryName + * A fully-qualified path representing a registry resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromRegistryName(registryName) { + return this._pathTemplates.registryPathTemplate + .match(registryName) + .project; + } + + /** + * Parse the registryName from a registry resource. + * + * @param {String} registryName + * A fully-qualified path representing a registry resources. + * @returns {String} - A string representing the location. + */ + matchLocationFromRegistryName(registryName) { + return this._pathTemplates.registryPathTemplate + .match(registryName) + .location; + } + + /** + * Parse the registryName from a registry resource. + * + * @param {String} registryName + * A fully-qualified path representing a registry resources. + * @returns {String} - A string representing the registry. + */ + matchRegistryFromRegistryName(registryName) { + return this._pathTemplates.registryPathTemplate + .match(registryName) + .registry; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate + .match(deviceName) + .project; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the location. + */ + matchLocationFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate + .match(deviceName) + .location; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the registry. + */ + matchRegistryFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate + .match(deviceName) + .registry; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the device. + */ + matchDeviceFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate + .match(deviceName) + .device; + } +} + + +module.exports = DeviceManagerClient; diff --git a/packages/google-cloud-iot/src/v1/device_manager_client_config.json b/packages/google-cloud-iot/src/v1/device_manager_client_config.json new file mode 100644 index 00000000000..028934968df --- /dev/null +++ b/packages/google-cloud-iot/src/v1/device_manager_client_config.json @@ -0,0 +1,120 @@ +{ + "interfaces": { + "google.cloud.iot.v1.DeviceManager": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [], + "rate_limited_aware": [ + "DEADLINE_EXCEEDED", + "RESOURCE_EXHAUSTED", + "UNAVAILABLE" + ] + }, + "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": 120000 + }, + "rate_limited_aware": { + "initial_retry_delay_millis": 1000, + "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": 120000 + } + }, + "methods": { + "CreateDeviceRegistry": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDeviceRegistry": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateDeviceRegistry": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDeviceRegistry": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDeviceRegistries": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateDevice": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDevice": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateDevice": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDevice": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDevices": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ModifyCloudToDeviceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "rate_limited_aware", + "retry_params_name": "rate_limited_aware" + }, + "ListDeviceConfigVersions": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDeviceStates": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js new file mode 100644 index 00000000000..475ce2767e6 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js @@ -0,0 +1,394 @@ +// 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. + +/** + * Request for `CreateDeviceRegistry`. + * + * @property {string} parent + * The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * + * @property {Object} deviceRegistry + * The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * + * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} + * + * @typedef CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.CreateDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var CreateDeviceRegistryRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `GetDeviceRegistry`. + * + * @property {string} name + * The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * @typedef GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.GetDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var GetDeviceRegistryRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `DeleteDeviceRegistry`. + * + * @property {string} name + * The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * @typedef DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.DeleteDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var DeleteDeviceRegistryRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `UpdateDeviceRegistry`. + * + * @property {Object} deviceRegistry + * The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} + * + * @property {Object} updateMask + * Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.UpdateDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var UpdateDeviceRegistryRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `ListDeviceRegistries`. + * + * @property {string} parent + * The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * + * @property {number} pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested, but if there is a non-empty `page_token`, it + * indicates that more entries are available. + * + * @property {string} pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call, and + * that the system should return the next page of data. + * + * @typedef ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDeviceRegistriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDeviceRegistriesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `ListDeviceRegistries`. + * + * @property {Object[]} deviceRegistries + * The registries that matched the query. + * + * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} + * + * @property {string} nextPageToken + * If not empty, indicates that there may be more registries that match the + * request; this value should be passed in a new + * `ListDeviceRegistriesRequest`. + * + * @typedef ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDeviceRegistriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDeviceRegistriesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `CreateDevice`. + * + * @property {string} parent + * The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * @property {Object} device + * The device registration details. The field `name` must be empty. The server + * will generate that field from the device registry `id` provided and the + * `parent` field. + * + * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} + * + * @typedef CreateDeviceRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.CreateDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var CreateDeviceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `GetDevice`. + * + * @property {string} name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * @property {Object} fieldMask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef GetDeviceRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.GetDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var GetDeviceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `UpdateDevice`. + * + * @property {Object} device + * The new values for the device registry. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} + * + * @property {Object} updateMask + * Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef UpdateDeviceRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.UpdateDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var UpdateDeviceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `DeleteDevice`. + * + * @property {string} name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * @typedef DeleteDeviceRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.DeleteDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var DeleteDeviceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `ListDevices`. + * + * @property {string} parent + * The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * + * @property {number[]} deviceNumIds + * A list of device numerical ids. If empty, it will ignore this field. This + * field cannot hold more than 10,000 entries. + * + * @property {string[]} deviceIds + * A list of device string identifiers. If empty, it will ignore this field. + * For example, `['device0', 'device12']`. This field cannot hold more than + * 10,000 entries. + * + * @property {Object} fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id`, and `num_id` are always returned by default, along with any + * other fields specified. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @property {number} pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested, but if there is a non-empty `page_token`, it + * indicates that more entries are available. + * + * @property {string} pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call, and + * that the system should return the next page of data. + * + * @typedef ListDevicesRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDevicesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDevicesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `ListDevices`. + * + * @property {Object[]} devices + * The devices that match the request. + * + * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} + * + * @property {string} nextPageToken + * If not empty, indicates that there may be more devices that match the + * request; this value should be passed in a new `ListDevicesRequest`. + * + * @typedef ListDevicesResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDevicesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDevicesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `ModifyCloudToDeviceConfig`. + * + * @property {string} name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * @property {number} versionToUpdate + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * + * @property {string} binaryData + * The configuration data for the device. + * + * @typedef ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ModifyCloudToDeviceConfigRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `ListDeviceConfigVersions`. + * + * @property {string} name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * @property {number} numVersions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * + * @typedef ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDeviceConfigVersionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDeviceConfigVersionsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `ListDeviceConfigVersions`. + * + * @property {Object[]} deviceConfigs + * The device configuration for the last few versions. Versions are listed + * in decreasing order, starting from the most recent one. + * + * This object should have the same structure as [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig} + * + * @typedef ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDeviceConfigVersionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDeviceConfigVersionsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `ListDeviceStates`. + * + * @property {string} name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * @property {number} numStates + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * + * @typedef ListDeviceStatesRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDeviceStatesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDeviceStatesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `ListDeviceStates`. + * + * @property {Object[]} deviceStates + * The last few device states. States are listed in descending order of server + * update time, starting from the most recent one. + * + * This object should have the same structure as [DeviceState]{@link google.cloud.iot.v1.DeviceState} + * + * @typedef ListDeviceStatesResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.ListDeviceStatesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +var ListDeviceStatesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js new file mode 100644 index 00000000000..d8146b11785 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js @@ -0,0 +1,577 @@ +// 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 device resource. + * + * @property {string} id + * The user-defined device identifier. The device ID must be unique + * within a device registry. + * + * @property {string} name + * The resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + * + * @property {number} numId + * [Output only] A server-defined unique numeric ID for the device. This is a + * more compact way to identify devices, and it is globally unique. + * + * @property {Object[]} credentials + * The credentials used to authenticate this device. To allow credential + * rotation without interruption, multiple device credentials can be bound to + * this device. No more than 3 credentials can be bound to a single device at + * a time. When new credentials are added to a device, they are verified + * against the registry credentials. For details, see the description of the + * `DeviceRegistry.credentials` field. + * + * This object should have the same structure as [DeviceCredential]{@link google.cloud.iot.v1.DeviceCredential} + * + * @property {Object} lastHeartbeatTime + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} lastEventTime + * [Output only] The last time a telemetry event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} lastStateTime + * [Output only] The last time a state event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} lastConfigAckTime + * [Output only] The last time a cloud-to-device config version acknowledgment + * was received from the device. This field is only for configurations + * sent through MQTT. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} lastConfigSendTime + * [Output only] The last time a cloud-to-device config version was sent to + * the device. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {boolean} blocked + * If a device is blocked, connections or requests from this device will fail. + * Can be used to temporarily prevent the device from connecting if, for + * example, the sensor is generating bad data and needs maintenance. + * + * @property {Object} lastErrorTime + * [Output only] The time the most recent error occurred, such as a failure to + * publish to Cloud Pub/Sub. This field is the timestamp of + * 'last_error_status'. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} lastErrorStatus + * [Output only] The error message of the most recent error, such as a failure + * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + * field. If no errors have occurred, this field has an empty message + * and the status code 0 == OK. Otherwise, this field is expected to have a + * status code other than OK. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * + * @property {Object} config + * The most recent device configuration, which is eventually sent from + * Cloud IoT Core to the device. If not present on creation, the + * configuration will be initialized with an empty payload and version value + * of `1`. To update this field after creation, use the + * `DeviceManager.ModifyCloudToDeviceConfig` method. + * + * This object should have the same structure as [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig} + * + * @property {Object} state + * [Output only] The state most recently received from the device. If no state + * has been reported, this field is not present. + * + * This object should have the same structure as [DeviceState]{@link google.cloud.iot.v1.DeviceState} + * + * @property {Object.} metadata + * The metadata key-value pairs assigned to the device. This metadata is not + * interpreted or indexed by Cloud IoT Core. It can be used to add contextual + * information for the device. + * + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. + * + * Values are free-form strings. Each value must be less than or equal to 32 + * KB in size. + * + * The total size of all keys and values must be less than 256 KB, and the + * maximum number of key-value pairs is 500. + * + * @typedef Device + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.Device definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var Device = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A container for a group of devices. + * + * @property {string} id + * The identifier of this device registry. For example, `myRegistry`. + * + * @property {string} name + * The resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * @property {Object[]} eventNotificationConfigs + * The configuration for notification of telemetry events received from the + * device. All telemetry events that were successfully published by the + * device and acknowledged by Cloud IoT Core are guaranteed to be + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. + * + * This object should have the same structure as [EventNotificationConfig]{@link google.cloud.iot.v1.EventNotificationConfig} + * + * @property {Object} stateNotificationConfig + * The configuration for notification of new states received from the device. + * State updates are guaranteed to be stored in the state history, but + * notifications to Cloud Pub/Sub are not guaranteed. For example, if + * permissions are misconfigured or the specified topic doesn't exist, no + * notification will be published but the state will still be stored in Cloud + * IoT Core. + * + * This object should have the same structure as [StateNotificationConfig]{@link google.cloud.iot.v1.StateNotificationConfig} + * + * @property {Object} mqttConfig + * The MQTT configuration for this device registry. + * + * This object should have the same structure as [MqttConfig]{@link google.cloud.iot.v1.MqttConfig} + * + * @property {Object} httpConfig + * The DeviceService (HTTP) configuration for this device registry. + * + * This object should have the same structure as [HttpConfig]{@link google.cloud.iot.v1.HttpConfig} + * + * @property {Object[]} credentials + * The credentials used to verify the device credentials. No more than 10 + * credentials can be bound to a single registry at a time. The verification + * process occurs at the time of device creation or update. If this field is + * empty, no verification is performed. Otherwise, the credentials of a newly + * created device or added credentials of an updated device should be signed + * with one of these registry credentials. + * + * Note, however, that existing devices will never be affected by + * modifications to this list of credentials: after a device has been + * successfully created in a registry, it should be able to connect even if + * its registry credentials are revoked, deleted, or modified. + * + * This object should have the same structure as [RegistryCredential]{@link google.cloud.iot.v1.RegistryCredential} + * + * @typedef DeviceRegistry + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.DeviceRegistry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var DeviceRegistry = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The configuration of MQTT for a device registry. + * + * @property {number} mqttEnabledState + * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + * connections to this registry will fail. + * + * The number should be among the values of [MqttState]{@link google.cloud.iot.v1.MqttState} + * + * @typedef MqttConfig + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.MqttConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var MqttConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The configuration of the HTTP bridge for a device registry. + * + * @property {number} httpEnabledState + * If enabled, allows devices to use DeviceService via the HTTP protocol. + * Otherwise, any requests to DeviceService will fail for this registry. + * + * The number should be among the values of [HttpState]{@link google.cloud.iot.v1.HttpState} + * + * @typedef HttpConfig + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.HttpConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var HttpConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The configuration for forwarding telemetry events. + * + * @property {string} subfolderMatches + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * @property {string} pubsubTopicName + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * @typedef EventNotificationConfig + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.EventNotificationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var EventNotificationConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The configuration for notification of new states received from the device. + * + * @property {string} pubsubTopicName + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * @typedef StateNotificationConfig + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.StateNotificationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var StateNotificationConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A server-stored registry credential used to validate device credentials. + * + * @property {Object} publicKeyCertificate + * A public key certificate used to verify the device credentials. + * + * This object should have the same structure as [PublicKeyCertificate]{@link google.cloud.iot.v1.PublicKeyCertificate} + * + * @typedef RegistryCredential + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.RegistryCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var RegistryCredential = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Details of an X.509 certificate. For informational purposes only. + * + * @property {string} issuer + * The entity that signed the certificate. + * + * @property {string} subject + * The entity the certificate and public key belong to. + * + * @property {Object} startTime + * The time the certificate becomes valid. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} expiryTime + * The time the certificate becomes invalid. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {string} signatureAlgorithm + * The algorithm used to sign the certificate. + * + * @property {string} publicKeyType + * The type of public key in the certificate. + * + * @typedef X509CertificateDetails + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.X509CertificateDetails definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var X509CertificateDetails = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A public key certificate format and data. + * + * @property {number} format + * The certificate format. + * + * The number should be among the values of [PublicKeyCertificateFormat]{@link google.cloud.iot.v1.PublicKeyCertificateFormat} + * + * @property {string} certificate + * The certificate data. + * + * @property {Object} x509Details + * [Output only] The certificate details. Used only for X.509 certificates. + * + * This object should have the same structure as [X509CertificateDetails]{@link google.cloud.iot.v1.X509CertificateDetails} + * + * @typedef PublicKeyCertificate + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.PublicKeyCertificate definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var PublicKeyCertificate = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A server-stored device credential used for authentication. + * + * @property {Object} publicKey + * A public key used to verify the signature of JSON Web Tokens (JWTs). + * When adding a new device credential, either via device creation or via + * modifications, this public key credential may be required to be signed by + * one of the registry level certificates. More specifically, if the + * registry contains at least one certificate, any new device credential + * must be signed by one of the registry certificates. As a result, + * when the registry contains certificates, only X.509 certificates are + * accepted as device credentials. However, if the registry does + * not contain a certificate, self-signed certificates and public keys will + * be accepted. New device credentials must be different from every + * registry-level certificate. + * + * This object should have the same structure as [PublicKeyCredential]{@link google.cloud.iot.v1.PublicKeyCredential} + * + * @property {Object} expirationTime + * [Optional] The time at which this credential becomes invalid. This + * credential will be ignored for new client authentication requests after + * this timestamp; however, it will not be automatically deleted. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @typedef DeviceCredential + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.DeviceCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var DeviceCredential = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A public key format and data. + * + * @property {number} format + * The format of the key. + * + * The number should be among the values of [PublicKeyFormat]{@link google.cloud.iot.v1.PublicKeyFormat} + * + * @property {string} key + * The key data. + * + * @typedef PublicKeyCredential + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.PublicKeyCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var PublicKeyCredential = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The device configuration. Eventually delivered to devices. + * + * @property {number} version + * [Output only] The version of this update. The version number is assigned by + * the server, and is always greater than 0 after device creation. The + * version must be 0 on the `CreateDevice` request if a `config` is + * specified; the response of `CreateDevice` will always have a value of 1. + * + * @property {Object} cloudUpdateTime + * [Output only] The time at which this configuration version was updated in + * Cloud IoT Core. This timestamp is set by the server. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} deviceAckTime + * [Output only] The time at which Cloud IoT Core received the + * acknowledgment from the device, indicating that the device has received + * this configuration version. If this field is not present, the device has + * not yet acknowledged that it received this version. Note that when + * the config was sent to the device, many config versions may have been + * available in Cloud IoT Core while the device was disconnected, and on + * connection, only the latest version is sent to the device. Some + * versions may never be sent to the device, and therefore are never + * acknowledged. This timestamp is set by Cloud IoT Core. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {string} binaryData + * The device configuration data. + * + * @typedef DeviceConfig + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.DeviceConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var DeviceConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The device state, as reported by the device. + * + * @property {Object} updateTime + * [Output only] The time at which this state version was updated in Cloud + * IoT Core. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {string} binaryData + * The device state data. + * + * @typedef DeviceState + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.DeviceState definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +var DeviceState = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Indicates whether an MQTT connection is enabled or disabled. See the field + * description for details. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +var MqttState = { + + /** + * No MQTT state specified. If not specified, MQTT will be enabled by default. + */ + MQTT_STATE_UNSPECIFIED: 0, + + /** + * Enables a MQTT connection. + */ + MQTT_ENABLED: 1, + + /** + * Disables a MQTT connection. + */ + MQTT_DISABLED: 2 +}; + +/** + * Indicates whether DeviceService (HTTP) is enabled or disabled for the + * registry. See the field description for details. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +var HttpState = { + + /** + * No HTTP state specified. If not specified, DeviceService will be + * enabled by default. + */ + HTTP_STATE_UNSPECIFIED: 0, + + /** + * Enables DeviceService (HTTP) service for the registry. + */ + HTTP_ENABLED: 1, + + /** + * Disables DeviceService (HTTP) service for the registry. + */ + HTTP_DISABLED: 2 +}; + +/** + * The supported formats for the public key. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +var PublicKeyCertificateFormat = { + + /** + * The format has not been specified. This is an invalid default value and + * must not be used. + */ + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT: 0, + + /** + * An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), + * encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and + * `-----END CERTIFICATE-----`. + */ + X509_CERTIFICATE_PEM: 1 +}; + +/** + * The supported formats for the public key. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +var PublicKeyFormat = { + + /** + * The format has not been specified. This is an invalid default value and + * must not be used. + */ + UNSPECIFIED_PUBLIC_KEY_FORMAT: 0, + + /** + * An RSA public key encoded in base64, and wrapped by + * `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be + * used to verify `RS256` signatures in JWT tokens ([RFC7518](https://cloud.google.com + * https://www.ietf.org/rfc/rfc7518.txt)). + */ + RSA_PEM: 3, + + /** + * As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://cloud.google.com + * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + */ + RSA_X509_PEM: 1, + + /** + * Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in + * base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END + * PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` + * algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is + * defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. + */ + ES256_PEM: 2, + + /** + * As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://cloud.google.com + * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + */ + ES256_X509_PEM: 4 +}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js new file mode 100644 index 00000000000..52a719ae88d --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js @@ -0,0 +1,93 @@ +// 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. + +/** + * Request message for `SetIamPolicy` method. + * + * @property {string} resource + * REQUIRED: The resource for which the policy is being specified. + * `resource` is usually specified as a path. For example, a Project + * resource is specified as `projects/{project}`. + * + * @property {Object} policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * + * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} + * + * @typedef SetIamPolicyRequest + * @memberof google.iam.v1 + * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} + */ +var SetIamPolicyRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request message for `GetIamPolicy` method. + * + * @property {string} resource + * REQUIRED: The resource for which the policy is being requested. + * `resource` is usually specified as a path. For example, a Project + * resource is specified as `projects/{project}`. + * + * @typedef GetIamPolicyRequest + * @memberof google.iam.v1 + * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} + */ +var GetIamPolicyRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request message for `TestIamPermissions` method. + * + * @property {string} resource + * REQUIRED: The resource for which the policy detail is being requested. + * `resource` is usually specified as a path. For example, a Project + * resource is specified as `projects/{project}`. + * + * @property {string[]} permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * + * @typedef TestIamPermissionsRequest + * @memberof google.iam.v1 + * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} + */ +var TestIamPermissionsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response message for `TestIamPermissions` method. + * + * @property {string[]} permissions + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + * + * @typedef TestIamPermissionsResponse + * @memberof google.iam.v1 + * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} + */ +var TestIamPermissionsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js new file mode 100644 index 00000000000..0163cf59f58 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -0,0 +1,162 @@ +// 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. + +/** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. + * + * + * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + * `members` to a `role`, where the members can be user accounts, Google groups, + * Google domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. + * + * **Example** + * + * { + * "bindings": [ + * { + * "role": "roles/owner", + * "members": [ + * "user:mike@example.com", + * "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com", + * ] + * }, + * { + * "role": "roles/viewer", + * "members": ["user:sean@example.com"] + * } + * ] + * } + * + * For a description of IAM and its features, see the + * [IAM developer's guide](https://cloud.google.com/iam). + * + * @property {number} version + * Version of the `Policy`. The default version is 0. + * + * @property {Object[]} bindings + * Associates a list of `members` to a `role`. + * Multiple `bindings` must not be specified for the same `role`. + * `bindings` with no members will result in an error. + * + * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} + * + * @property {string} etag + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing + * policy is overwritten blindly. + * + * @typedef Policy + * @memberof google.iam.v1 + * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} + */ +var Policy = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Associates `members` with a `role`. + * + * @property {string} role + * Role that is assigned to `members`. + * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Required + * + * @property {string[]} members + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is + * on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone + * who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google + * account. For example, `alice@gmail.com` or `joe@example.com`. + * + * + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. + * For example, `admins@example.com`. + * + * * `domain:{domain}`: A Google Apps domain name that represents all the + * users of that domain. For example, `google.com` or `example.com`. + * + * @typedef Binding + * @memberof google.iam.v1 + * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} + */ +var Binding = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The difference delta between two policies. + * + * @property {Object[]} bindingDeltas + * The delta for Bindings between two policies. + * + * This object should have the same structure as [BindingDelta]{@link google.iam.v1.BindingDelta} + * + * @typedef PolicyDelta + * @memberof google.iam.v1 + * @see [google.iam.v1.PolicyDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} + */ +var PolicyDelta = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * One delta entry for Binding. Each individual change (only one member in each + * entry) to a binding will be a separate entry. + * + * @property {number} action + * The action that was performed on a Binding. + * Required + * + * The number should be among the values of [Action]{@link google.iam.v1.Action} + * + * @property {string} role + * Role that is assigned to `members`. + * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Required + * + * @property {string} member + * A single identity requesting access for a Cloud Platform resource. + * Follows the same format of Binding.members. + * Required + * + * @typedef BindingDelta + * @memberof google.iam.v1 + * @see [google.iam.v1.BindingDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} + */ +var BindingDelta = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js new file mode 100644 index 00000000000..f55fa17ff12 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js new file mode 100644 index 00000000000..5e3640e90d8 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js new file mode 100644 index 00000000000..c82c2b33949 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js @@ -0,0 +1,230 @@ +// 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. + +/** + * `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-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js new file mode 100644 index 00000000000..a02db52bdeb --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js @@ -0,0 +1,113 @@ +// 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 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). + * + * # 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, 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 + * 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} + */ +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-iot/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js new file mode 100644 index 00000000000..7122f1682e0 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/index.js b/packages/google-cloud-iot/src/v1/index.js new file mode 100644 index 00000000000..10daf7a7145 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/index.js @@ -0,0 +1,19 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 DeviceManagerClient = require('./device_manager_client'); + +module.exports.DeviceManagerClient = DeviceManagerClient; diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py new file mode 100644 index 00000000000..08b4c7cf997 --- /dev/null +++ b/packages/google-cloud-iot/synth.py @@ -0,0 +1,45 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import logging +from pathlib import Path +import subprocess + +logging.basicConfig(level=logging.DEBUG) + +gapic = gcp.GAPICGenerator() + + +library = gapic.node_library( + 'iot', 'v1', + config_path="/google/cloud/iot/" + f"artman_cloudiot.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', 'ci']) +subprocess.run(['npm', 'run', 'prettier']) +subprocess.run(['npm', 'run', 'lint']) + diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js new file mode 100644 index 00000000000..3d536f43607 --- /dev/null +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -0,0 +1,1032 @@ +// 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 assert = require('assert'); + +const iotModule = require('../src'); + +var FAKE_STATUS_CODE = 1; +var error = new Error(); +error.code = FAKE_STATUS_CODE; + +describe('DeviceManagerClient', () => { + describe('createDeviceRegistry', () => { + it('invokes createDeviceRegistry without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + var deviceRegistry = {}; + var request = { + parent: formattedParent, + deviceRegistry: deviceRegistry, + }; + + // Mock response + var id = 'id3355'; + var name = 'name3373707'; + var expectedResponse = { + id: id, + name: name, + }; + + // Mock Grpc layer + client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createDeviceRegistry(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createDeviceRegistry with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + var deviceRegistry = {}; + var request = { + parent: formattedParent, + deviceRegistry: deviceRegistry, + }; + + // Mock Grpc layer + client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createDeviceRegistry(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getDeviceRegistry', () => { + it('invokes getDeviceRegistry without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + name: formattedName, + }; + + // Mock response + var id = 'id3355'; + var name2 = 'name2-1052831874'; + var expectedResponse = { + id: id, + name: name2, + }; + + // Mock Grpc layer + client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getDeviceRegistry(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDeviceRegistry with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getDeviceRegistry(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateDeviceRegistry', () => { + it('invokes updateDeviceRegistry without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var deviceRegistry = {}; + var updateMask = {}; + var request = { + deviceRegistry: deviceRegistry, + updateMask: updateMask, + }; + + // Mock response + var id = 'id3355'; + var name = 'name3373707'; + var expectedResponse = { + id: id, + name: name, + }; + + // Mock Grpc layer + client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateDeviceRegistry(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDeviceRegistry with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var deviceRegistry = {}; + var updateMask = {}; + var request = { + deviceRegistry: deviceRegistry, + updateMask: updateMask, + }; + + // Mock Grpc layer + client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateDeviceRegistry(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteDeviceRegistry', () => { + it('invokes deleteDeviceRegistry without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod(request); + + client.deleteDeviceRegistry(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteDeviceRegistry with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteDeviceRegistry(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listDeviceRegistries', () => { + it('invokes listDeviceRegistries without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + var request = { + parent: formattedParent, + }; + + // Mock response + var nextPageToken = ''; + var deviceRegistriesElement = {}; + var deviceRegistries = [deviceRegistriesElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + deviceRegistries: deviceRegistries, + }; + + // Mock Grpc layer + client._innerApiCalls.listDeviceRegistries = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.deviceRegistries); + }; + + client.listDeviceRegistries(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.deviceRegistries); + done(); + }); + }); + + it('invokes listDeviceRegistries with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + var request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listDeviceRegistries = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listDeviceRegistries(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createDevice', () => { + it('invokes createDevice without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var device = {}; + var request = { + parent: formattedParent, + device: device, + }; + + // Mock response + var id = 'id3355'; + var name = 'name3373707'; + var numId = 1034366860; + var blocked = true; + var expectedResponse = { + id: id, + name: name, + numId: numId, + blocked: blocked, + }; + + // Mock Grpc layer + client._innerApiCalls.createDevice = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createDevice(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createDevice with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var device = {}; + var request = { + parent: formattedParent, + device: device, + }; + + // Mock Grpc layer + client._innerApiCalls.createDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createDevice(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getDevice', () => { + it('invokes getDevice without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock response + var id = 'id3355'; + var name2 = 'name2-1052831874'; + var numId = 1034366860; + var blocked = true; + var expectedResponse = { + id: id, + name: name2, + numId: numId, + blocked: blocked, + }; + + // Mock Grpc layer + client._innerApiCalls.getDevice = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getDevice(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDevice with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getDevice(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateDevice', () => { + it('invokes updateDevice without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var device = {}; + var updateMask = {}; + var request = { + device: device, + updateMask: updateMask, + }; + + // Mock response + var id = 'id3355'; + var name = 'name3373707'; + var numId = 1034366860; + var blocked = true; + var expectedResponse = { + id: id, + name: name, + numId: numId, + blocked: blocked, + }; + + // Mock Grpc layer + client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateDevice(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDevice with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var device = {}; + var updateMask = {}; + var request = { + device: device, + updateMask: updateMask, + }; + + // Mock Grpc layer + client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateDevice(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteDevice', () => { + it('invokes deleteDevice without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod(request); + + client.deleteDevice(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteDevice with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteDevice(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listDevices', () => { + it('invokes listDevices without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + parent: formattedParent, + }; + + // Mock response + var nextPageToken = ''; + var devicesElement = {}; + var devices = [devicesElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + devices: devices, + }; + + // Mock Grpc layer + client._innerApiCalls.listDevices = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.devices); + }; + + client.listDevices(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.devices); + done(); + }); + }); + + it('invokes listDevices with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listDevices = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listDevices(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('modifyCloudToDeviceConfig', () => { + it('invokes modifyCloudToDeviceConfig without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var binaryData = '40'; + var request = { + name: formattedName, + binaryData: binaryData, + }; + + // Mock response + var version = 351608024; + var binaryData2 = '-37'; + var expectedResponse = { + version: version, + binaryData: binaryData2, + }; + + // Mock Grpc layer + client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.modifyCloudToDeviceConfig(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes modifyCloudToDeviceConfig with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var binaryData = '40'; + var request = { + name: formattedName, + binaryData: binaryData, + }; + + // Mock Grpc layer + client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.modifyCloudToDeviceConfig(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listDeviceConfigVersions', () => { + it('invokes listDeviceConfigVersions without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock response + var expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.listDeviceConfigVersions(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listDeviceConfigVersions with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listDeviceConfigVersions(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listDeviceStates', () => { + it('invokes listDeviceStates without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock response + var expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.listDeviceStates(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listDeviceStates with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listDeviceStates(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var policy = {}; + var request = { + resource: formattedResource, + policy: policy, + }; + + // Mock response + var version = 351608024; + var etag = '21'; + var expectedResponse = { + version: version, + etag: etag, + }; + + // Mock Grpc layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.setIamPolicy(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes setIamPolicy with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var policy = {}; + var request = { + resource: formattedResource, + policy: policy, + }; + + // Mock Grpc layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.setIamPolicy(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + resource: formattedResource, + }; + + // Mock response + var version = 351608024; + var etag = '21'; + var expectedResponse = { + version: version, + etag: etag, + }; + + // Mock Grpc layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getIamPolicy(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getIamPolicy with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var request = { + resource: formattedResource, + }; + + // Mock Grpc layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getIamPolicy(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var permissions = []; + var request = { + resource: formattedResource, + permissions: permissions, + }; + + // Mock response + var expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.testIamPermissions(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes testIamPermissions with error', done => { + var client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var permissions = []; + var request = { + resource: formattedResource, + permissions: permissions, + }; + + // Mock Grpc layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.testIamPermissions(request, (err, response) => { + assert(err instanceof Error); + assert.equal(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); + } + }; +} From e84446f0b5679d13c43c79ad9467366812e3b35a Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Mon, 2 Jul 2018 15:36:33 -0700 Subject: [PATCH 002/370] package-setup.js --- packages/google-cloud-iot/CODE_OF_CONDUCT.md | 43 + packages/google-cloud-iot/CONTRIBUTORS | 6 + packages/google-cloud-iot/LICENSE | 202 + packages/google-cloud-iot/README.md | 175 +- packages/google-cloud-iot/package-lock.json | 12774 ++++++++++++++++ packages/google-cloud-iot/package.json | 48 +- .../google-cloud-iot/samples/.eslintrc.yml | 3 + .../google-cloud-iot/samples/quickstart.js | 92 + .../google-cloud-iot/smoke-test/.eslintrc.yml | 6 + .../system-test/.eslintrc.yml | 6 + packages/google-cloud-iot/test/.eslintrc.yml | 5 + 11 files changed, 13266 insertions(+), 94 deletions(-) create mode 100644 packages/google-cloud-iot/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-iot/CONTRIBUTORS create mode 100644 packages/google-cloud-iot/LICENSE create mode 100644 packages/google-cloud-iot/package-lock.json create mode 100644 packages/google-cloud-iot/samples/.eslintrc.yml create mode 100644 packages/google-cloud-iot/samples/quickstart.js create mode 100644 packages/google-cloud-iot/smoke-test/.eslintrc.yml create mode 100644 packages/google-cloud-iot/system-test/.eslintrc.yml create mode 100644 packages/google-cloud-iot/test/.eslintrc.yml diff --git a/packages/google-cloud-iot/CODE_OF_CONDUCT.md b/packages/google-cloud-iot/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-cloud-iot/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-iot/CONTRIBUTORS b/packages/google-cloud-iot/CONTRIBUTORS new file mode 100644 index 00000000000..297ddb26758 --- /dev/null +++ b/packages/google-cloud-iot/CONTRIBUTORS @@ -0,0 +1,6 @@ +# The names of individuals who have contributed to this project. +# +# Names are formatted as: +# name +# +Chris Wilcox diff --git a/packages/google-cloud-iot/LICENSE b/packages/google-cloud-iot/LICENSE new file mode 100644 index 00000000000..7a4a3ea2424 --- /dev/null +++ b/packages/google-cloud-iot/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-iot/README.md b/packages/google-cloud-iot/README.md index 70ffd3b3eb2..43eada3196a 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -1,82 +1,93 @@ -# Node.js Client for Cloud IoT API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning)) - -[Cloud IoT API][Product Documentation]: -Registers and manages IoT (Internet of Things) devices that connect to the -Google Cloud Platform. -- [Client Library Documentation][] -- [Product Documentation][] - -## Quick Start -In order to use this library, you first need to go through the following -steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -3. [Enable the Cloud IoT API.](https://console.cloud.google.com/apis/api/iot) -4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) - -### Installation -``` -$ npm install --save @google-cloud/iot -``` - -### Preview -#### DeviceManagerClient -```js - const iot = require('@google-cloud/iot'); - - var client = iot.DeviceManagerClient({ - // optional auth parameters. - }); - - // Iterate over all elements. - var formattedParent = client.locationPath(projectId, "us-central1"); - - client.listDeviceRegistries({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 formattedParent2 = client.locationPath(projectId, "us-central1"); - - - 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.listDeviceRegistries(nextRequest, options).then(callback); - } - } - client.listDeviceRegistries({parent: formattedParent2}, options) - .then(callback) - .catch(err => { - console.error(err); - }); -``` - -### Next Steps -- Read the [Client Library Documentation][] for Cloud IoT API - to see other available methods on the client. -- Read the [Cloud IoT 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. - -[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/iot -[Product Documentation]: https://cloud.google.com/iot \ No newline at end of file +[//]: # "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 + +# [TBD: Node.js Client](https://github.com/googleapis/nodejs-iot) + +[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-iot.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-iot) +[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-iot?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-iot) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) + +> Node.js idiomatic client for [TBD][product-docs]. + +TBD + + +* [TBD Node.js Client API Reference][client-docs] +* [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) +* [TBD 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) +* [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 TBD 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=TBD +[auth]: https://cloud.google.com/docs/authentication/getting-started + +### Installing the client library + + npm install --save @google-cloud/iot + + + +The [TBD 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 **alpha**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + +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](https://github.com/googleapis/nodejs-iot/blob/master/.github/CONTRIBUTING.md). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest/ +[product-docs]: TBD +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json new file mode 100644 index 00000000000..98a3a22dfc4 --- /dev/null +++ b/packages/google-cloud-iot/package-lock.json @@ -0,0 +1,12774 @@ +{ + "name": "@google-cloud/iot", + "version": "0.1.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.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", + "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", + "semver": "^5.5.0", + "sinon": "4.3.0", + "string": "3.3.3", + "supertest": "3.0.0", + "yargs": "11.0.0", + "yargs-parser": "9.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.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.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.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": { + "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": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "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.6", + "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 + }, + "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.1", + "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.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" + } + }, + "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 + }, + "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.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 + }, + "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.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": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "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.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "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.1" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "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.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "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, + "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 + }, + "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.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "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.0.0" + } + }, + "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.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "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.0.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.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": { + "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.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.2", + "bundled": true, + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + }, + "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.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.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.0" + } + }, + "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.0.0" + } + }, + "merge-source-map": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "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" + } + }, + "mimic-fn": { + "version": "1.1.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 + }, + "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.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", + "bundled": true, + "dev": true, + "requires": { + "remove-trailing-separator": "^1.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.omit": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.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.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.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "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" + } + } + } + }, + "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.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, + "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-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.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 + }, + "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" + } + }, + "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.0", + "os-homedir": "^1.0.1", + "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.0.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.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.1.1", + "bundled": true, + "dev": true, + "requires": { + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" + } + }, + "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.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 + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.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": { + "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": "10.0.3", + "bundled": true, + "dev": true, + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" + }, + "dependencies": { + "cliui": { + "version": "3.2.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "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" + } + } + } + } + } + }, + "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" + } + }, + "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" + } + } + } + }, + "@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/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, + "@types/node": { + "version": "8.10.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", + "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" + }, + "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.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "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=", + "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" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "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" + } + }, + "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 + } + } + } + } + }, + "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.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "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.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", + "dev": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "requires": { + "long": "~3" + }, + "dependencies": { + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + } + } + }, + "caching-transform": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", + "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", + "dev": true, + "requires": { + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "dev": true, + "requires": { + "md5-o-matic": "^0.1.1" + } + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, + "call-matcher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.0.1.tgz", + "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", + "dev": true, + "requires": { + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "call-signature": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", + "integrity": "sha1-qEq8glpV70yysCi9dOIFpluaSZY=" + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "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" + }, + "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 + }, + "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" + } + } + } + }, + "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.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.81.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.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "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.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "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.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.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.10.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", + "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", + "dev": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.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.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": "^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": { + "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 + }, + "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-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.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" + }, + "dependencies": { + "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.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.1.tgz", + "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", + "dev": true, + "requires": { + "fast-diff": "^1.1.1", + "jest-docblock": "^21.0.0" + } + }, + "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-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.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "espurify": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", + "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", + "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.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.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.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", + "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", + "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.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=", + "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.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-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": { + "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.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.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": { + "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 + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "grpc": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", + "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", + "requires": { + "lodash": "^4.17.5", + "nan": "^2.0.0", + "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.0", + "bundled": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "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.10", + "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": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "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.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": { + "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 + }, + "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.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", + "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.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.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.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" + } + }, + "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 + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "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._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.clonedeepwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", + "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", + "dev": true + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "requires": { + "lodash._baseassign": "^3.0.0", + "lodash._basecreate": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" + } + }, + "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.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "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.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "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 + }, + "lolex": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", + "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", + "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.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.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.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "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" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.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": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.6.8", + "diff": "3.2.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.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.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.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "package-hash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz", + "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + } + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-ms": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", + "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "^3.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "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": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "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 + }, + "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" + } + } + } + }, + "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.13.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", + "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", + "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.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", + "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^3.0.32", + "@types/node": "^8.9.4", + "long": "^4.0.0" + } + }, + "proxyquire": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", + "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", + "dev": true, + "requires": { + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.1.7" + } + }, + "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": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "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.2", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.2.tgz", + "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "htmlparser2": "^3.9.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.mergewith": "^4.6.0", + "postcss": "^6.0.14", + "srcset": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + } + }, + "serialize-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", + "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sinon": { + "version": "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.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" + }, + "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 + }, + "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" + } + } + } + }, + "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.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "dev": true, + "requires": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" + }, + "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.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.0.0" + } + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.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.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "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": "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-iot/package.json b/packages/google-cloud-iot/package.json index e515575d835..1aa42367bc8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,9 +1,13 @@ { - "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/iot", + "description": "Cloud IoT API client for Node.js", "version": "0.1.0", + "license": "Apache-2.0", "author": "Google LLC", - "description": "Cloud IoT API client for Node.js", + "engines": { + "node": ">=4.0.0" + }, + "repository": "googleapis/nodejs-iot", "main": "src/index.js", "files": [ "protos", @@ -24,21 +28,41 @@ "iot", "Cloud IoT API" ], + "contributors": [ + "Chris Wilcox " + ], + "scripts": { + "test": "repo-tools test run --cmd npm -- run cover", + "generate-scaffolding": "repo-tools generate all", + "generate-scaffolding-samples": "repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", + "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", + "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --timeout 600000", + "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/ smoke-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 smoke-test/*.js", + "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", + "system-test": "repo-tools test run --cmd mocha -- system-test/*.js smoke-test/*.js --timeout 600000" + }, "dependencies": { "google-gax": "^0.17.1", "lodash.merge": "^4.6.0" }, "devDependencies": { - "mocha": "^3.2.0", + "@google-cloud/nodejs-repo-tools": "^2.3.0", + "async": "^2.6.1", + "codecov": "^3.0.2", + "eslint": "^5.0.1", + "eslint-config-prettier": "^2.9.0", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-prettier": "^2.6.1", + "extend": "^3.0.1", + "ink-docstrap": "^1.3.2", + "intelli-espower-loader": "^1.0.1", + "jsdoc": "^3.5.5", + "mocha": "^3.5.3", + "nyc": "^12.0.2", + "power-assert": "^1.6.0", + "prettier": "^1.13.7", "through2": "^2.0.3" - }, - "scripts": { - "publish-module": "node ../../scripts/publish.js iot", - "smoke-test": "mocha smoke-test/*.js --timeout 5000", - "test": "mocha test/*.js" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=4.0.0" } } diff --git a/packages/google-cloud-iot/samples/.eslintrc.yml b/packages/google-cloud-iot/samples/.eslintrc.yml new file mode 100644 index 00000000000..282535f55f6 --- /dev/null +++ b/packages/google-cloud-iot/samples/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +rules: + no-console: off diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js new file mode 100644 index 00000000000..2853e048fc2 --- /dev/null +++ b/packages/google-cloud-iot/samples/quickstart.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('DeviceManagerSmokeTest', () => { + 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 iot = require('../src'); + + var client = new iot.v1.DeviceManagerClient({ + // optional auth parameters. + }); + + // Iterate over all elements. + var formattedParent = client.locationPath(projectId, "us-central1"); + + client.listDeviceRegistries({parent: formattedParent}) + .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 iot = require('../src'); + + var client = new iot.v1.DeviceManagerClient({ + // optional auth parameters. + }); + + // Or obtain the paged response. + var formattedParent = client.locationPath(projectId, "us-central1"); + + + 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.listDeviceRegistries(nextRequest, options).then(callback); + } + } + client.listDeviceRegistries({parent: formattedParent}, options) + .then(callback) + .then(done) + .catch(done); + }); + + it('successfully makes a call to the service using streaming', done => { + const iot = require('../src'); + + var client = new iot.v1.DeviceManagerClient({ + // optional auth parameters. + }); + + var formattedParent = client.locationPath(projectId, "us-central1"); + client.listDeviceRegistriesStream({parent: formattedParent}) + .on('data', element => { + console.log(element); + }) + .on('error', done) + .on('end', done); + }); +}); diff --git a/packages/google-cloud-iot/smoke-test/.eslintrc.yml b/packages/google-cloud-iot/smoke-test/.eslintrc.yml new file mode 100644 index 00000000000..2e6882e46d2 --- /dev/null +++ b/packages/google-cloud-iot/smoke-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-iot/system-test/.eslintrc.yml b/packages/google-cloud-iot/system-test/.eslintrc.yml new file mode 100644 index 00000000000..2e6882e46d2 --- /dev/null +++ b/packages/google-cloud-iot/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-iot/test/.eslintrc.yml b/packages/google-cloud-iot/test/.eslintrc.yml new file mode 100644 index 00000000000..73f7bbc946f --- /dev/null +++ b/packages/google-cloud-iot/test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off From 55f5e6584a113a0c28beecbf6672bbcd8830cdbd Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 11 Jul 2018 09:32:21 -0700 Subject: [PATCH 003/370] generate scaffolding --- packages/google-cloud-iot/.appveyor.yml | 20 ++ .../google-cloud-iot/.circleci/config.yml | 177 ++++++++++++++++++ .../.circleci/get_workflow_name.py | 67 +++++++ .../google-cloud-iot/.cloud-repo-tools.json | 13 ++ packages/google-cloud-iot/.eslintignore | 3 + packages/google-cloud-iot/.eslintrc.yml | 13 ++ packages/google-cloud-iot/.gitignore | 13 ++ packages/google-cloud-iot/.jsdoc.js | 45 +++++ packages/google-cloud-iot/.nycrc | 26 +++ packages/google-cloud-iot/.prettierignore | 3 + packages/google-cloud-iot/.prettierrc | 8 + packages/google-cloud-iot/README.md | 18 +- 12 files changed, 397 insertions(+), 9 deletions(-) create mode 100644 packages/google-cloud-iot/.appveyor.yml create mode 100644 packages/google-cloud-iot/.circleci/config.yml create mode 100644 packages/google-cloud-iot/.circleci/get_workflow_name.py create mode 100644 packages/google-cloud-iot/.cloud-repo-tools.json create mode 100644 packages/google-cloud-iot/.eslintignore create mode 100644 packages/google-cloud-iot/.eslintrc.yml create mode 100644 packages/google-cloud-iot/.gitignore create mode 100644 packages/google-cloud-iot/.jsdoc.js create mode 100644 packages/google-cloud-iot/.nycrc create mode 100644 packages/google-cloud-iot/.prettierignore create mode 100644 packages/google-cloud-iot/.prettierrc diff --git a/packages/google-cloud-iot/.appveyor.yml b/packages/google-cloud-iot/.appveyor.yml new file mode 100644 index 00000000000..24082152655 --- /dev/null +++ b/packages/google-cloud-iot/.appveyor.yml @@ -0,0 +1,20 @@ +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 diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml new file mode 100644 index 00000000000..cfffc3c8cd4 --- /dev/null +++ b/packages/google-cloud-iot/.circleci/config.yml @@ -0,0 +1,177 @@ +version: 2 +workflows: + version: 2 + tests: + jobs: &workflow_jobs + - node4: + filters: &all_commits + tags: + only: /.*/ + - node6: + filters: *all_commits + - node8: + filters: *all_commits + - node9: + filters: *all_commits + - node10: + filters: *all_commits + - lint: + requires: + - node4 + - node6 + - node8 + - node9 + - node10 + filters: *all_commits + - docs: + requires: + - node4 + - node6 + - node8 + - node9 + - node10 + filters: *all_commits + - system_tests: + requires: + - lint + - docs + filters: + branches: + only: master + tags: &releases + only: '/^v[\d.]+$/' + - publish_npm: + requires: + - system_tests + filters: + branches: + ignore: /.*/ + tags: *releases + nightly: + triggers: + - schedule: + cron: 0 7 * * * + filters: + branches: + only: master + jobs: *workflow_jobs +jobs: + node4: + docker: + - image: 'node:4' + user: node + steps: &unit_tests_steps + - checkout + - run: &remove_package_lock + name: Remove package-lock.json if needed. + command: | + WORKFLOW_NAME=`python .circleci/get_workflow_name.py` + echo "Workflow name: $WORKFLOW_NAME" + if [ "$WORKFLOW_NAME" = "nightly" ]; then + echo "Nightly build detected, removing package-lock.json" + rm -f package-lock.json samples/package-lock.json + else + echo "Not a nightly build, skipping this step." + fi + - run: &npm_install_and_link + name: Install and link the module + command: |- + mkdir -p /home/node/.npm-global + 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' + user: node + steps: *unit_tests_steps + node8: + docker: + - image: 'node:8' + user: node + steps: *unit_tests_steps + node9: + docker: + - image: 'node:9' + user: node + steps: *unit_tests_steps + node10: + docker: + - image: 'node:10' + user: node + steps: *unit_tests_steps + lint: + docker: + - image: 'node:8' + user: node + steps: + - checkout + - run: *remove_package_lock + - run: *npm_install_and_link + - run: &samples_npm_install_and_link + name: Link the module being tested to the samples. + command: | + cd samples/ + npm install + npm link ../ + 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: *remove_package_lock + - run: *npm_install_and_link + - run: + name: Build documentation. + command: npm run docs + system_tests: + docker: + - image: 'node:8' + user: node + steps: + - checkout + - run: *remove_package_lock + - 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: *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: rm .circleci/key.json + when: always + publish_npm: + docker: + - image: 'node:8' + user: node + steps: + - checkout + - run: + name: Set NPM authentication. + command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - run: + name: Publish the module to npm. + command: npm publish --access=public diff --git a/packages/google-cloud-iot/.circleci/get_workflow_name.py b/packages/google-cloud-iot/.circleci/get_workflow_name.py new file mode 100644 index 00000000000..ff6b58fd24f --- /dev/null +++ b/packages/google-cloud-iot/.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) diff --git a/packages/google-cloud-iot/.cloud-repo-tools.json b/packages/google-cloud-iot/.cloud-repo-tools.json new file mode 100644 index 00000000000..7d341be44ec --- /dev/null +++ b/packages/google-cloud-iot/.cloud-repo-tools.json @@ -0,0 +1,13 @@ +{ + "_product": "iot", + "id": "iot", + "name": "Google Cloud IoT", + "short_name": "Cloud IoT", + "docs_url": "https://cloud.google.com/iot/docs/", + "description": "Manages connecting to IoT devices and integrating with Google Cloud Platform", + "api_id": "iot.googleapis.com", + "requiresKeyFile": true, + "requiresProjectId": true, + "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/iot/latest/", + "release_quality": "alpha" +} diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/packages/google-cloud-iot/.eslintignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/packages/google-cloud-iot/.eslintrc.yml b/packages/google-cloud-iot/.eslintrc.yml new file mode 100644 index 00000000000..bed57fbc42c --- /dev/null +++ b/packages/google-cloud-iot/.eslintrc.yml @@ -0,0 +1,13 @@ +--- +extends: + - 'eslint:recommended' + - 'plugin:node/recommended' + - prettier +plugins: + - node + - prettier +rules: + prettier/prettier: error + block-scoped-var: error + eqeqeq: error + no-warning-comments: warn diff --git a/packages/google-cloud-iot/.gitignore b/packages/google-cloud-iot/.gitignore new file mode 100644 index 00000000000..082cf01ed78 --- /dev/null +++ b/packages/google-cloud-iot/.gitignore @@ -0,0 +1,13 @@ +**/*.log +**/node_modules +.coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +google-cloud-logging-winston-*.tgz +google-cloud-logging-bunyan-*.tgz \ No newline at end of file diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js new file mode 100644 index 00000000000..7327b0f586a --- /dev/null +++ b/packages/google-cloud-iot/.jsdoc.js @@ -0,0 +1,45 @@ +/*! + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/ink-docstrap/template', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'src' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2017 Google, Inc.', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/iot', + theme: 'lumen' + } +}; diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc new file mode 100644 index 00000000000..a1a8e6920ce --- /dev/null +++ b/packages/google-cloud-iot/.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-iot/.prettierignore b/packages/google-cloud-iot/.prettierignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/packages/google-cloud-iot/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/packages/google-cloud-iot/.prettierrc b/packages/google-cloud-iot/.prettierrc new file mode 100644 index 00000000000..df6eac07446 --- /dev/null +++ b/packages/google-cloud-iot/.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-iot/README.md b/packages/google-cloud-iot/README.md index 43eada3196a..1e061265a33 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -2,21 +2,21 @@ [//]: # "To regenerate it, use `npm run generate-scaffolding`." Google Cloud Platform logo -# [TBD: Node.js Client](https://github.com/googleapis/nodejs-iot) +# [Google Cloud IoT: Node.js Client](https://github.com/googleapis/nodejs-iot) [![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-iot.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-iot) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-iot?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) -> Node.js idiomatic client for [TBD][product-docs]. +> Node.js idiomatic client for [Cloud IoT][product-docs]. -TBD +Manages connecting to IoT devices and integrating with Google Cloud Platform -* [TBD Node.js Client API Reference][client-docs] +* [Cloud IoT Node.js Client API Reference][client-docs] * [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) -* [TBD Documentation][product-docs] +* [Cloud IoT Documentation][product-docs] Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -45,7 +45,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. [Enable billing][billing] -1. Enable the TBD API. +1. Enable the Google Cloud IoT API. [Enable the API][enable_api] @@ -54,7 +54,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=TBD +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=iot.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started ### Installing the client library @@ -63,7 +63,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. -The [TBD Node.js Client API Reference][client-docs] documentation +The [Cloud IoT Node.js Client API Reference][client-docs] documentation also contains samples. ## Versioning @@ -89,5 +89,5 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest/ -[product-docs]: TBD +[product-docs]: https://cloud.google.com/iot/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png From f86a70e539186eabe9300bc6342c3d19e803ba64 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 11 Jul 2018 09:56:38 -0700 Subject: [PATCH 004/370] add key.json.enc --- packages/google-cloud-iot/.circleci/key.json.enc | Bin 0 -> 2352 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/google-cloud-iot/.circleci/key.json.enc diff --git a/packages/google-cloud-iot/.circleci/key.json.enc b/packages/google-cloud-iot/.circleci/key.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..f3f9dfcb8ca6faaed8862f15bd820e21ee356274 GIT binary patch literal 2352 zcmV-03D5RZVQh3|WM5wedwr3y`0l!#W~%Kz{#yY5z82ija2m=oZV+F4-VeE6=9);M z_{BR=87mXpuxH<-qVs{FU4X=wOH9A;vB^hof{97lrccul`jKmIu{Kn`9?j{Fmnb z!j|Y^hCyO=K>~W?!k%4;wAMpFcX3}E2PCud0FS{K1t`d(;9ulJ;cv>%|L|+N3ROGp z#iUIu!=0vfIYxz2;N5}!zIl*vS;$#R%{D-Di0O(A3aRIj3N{SMKao*_nD`!2r-2={ z7nj-s{+@0Z3(AK^{_sueDx}3C?9wIYpCe*_ol9_}fWB>G8aWAw>dPdR&UA!XJ& zvsWtd;GVP^dD%O5bm-CJtPZ-FbyqO;0K&jQ(S|T_p|#H5C?~us35e!qXjU^*5U!t_ z*{r}mxfQMV6xYr3a4t;2g{62pd1lAQ)~;M9>TS2)WTJb&WQ3cI69zw#XTH{Ga-uVk`2C2 zhC>XZ3`xI&N2kL0L_&W37goe0K*(&U#^f;KBMpg)a%P=ztVX>%erI{qw~$D>4W%sJ zH57a!k{ENuD^B4~WUiik;s}(hAf8D_(Q(~!3g^NEAM>6)gTA1wX$NU<@~Qj(s1w&- zawp`_1Sw^-)~StGP+X399HMllR7+U$` zN~M)+bZ;roLpV5{aM6!q%@z5U#F@Vnkm=?{tEH&Y{a$0GNczFb>-1M1NT>Y&-S^w zX{p^;aU9Q+0-PELoR<`K3BWPNxd_BEV75e|1XmgE!O;)1ZD}`xvfI%%mvX+fU}Bi}t)CpzIzH-2Z-N{KKIa&R3OZSXexlLVNegHxi3fX+{7jRUZ#KjKtadCJt4V;p z9CHzRF3gtN4!y7$9fT}lzLJMlu^YEmC^+k^s~xaCsqV$jaR~_!5!=IDr5|qYQaG8S zJMnPuo{u z4Wz8oK$0?wo(TT#YMGHSP+%i{d`&hV4+bVQflF%9Jq0U&SD^p@N(={cV07QFYNDp7 zJVd!u&V~yTUoA*O$nY_$8fd1(%2(?1XFz9X1|jZNH~D3N2{Ofh-Jdm(6Oi`=`SG;& zyAu?)jX?sKq$G?8#F^sZqKoexvQ+wpiUbsdlc2T2+IjwyyEvAtfXwI|%}V#?l7^<5 zxw~dD&&oOL7ANYrx+*hMBjh>0?sJZ$af?2HLA&6)-riAF1YSfazJ);B1-bhenKz+z zQb(1VleUh@cSqTebANHh_Ul-Up0G^?EfEFuWqDv@l)OcwSiC!q1tueM*O z4$YNVB0*wG5;s*rmjb1+{;|m&)vX&aCkbs`c0>G|`DorLFDrRw$C;v(Y(|T{H{`rK zOhaX_ugQecwatUO(;Fs4$7!oPG4Xn3HN4#(1+3w4%+S*e$3sC{NuXhZW;#1^5H25h zl0DcmAM9nL_Ru)+Keev_mizr-$w3#Rw@_o5dkNKijZ9&r@S#us%BG=3$%&BWs<=Vy z$*m@vQ5YMfCndv=!;E#?b0K8A!AV_JF0*mrEAZmH+=cR%-xHRo5xP2m>XTtYVC-SEaJ# z*Ib%CWJs18;0bJmO9+SD=5d1`AqripUB846^DjmN@>4z#F>rgmFi^Y-h4vM{6jMVlhtVE`sJ=t-?8wBV;JFQf#`(^+vy;yBI46VC-pk%MADEP_s zj;eh_IF!C!u+MQx9A|pqqd~I)k~!jykz|ardcuz{HP$fA^jk|zmBBAf^6Mkp)PnJF W5 Date: Wed, 11 Jul 2018 10:04:09 -0700 Subject: [PATCH 005/370] remove node 4 --- .../google-cloud-iot/.circleci/config.yml | 77 +++++++++++-------- 1 file changed, 47 insertions(+), 30 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index cfffc3c8cd4..a7b4db9d9f1 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.circleci/config.yml @@ -3,46 +3,44 @@ workflows: version: 2 tests: jobs: &workflow_jobs - - node4: + - node6: filters: &all_commits tags: only: /.*/ - - node6: - filters: *all_commits - node8: filters: *all_commits - - node9: - filters: *all_commits - node10: filters: *all_commits - lint: requires: - - node4 - node6 - node8 - - node9 - node10 filters: *all_commits - docs: requires: - - node4 - node6 - node8 - - node9 - node10 filters: *all_commits - system_tests: requires: - lint - docs - filters: + 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: /.*/ @@ -56,9 +54,9 @@ workflows: only: master jobs: *workflow_jobs jobs: - node4: + node6: docker: - - image: 'node:4' + - image: 'node:6' user: node steps: &unit_tests_steps - checkout @@ -68,7 +66,7 @@ jobs: 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" + 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." @@ -78,6 +76,8 @@ 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 - run: @@ -87,21 +87,11 @@ jobs: name: Submit coverage data to codecov. command: node_modules/.bin/codecov when: always - node6: - docker: - - image: 'node:6' - user: node - steps: *unit_tests_steps node8: docker: - image: 'node:8' user: node steps: *unit_tests_steps - node9: - docker: - - image: 'node:9' - user: node - steps: *unit_tests_steps node10: docker: - image: 'node:10' @@ -109,7 +99,7 @@ jobs: steps: *unit_tests_steps lint: docker: - - image: 'node:8' + - image: 'node:10' user: node steps: - checkout @@ -119,8 +109,9 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ + npm link @google-cloud/tasks npm install - npm link ../ + cd .. environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: @@ -130,8 +121,7 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global docs: docker: - - image: 'node:8' - user: node + - image: 'node:10' steps: - checkout - run: *remove_package_lock @@ -139,9 +129,36 @@ jobs: - run: name: Build documentation. command: npm run docs + sample_tests: + docker: + - image: 'node:10' + user: node + steps: + - checkout + - run: *remove_package_lock + - 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: *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/tasks-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: /home/node/tasks-samples/ system_tests: docker: - - image: 'node:8' + - image: 'node:10' user: node steps: - checkout @@ -165,7 +182,7 @@ jobs: when: always publish_npm: docker: - - image: 'node:8' + - image: 'node:10' user: node steps: - checkout @@ -174,4 +191,4 @@ jobs: command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - run: name: Publish the module to npm. - command: npm publish --access=public + command: npm publish From cfa54514198fbd9a97a4c07c44a1ea2b4643dfcf Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 11 Jul 2018 11:20:28 -0700 Subject: [PATCH 006/370] pretty --- .../smoke-test/device_manager_smoke_test.js | 20 +- .../src/v1/device_manager_client.js | 194 +++++++++--------- packages/google-cloud-iot/test/gapic-v1.js | 171 ++++++++++++--- 3 files changed, 255 insertions(+), 130 deletions(-) diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index 2853e048fc2..4a943a4b410 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -16,7 +16,7 @@ describe('DeviceManagerSmokeTest', () => { 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; @@ -28,9 +28,10 @@ describe('DeviceManagerSmokeTest', () => { }); // Iterate over all elements. - var formattedParent = client.locationPath(projectId, "us-central1"); + var formattedParent = client.locationPath(projectId, 'us-central1'); - client.listDeviceRegistries({parent: formattedParent}) + client + .listDeviceRegistries({parent: formattedParent}) .then(responses => { var resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -49,8 +50,7 @@ describe('DeviceManagerSmokeTest', () => { }); // Or obtain the paged response. - var formattedParent = client.locationPath(projectId, "us-central1"); - + var formattedParent = client.locationPath(projectId, 'us-central1'); var options = {autoPaginate: false}; var callback = responses => { @@ -67,8 +67,9 @@ describe('DeviceManagerSmokeTest', () => { // Fetch the next page. return client.listDeviceRegistries(nextRequest, options).then(callback); } - } - client.listDeviceRegistries({parent: formattedParent}, options) + }; + client + .listDeviceRegistries({parent: formattedParent}, options) .then(callback) .then(done) .catch(done); @@ -81,8 +82,9 @@ describe('DeviceManagerSmokeTest', () => { // optional auth parameters. }); - var formattedParent = client.locationPath(projectId, "us-central1"); - client.listDeviceRegistriesStream({parent: formattedParent}) + var formattedParent = client.locationPath(projectId, 'us-central1'); + client + .listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); }) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 07039e49abb..4d7b8655a23 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -277,10 +277,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.createDeviceRegistry(request, options, callback); } @@ -330,10 +331,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.getDeviceRegistry(request, options, callback); } @@ -399,10 +401,11 @@ class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'device_registry.name': request.deviceRegistry.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'device_registry.name': request.deviceRegistry.name, + }); return this._innerApiCalls.updateDeviceRegistry(request, options, callback); } @@ -444,10 +447,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.deleteDeviceRegistry(request, options, callback); } @@ -545,10 +549,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.listDeviceRegistries(request, options, callback); } @@ -607,7 +612,7 @@ class DeviceManagerClient { request, options ); - }; + } /** * Creates a device in a device registry. @@ -666,10 +671,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.createDevice(request, options, callback); } @@ -725,10 +731,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.getDevice(request, options, callback); } @@ -794,10 +801,11 @@ class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'device.name': request.device.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'device.name': request.device.name, + }); return this._innerApiCalls.updateDevice(request, options, callback); } @@ -840,10 +848,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.deleteDevice(request, options, callback); } @@ -954,10 +963,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.listDevices(request, options, callback); } @@ -1029,7 +1039,7 @@ class DeviceManagerClient { request, options ); - }; + } /** * Modifies the configuration for the device, which is eventually sent from @@ -1092,12 +1102,17 @@ class DeviceManagerClient { 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, + }); - return this._innerApiCalls.modifyCloudToDeviceConfig(request, options, callback); + return this._innerApiCalls.modifyCloudToDeviceConfig( + request, + options, + callback + ); } /** @@ -1151,12 +1166,17 @@ class DeviceManagerClient { 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, + }); - return this._innerApiCalls.listDeviceConfigVersions(request, options, callback); + return this._innerApiCalls.listDeviceConfigVersions( + request, + options, + callback + ); } /** @@ -1210,10 +1230,11 @@ class DeviceManagerClient { 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, + }); return this._innerApiCalls.listDeviceStates(request, options, callback); } @@ -1277,10 +1298,11 @@ class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'resource': request.resource - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + resource: request.resource, + }); return this._innerApiCalls.setIamPolicy(request, options, callback); } @@ -1333,10 +1355,11 @@ class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'resource': request.resource - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + resource: request.resource, + }); return this._innerApiCalls.getIamPolicy(request, options, callback); } @@ -1399,10 +1422,11 @@ class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'resource': request.resource - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + resource: request.resource, + }); return this._innerApiCalls.testIamPermissions(request, options, callback); } @@ -1467,9 +1491,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the project. */ matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate - .match(locationName) - .project; + return this._pathTemplates.locationPathTemplate.match(locationName).project; } /** @@ -1480,8 +1502,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the location. */ matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate - .match(locationName) + return this._pathTemplates.locationPathTemplate.match(locationName) .location; } @@ -1493,9 +1514,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the project. */ matchProjectFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate - .match(registryName) - .project; + return this._pathTemplates.registryPathTemplate.match(registryName).project; } /** @@ -1506,8 +1525,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the location. */ matchLocationFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate - .match(registryName) + return this._pathTemplates.registryPathTemplate.match(registryName) .location; } @@ -1519,8 +1537,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the registry. */ matchRegistryFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate - .match(registryName) + return this._pathTemplates.registryPathTemplate.match(registryName) .registry; } @@ -1532,9 +1549,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the project. */ matchProjectFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate - .match(deviceName) - .project; + return this._pathTemplates.devicePathTemplate.match(deviceName).project; } /** @@ -1545,9 +1560,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the location. */ matchLocationFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate - .match(deviceName) - .location; + return this._pathTemplates.devicePathTemplate.match(deviceName).location; } /** @@ -1558,9 +1571,7 @@ class DeviceManagerClient { * @returns {String} - A string representing the registry. */ matchRegistryFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate - .match(deviceName) - .registry; + return this._pathTemplates.devicePathTemplate.match(deviceName).registry; } /** @@ -1571,11 +1582,8 @@ class DeviceManagerClient { * @returns {String} - A string representing the device. */ matchDeviceFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate - .match(deviceName) - .device; + return this._pathTemplates.devicePathTemplate.match(deviceName).device; } } - module.exports = DeviceManagerClient; diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 3d536f43607..b6c8277d338 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -97,7 +97,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedName = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { name: formattedName, }; @@ -130,7 +134,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedName = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { name: formattedName, }; @@ -225,13 +233,19 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedName = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { name: formattedName, }; // Mock Grpc layer - client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod(request); + client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( + request + ); client.deleteDeviceRegistry(request, err => { assert.ifError(err); @@ -246,7 +260,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedName = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { name: formattedName, }; @@ -289,7 +307,11 @@ describe('DeviceManagerClient', () => { }; // Mock Grpc layer - client._innerApiCalls.listDeviceRegistries = (actualRequest, options, callback) => { + client._innerApiCalls.listDeviceRegistries = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.deviceRegistries); }; @@ -337,7 +359,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var device = {}; var request = { parent: formattedParent, @@ -376,7 +402,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var device = {}; var request = { parent: formattedParent, @@ -407,7 +437,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -444,7 +479,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -543,7 +583,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -564,7 +609,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -592,7 +642,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { parent: formattedParent, }; @@ -607,7 +661,11 @@ describe('DeviceManagerClient', () => { }; // Mock Grpc layer - client._innerApiCalls.listDevices = (actualRequest, options, callback) => { + client._innerApiCalls.listDevices = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.devices); }; @@ -626,7 +684,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { parent: formattedParent, }; @@ -655,7 +717,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var binaryData = '40'; var request = { name: formattedName, @@ -690,7 +757,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var binaryData = '40'; var request = { name: formattedName, @@ -721,7 +793,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -749,7 +826,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -778,7 +860,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -806,7 +893,12 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + var formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); var request = { name: formattedName, }; @@ -835,7 +927,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedResource = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var policy = {}; var request = { resource: formattedResource, @@ -870,7 +966,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedResource = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var policy = {}; var request = { resource: formattedResource, @@ -901,7 +1001,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedResource = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { resource: formattedResource, }; @@ -934,7 +1038,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedResource = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var request = { resource: formattedResource, }; @@ -963,7 +1071,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedResource = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var permissions = []; var request = { resource: formattedResource, @@ -993,7 +1105,11 @@ describe('DeviceManagerClient', () => { }); // Mock request - var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + var formattedResource = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); var permissions = []; var request = { resource: formattedResource, @@ -1015,7 +1131,6 @@ describe('DeviceManagerClient', () => { }); }); }); - }); function mockSimpleGrpcMethod(expectedRequest, response, error) { From 25fde1f31327d747f08bd1475985c0ba7f2534b9 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 11 Jul 2018 11:21:51 -0700 Subject: [PATCH 007/370] add placeholder system test so lint does not complain --- packages/google-cloud-iot/system-test/none.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/google-cloud-iot/system-test/none.js diff --git a/packages/google-cloud-iot/system-test/none.js b/packages/google-cloud-iot/system-test/none.js new file mode 100644 index 00000000000..b76b906ac7e --- /dev/null +++ b/packages/google-cloud-iot/system-test/none.js @@ -0,0 +1,19 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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'; + +// This file is here so lint doesn't fail due to no system tests. This +// file can be deleted once we have system tests. + From 7ac589c7cdec28686c4552832fe74aa0c06e3569 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 11 Jul 2018 11:25:41 -0700 Subject: [PATCH 008/370] quiet some linting issues on sample --- .../google-cloud-iot/samples/quickstart.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 2853e048fc2..c549de8d706 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -14,9 +14,11 @@ 'use strict'; +/* global describe, it */ + describe('DeviceManagerSmokeTest', () => { 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; @@ -28,9 +30,10 @@ describe('DeviceManagerSmokeTest', () => { }); // Iterate over all elements. - var formattedParent = client.locationPath(projectId, "us-central1"); + var formattedParent = client.locationPath(projectId, 'us-central1'); - client.listDeviceRegistries({parent: formattedParent}) + client + .listDeviceRegistries({parent: formattedParent}) .then(responses => { var resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -49,8 +52,7 @@ describe('DeviceManagerSmokeTest', () => { }); // Or obtain the paged response. - var formattedParent = client.locationPath(projectId, "us-central1"); - + var formattedParent = client.locationPath(projectId, 'us-central1'); var options = {autoPaginate: false}; var callback = responses => { @@ -67,8 +69,9 @@ describe('DeviceManagerSmokeTest', () => { // Fetch the next page. return client.listDeviceRegistries(nextRequest, options).then(callback); } - } - client.listDeviceRegistries({parent: formattedParent}, options) + }; + client + .listDeviceRegistries({parent: formattedParent}, options) .then(callback) .then(done) .catch(done); @@ -81,8 +84,9 @@ describe('DeviceManagerSmokeTest', () => { // optional auth parameters. }); - var formattedParent = client.locationPath(projectId, "us-central1"); - client.listDeviceRegistriesStream({parent: formattedParent}) + var formattedParent = client.locationPath(projectId, 'us-central1'); + client + .listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); }) From fe848c460fdead88e36afb93b932eb797da5a9dc Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 11 Jul 2018 11:26:00 -0700 Subject: [PATCH 009/370] update synth.py and package lock --- packages/google-cloud-iot/package-lock.json | 244 +++++++++----------- packages/google-cloud-iot/synth.py | 2 +- 2 files changed, 110 insertions(+), 136 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 98a3a22dfc4..e157c0b8369 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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", @@ -2555,12 +2555,6 @@ "pinkie-promise": "^2.0.0" } }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -2590,23 +2584,6 @@ "requires": { "ansi-regex": "^3.0.0" } - }, - "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 - } - } } } }, @@ -3460,23 +3437,6 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.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 - }, - "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" - } - } } }, "chardet": { @@ -3692,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": { @@ -4082,9 +4043,9 @@ } }, "diff": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", - "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "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": { @@ -4424,9 +4385,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", @@ -4436,6 +4397,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", @@ -4443,7 +4405,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", @@ -4579,9 +4541,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", @@ -4598,6 +4560,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", @@ -4694,9 +4662,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" } @@ -5070,9 +5038,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" }, @@ -5721,9 +5689,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": { @@ -5972,9 +5940,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", @@ -6188,7 +6156,7 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.2", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -6197,7 +6165,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" @@ -6480,9 +6448,9 @@ "dev": true }, "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "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": { @@ -6558,9 +6526,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": { @@ -6636,6 +6604,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", @@ -6840,9 +6817,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": { @@ -7158,15 +7135,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", @@ -7174,7 +7151,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" } }, @@ -7606,9 +7583,9 @@ "dev": true }, "lolex": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", - "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "long": { @@ -7623,12 +7600,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": { @@ -7922,9 +7899,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": { @@ -7998,6 +7975,12 @@ "ms": "2.0.0" } }, + "diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true + }, "glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", @@ -8011,6 +7994,21 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } } } }, @@ -10719,26 +10717,11 @@ "supports-color": "^5.4.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 - }, "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 - }, - "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" - } } } }, @@ -11536,23 +11519,6 @@ "nise": "^1.2.0", "supports-color": "^5.1.0", "type-detect": "^4.0.5" - }, - "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 - }, - "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" - } - } } }, "slash": { @@ -12005,12 +11971,20 @@ } }, "supports-color": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", - "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "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": "^1.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": { diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 08b4c7cf997..d264337000f 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -33,7 +33,7 @@ # skip index, protos, package.json, and README.md s.copy( library, - # excludes=['package.json', 'README.md', 'src/index.js'], + excludes=['package.json', 'README.md', 'src/index.js'], ) # From 87f1033085299725f5b0d0dbf4cfd9e6b27a060e Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Fri, 13 Jul 2018 14:09:49 -0700 Subject: [PATCH 010/370] update mocha --- packages/google-cloud-iot/package-lock.json | 1489 +++++++++++++------ packages/google-cloud-iot/package.json | 2 +- 2 files changed, 1037 insertions(+), 454 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index e157c0b8369..8c9a385d1f1 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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,32 +1104,61 @@ "bundled": true, "dev": true }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", + "has-value": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, - "inherits": { - "version": "2.0.3", + "has-values": { + "version": "1.0.0", "bundled": true, - "dev": true - }, - "invariant": { - "version": "2.2.2", + "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": { @@ -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": { + "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": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "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,8 +1937,16 @@ "glob": "^7.0.5" } }, + "safe-regex": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, "semver": { - "version": "5.4.1", + "version": "5.5.0", "bundled": true, "dev": true }, @@ -1561,6 +1955,27 @@ "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, @@ -1574,18 +1989,127 @@ "bundled": true, "dev": true }, - "signal-exit": { - "version": "3.0.2", + "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 }, - "slide": { - "version": "1.1.6", + "source-map-resolve": { + "version": "0.5.1", "bundled": true, - "dev": true + "dev": true, + "requires": { + "atob": "^2.0.0", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } }, - "source-map": { - "version": "0.5.7", + "source-map-url": { + "version": "0.4.0", "bundled": true, "dev": true }, @@ -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" + } + } } } } @@ -3229,9 +3934,9 @@ } }, "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "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": { @@ -3708,13 +4413,10 @@ } }, "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "dev": true, - "requires": { - "graceful-readlink": ">= 1.0.0" - } + "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", @@ -4656,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": { @@ -5880,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", @@ -5895,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", @@ -5927,16 +6629,10 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, "growl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", - "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "grpc": { @@ -7279,12 +7975,6 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", @@ -7438,40 +8128,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, - "lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basecreate": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", - "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -7484,17 +8140,6 @@ "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", "dev": true }, - "lodash.create": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", - "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", - "dev": true, - "requires": { - "lodash._baseassign": "^3.0.0", - "lodash._basecreate": "^3.0.0", - "lodash._isiterateecall": "^3.0.0" - } - }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -7531,18 +8176,6 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", @@ -7560,17 +8193,6 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, "lodash.merge": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", @@ -7947,68 +8569,32 @@ } }, "mocha": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", - "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "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.0", - "commander": "2.9.0", - "debug": "2.6.8", - "diff": "3.2.0", + "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.1", - "growl": "1.9.2", + "glob": "7.1.2", + "growl": "1.10.5", "he": "1.1.1", - "json3": "3.3.2", - "lodash.create": "3.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "3.1.2" + "supports-color": "5.4.0" }, "dependencies": { "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "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" } - }, - "diff": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", - "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", - "dev": true - }, - "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", - "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } } } }, @@ -10414,9 +11000,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": { @@ -11507,18 +12093,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": { @@ -11896,9 +12482,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", @@ -11906,11 +12492,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": { @@ -11961,13 +12547,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": { @@ -12507,12 +13093,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", @@ -12728,9 +13311,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" diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1aa42367bc8..74134fbf2ba 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -59,7 +59,7 @@ "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^3.5.3", + "mocha": "^5.2.0", "nyc": "^12.0.2", "power-assert": "^1.6.0", "prettier": "^1.13.7", From c7b34f00f54ffc39a2cb36d89568483505753bcc Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Fri, 13 Jul 2018 14:49:18 -0700 Subject: [PATCH 011/370] Release v0.1.0 --- packages/google-cloud-iot/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/google-cloud-iot/CHANGELOG.md diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md new file mode 100644 index 00000000000..9ba9c216031 --- /dev/null +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## v0.1.0 + +- Initial release of @google-cloud/iot + +## 0.1.0 + +Initial release of @google-cloud/iot + From 6045024223070c4bcff4921067b6c5cc5254c1b5 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Fri, 13 Jul 2018 14:51:28 -0700 Subject: [PATCH 012/370] Update CHANGELOG.md --- packages/google-cloud-iot/CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 9ba9c216031..bcd867b61ed 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -3,8 +3,3 @@ ## v0.1.0 - Initial release of @google-cloud/iot - -## 0.1.0 - -Initial release of @google-cloud/iot - From 90972c404a72d3d6d07f61342c629f9e1fddc7d2 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Fri, 13 Jul 2018 22:37:59 +0000 Subject: [PATCH 013/370] reencrypting key.json --- .../google-cloud-iot/.circleci/key.json.enc | Bin 2352 -> 2352 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/key.json.enc b/packages/google-cloud-iot/.circleci/key.json.enc index f3f9dfcb8ca6faaed8862f15bd820e21ee356274..b48de0b75c6380443bc7b31bfaadfd40a2a72754 100644 GIT binary patch literal 2352 zcmV-03D5RZVQh3|WM5y_u-GhRn<@VB~I1`KY8myaIwE;YtJna2Z zw$Z3*hhpY=!NHF2lPRG?eQG=DIO_+DdMP@#eV>r(v3|OpVd@zEj$mHcD|LB|2$>lw zuGny_pSeihzH|cP&7*?sgoz?pmXXS6$sBq>)XD*oV-$A6dq@l~5|gp^K5msGgrulg z?r5@09W$wH*5CLjA|d?bhmzi8ngg`9Ycs6Q<_^5P%c^tYcws97TAf_iRIu)tuEh~L z@{khFrg^WKdd?R*nq%(5;!UR7^B>)vXlr}-W4;mW1wkW2$4)#R>yeInffvZ@eL#^u zD^s8R5}pD)SlU%4if{rhAWHj7a8pQHA~}u!nehCTqXpp^{=SI>9EusOc|}-tbPz^d zY$5OV;7Dk(ANF>NgK7~qqnokx_u3+4 z(kSpBsu+Qd28GarvOIHvOEe;2rEdp`6gZdN%ETO17R-3kmvi8^3MU?lTgbuTI`CJV zK8JIG>{cP5iKSrT_=5`Q?gDw6896eEtx1M5Fwy;;B5u2h(~iVemlNvxDx0&f|~3j5yq#Uj$>b%xZ1XX(oGkQaN`G-4gB>wY{B9pS?gPB z#?D})_YKNf>pr40b{toLS>$Ud5iC&?T)~rXhvE(|IGxkk-~k2$Z@P+4<@W)OmE zL@N_|2QUuXxsblN@pjZbnY)lOn%ALSk7p-cV?k}K3zYGwl`2hS`5euuhakq!j4UPw zNp^m{GJjE0e8F|2A1!~AW|7^5SyQQ)eqouqhj|nb)zC(`Ue>99-bk>pUUu7)^=UnE zMW5yT0-$Pl46&^rM$prKQYLU_^%hq0ybGIXDSk&uCQS1=L;o0B@5$;jT99LZgdCQ= zN0J^edNXH4;beL+_w27K_h$#wh&Dj~XcWkrHnr*SE zlE6N3;S|3Rx|Q~fL>5HO-e}{WR(Pj#`IN|zMDLdFhs($Nb+vUnH2UZd?c07{$G?-J zyGMee=XOBWtT#*+DD1Ch11a~%NQhI7dz3#ZltGwQXa8pC9d_=X zZQD(V>+c1DWQveVpucVV%#RIIDZ)lQg}$L!&AnATHkx)_qVb~2h($$ZFFkr=|bxEBbI1!-1N#7QE#g!Gq3Lts@P}Z)F!6O<0 z@=8Dkc?{q%H0OeiOBL^BY9bp zr3(PE%5bqxN)5GtH2jHq#jsL*@{oU6K2Npy5ZqTwFlDU+f$C|_5O(+kPt5O+i#iH^ zg*L$Rc#!mfLN<5+%U6ExU|b=R=!-SHGkwt7G`a9E9fw-V6jRFVXz6za&WOVewY$%# z?C4La?oNcY)QnOb zyy4I!7A&e_eF2a6c8E+m|F(&~#HS#_L^961v_qE5^Y z!4gLtOy%TGcf=MBV?)i+3c=A0IeD+gk*!&xT9x4GQ%3MBKF%|wa{d(`jyea@qjqi@ zI#F-^bcxG;;y7;{1`iVjK{k7cazgOHf`QM#(GH@1f3ly6L#ohV^$+4_e?YomZt@-H zR7k*P~M@H2^mU;B0AG0IARbwl0MuF^(Kn85c>mH@x&z Wp^anxKYF}iwh^35z?B}KP~m!YGn^v; literal 2352 zcmV-03D5RZVQh3|WM5wedwr3y`0l!#W~%Kz{#yY5z82ija2m=oZV+F4-VeE6=9);M z_{BR=87mXpuxH<-qVs{FU4X=wOH9A;vB^hof{97lrccul`jKmIu{Kn`9?j{Fmnb z!j|Y^hCyO=K>~W?!k%4;wAMpFcX3}E2PCud0FS{K1t`d(;9ulJ;cv>%|L|+N3ROGp z#iUIu!=0vfIYxz2;N5}!zIl*vS;$#R%{D-Di0O(A3aRIj3N{SMKao*_nD`!2r-2={ z7nj-s{+@0Z3(AK^{_sueDx}3C?9wIYpCe*_ol9_}fWB>G8aWAw>dPdR&UA!XJ& zvsWtd;GVP^dD%O5bm-CJtPZ-FbyqO;0K&jQ(S|T_p|#H5C?~us35e!qXjU^*5U!t_ z*{r}mxfQMV6xYr3a4t;2g{62pd1lAQ)~;M9>TS2)WTJb&WQ3cI69zw#XTH{Ga-uVk`2C2 zhC>XZ3`xI&N2kL0L_&W37goe0K*(&U#^f;KBMpg)a%P=ztVX>%erI{qw~$D>4W%sJ zH57a!k{ENuD^B4~WUiik;s}(hAf8D_(Q(~!3g^NEAM>6)gTA1wX$NU<@~Qj(s1w&- zawp`_1Sw^-)~StGP+X399HMllR7+U$` zN~M)+bZ;roLpV5{aM6!q%@z5U#F@Vnkm=?{tEH&Y{a$0GNczFb>-1M1NT>Y&-S^w zX{p^;aU9Q+0-PELoR<`K3BWPNxd_BEV75e|1XmgE!O;)1ZD}`xvfI%%mvX+fU}Bi}t)CpzIzH-2Z-N{KKIa&R3OZSXexlLVNegHxi3fX+{7jRUZ#KjKtadCJt4V;p z9CHzRF3gtN4!y7$9fT}lzLJMlu^YEmC^+k^s~xaCsqV$jaR~_!5!=IDr5|qYQaG8S zJMnPuo{u z4Wz8oK$0?wo(TT#YMGHSP+%i{d`&hV4+bVQflF%9Jq0U&SD^p@N(={cV07QFYNDp7 zJVd!u&V~yTUoA*O$nY_$8fd1(%2(?1XFz9X1|jZNH~D3N2{Ofh-Jdm(6Oi`=`SG;& zyAu?)jX?sKq$G?8#F^sZqKoexvQ+wpiUbsdlc2T2+IjwyyEvAtfXwI|%}V#?l7^<5 zxw~dD&&oOL7ANYrx+*hMBjh>0?sJZ$af?2HLA&6)-riAF1YSfazJ);B1-bhenKz+z zQb(1VleUh@cSqTebANHh_Ul-Up0G^?EfEFuWqDv@l)OcwSiC!q1tueM*O z4$YNVB0*wG5;s*rmjb1+{;|m&)vX&aCkbs`c0>G|`DorLFDrRw$C;v(Y(|T{H{`rK zOhaX_ugQecwatUO(;Fs4$7!oPG4Xn3HN4#(1+3w4%+S*e$3sC{NuXhZW;#1^5H25h zl0DcmAM9nL_Ru)+Keev_mizr-$w3#Rw@_o5dkNKijZ9&r@S#us%BG=3$%&BWs<=Vy z$*m@vQ5YMfCndv=!;E#?b0K8A!AV_JF0*mrEAZmH+=cR%-xHRo5xP2m>XTtYVC-SEaJ# z*Ib%CWJs18;0bJmO9+SD=5d1`AqripUB846^DjmN@>4z#F>rgmFi^Y-h4vM{6jMVlhtVE`sJ=t-?8wBV;JFQf#`(^+vy;yBI46VC-pk%MADEP_s zj;eh_IF!C!u+MQx9A|pqqd~I)k~!jykz|ardcuz{HP$fA^jk|zmBBAf^6Mkp)PnJF W5 Date: Sat, 14 Jul 2018 01:53:24 +0000 Subject: [PATCH 014/370] regenerate key.json --- .../google-cloud-iot/.circleci/key.json.enc | Bin 2352 -> 2352 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/key.json.enc b/packages/google-cloud-iot/.circleci/key.json.enc index b48de0b75c6380443bc7b31bfaadfd40a2a72754..3977509d735c7e7b9ebe4bc6eb0fb74de3cf7f3a 100644 GIT binary patch literal 2352 zcmV-03D5RZVQh3|WM5z3)|(K1VhT7^v6-I7Q8*J-<)~4o9Xbjw)CnurX!XsguGHgc zVzj*x%b?hKSlC`9nFR|lw8H5T77*;&;7VivPn3FxR`rwzMVOB;$9H?+1in# z1I}7^s3CwSg3RyiT7*>IkElGmVIu#Y@Mt7>%fa!rb}F>`8OG-d_Vax4doJ0Ih|FksDpji z7U@H|?}!L5cCSUk%ESz$fD?On`31nCTyQ{;^&v*~M~%4+S~b%zUgfCmNto zkr}v(8umXio_c+qAkpPWnUpimLjEC3MIk6|z_F7r-?uRr=t*3!Oz#_Z3*6ksmxMgqf zKr#m~~fJ;-#doax3P!rg| zEWwWmH@=*;JHN}jfz4QFL_4e~0ztTJ-|6rVlF((SV^)?f1wyKjPPEs0)}#S)7GWNn zEh&%5^NL1DO!3KG2pGHcR(nwOxuPG%sdB!c2$O{7_7HMOf%@1jDX+WQ6rd7_l|>~X zd)V!y%e@OzlU`bffifvav73N8>c|Jr5`j05<~bS>NAs3n-;pmmppE8Q0fA7uk%;W! z>OZ-{1QhYNqVa16j%cAV_6sO+?v2;>MBkQv)=Bc;g2EU==_&9dwUq*9*$OXX*inJm zsZCwJoj%qQj{G2c<3j(i{-dwfcHEjGm37%E)3wrlB{)J40}nadilQLtR)8&i-0(jI z&pK(;BaHi9s!ecXoR9CQyVm3{SS{b|4pIy@rMJV zK?Eet?{%b9ib?WH z8GbSv>T1@zi_>H32i14e(ij7RqDW5cri!apR5(q0oeB*ZojfWUe5x?YB;a%-ihsj# zF%LK|$UkFvLOMKchG+6-f7i~Z>uSu<8sQ@mKvrp@Nm(zQJE#HGWHZ1J&X_LsNwRSj;klRYwl&|rBjq~bBGeY z%OQ|e*`ygc1+X?dKB*(bEU|FNK#3}^CsNv_Hs*QX|(1}x_faRmQRnW0j`%U z41!2)L=%kHYgu2Pz9?=eG?W|a0yn#=5PbQ^zr=r>`Ao65I^VZ@$m77}__cKWm~M3F zsl&&mf$>8nvxSZX15eUS0Ac=PFRH*OZ|3pIA`3d9VGgKjro(cDm_KF(KDJnB*Qj*T z%7dWk%{N01mB38G=iA|md!qjLgAwI~gM09g-7u9C*(A2&+MWO!^Jio0j*Z&`W)in) zIEL5^1HK&xPvSc;Qd|L<+M4~9tThOXr)^@T*K6A8z^9vjD27|L2<}&IR{#5^Mux=H zKvdQ?LIL%WZL*CxF_xHNo*Me|7Q9t$ZCtJH1{J<2k(!$xUrGYvJKH4dgpDsMKB2u3 z4(%XwloKCPF`|)Cr^E)*#^r%b`=ii&Zjs9@vq2?!EjKB;o^xNn@qOS#1U2a9uzy)P z1~^<;(?TT%V`YNqTK*=pXZT7^HlUB%GU6=*V`wM01Bcw>8g(A2!!v;GdsCJ=f1P3~ z;Tygq!TZq_o*cA)mp!#Yg^*O)C}VTMB*oDsqOW{;&k1p{>-(|5?{#AT!i?Idsy@$mDzW4Yj_dz0{*V zlwrP=k+_6sAbC5b`qZRa&rDY^L$U?vmY_XI#WEGs89o2jc$8pa?0t%LPfpT7Ze}k# zWgofZqtyo^s#*uo;QP!2h5!cDUpIlDUZQP+H&>MMku79M_JF=o&@+lz9|=E0X34)l z_K&c^Vs}Pv5z>$spuK9aHGqvlKqo$4q*1u>^_8>2@)xO0x!+@Aow9c-eAXyTph7IA zkC{^H^fi7BSjWltmZC`#Hgi`L?fWqtj>p~Z8Y6$H3LpN|5+7mX8h3yfSH>SRDCY&z z;7*`q-qj7``@}8p(TKzZcy?$bRfWNve7Fb~{jIqzr`Y&ee(57D^EJKwA~W;W&np({ z=kTg^?RKjzhF5&rt9%3wI~Kzef(8W8Z$TP5uW)< zNutGXjKU=lz5?u0Qv>6Y4brdxDhSx%zZyA6)QGAi<-)Km%-IqO?}4?Mt)yvJJa5FO zN%n?nCmzgqmNyA;jar9>prG6le%ty;uykprU8QG(u)tui6R0BIWf{cHcS5^&O=${L z_aVjCCMC3HEo70aBpTb+fNDR5Kx*s_EQ@3Y=6x%seBiG-CXKe+KjyPXrs@wH9$h|H z7<@VB~I1`KY8myaIwE;YtJna2Z zw$Z3*hhpY=!NHF2lPRG?eQG=DIO_+DdMP@#eV>r(v3|OpVd@zEj$mHcD|LB|2$>lw zuGny_pSeihzH|cP&7*?sgoz?pmXXS6$sBq>)XD*oV-$A6dq@l~5|gp^K5msGgrulg z?r5@09W$wH*5CLjA|d?bhmzi8ngg`9Ycs6Q<_^5P%c^tYcws97TAf_iRIu)tuEh~L z@{khFrg^WKdd?R*nq%(5;!UR7^B>)vXlr}-W4;mW1wkW2$4)#R>yeInffvZ@eL#^u zD^s8R5}pD)SlU%4if{rhAWHj7a8pQHA~}u!nehCTqXpp^{=SI>9EusOc|}-tbPz^d zY$5OV;7Dk(ANF>NgK7~qqnokx_u3+4 z(kSpBsu+Qd28GarvOIHvOEe;2rEdp`6gZdN%ETO17R-3kmvi8^3MU?lTgbuTI`CJV zK8JIG>{cP5iKSrT_=5`Q?gDw6896eEtx1M5Fwy;;B5u2h(~iVemlNvxDx0&f|~3j5yq#Uj$>b%xZ1XX(oGkQaN`G-4gB>wY{B9pS?gPB z#?D})_YKNf>pr40b{toLS>$Ud5iC&?T)~rXhvE(|IGxkk-~k2$Z@P+4<@W)OmE zL@N_|2QUuXxsblN@pjZbnY)lOn%ALSk7p-cV?k}K3zYGwl`2hS`5euuhakq!j4UPw zNp^m{GJjE0e8F|2A1!~AW|7^5SyQQ)eqouqhj|nb)zC(`Ue>99-bk>pUUu7)^=UnE zMW5yT0-$Pl46&^rM$prKQYLU_^%hq0ybGIXDSk&uCQS1=L;o0B@5$;jT99LZgdCQ= zN0J^edNXH4;beL+_w27K_h$#wh&Dj~XcWkrHnr*SE zlE6N3;S|3Rx|Q~fL>5HO-e}{WR(Pj#`IN|zMDLdFhs($Nb+vUnH2UZd?c07{$G?-J zyGMee=XOBWtT#*+DD1Ch11a~%NQhI7dz3#ZltGwQXa8pC9d_=X zZQD(V>+c1DWQveVpucVV%#RIIDZ)lQg}$L!&AnATHkx)_qVb~2h($$ZFFkr=|bxEBbI1!-1N#7QE#g!Gq3Lts@P}Z)F!6O<0 z@=8Dkc?{q%H0OeiOBL^BY9bp zr3(PE%5bqxN)5GtH2jHq#jsL*@{oU6K2Npy5ZqTwFlDU+f$C|_5O(+kPt5O+i#iH^ zg*L$Rc#!mfLN<5+%U6ExU|b=R=!-SHGkwt7G`a9E9fw-V6jRFVXz6za&WOVewY$%# z?C4La?oNcY)QnOb zyy4I!7A&e_eF2a6c8E+m|F(&~#HS#_L^961v_qE5^Y z!4gLtOy%TGcf=MBV?)i+3c=A0IeD+gk*!&xT9x4GQ%3MBKF%|wa{d(`jyea@qjqi@ zI#F-^bcxG;;y7;{1`iVjK{k7cazgOHf`QM#(GH@1f3ly6L#ohV^$+4_e?YomZt@-H zR7k*P~M@H2^mU;B0AG0IARbwl0MuF^(Kn85c>mH@x&z Wp^anxKYF}iwh^35z?B}KP~m!YGn^v; From c6f07c832c9c64192b810052b3ab36aa168a5b9f Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Tue, 17 Jul 2018 11:00:42 -0700 Subject: [PATCH 015/370] add grpc options to streaming call --- .../src/v1/device_manager_client.js | 7 +++++++ packages/google-cloud-iot/synth.py | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 4d7b8655a23..9a1f09f6510 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -606,6 +606,13 @@ class DeviceManagerClient { */ listDeviceRegistriesStream(request, 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._descriptors.page.listDeviceRegistries.createStream( this._innerApiCalls.listDeviceRegistries, diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index d264337000f..e9c1ff4ad4d 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -36,10 +36,21 @@ excludes=['package.json', 'README.md', 'src/index.js'], ) +# Streaming is broken and missing grpc handling +s.replace( + 'src/v1/device_manager_client.js', + f'(listDeviceRegistriesStream\(.*\n\s+options = .*\n)(\n\s+return)', + '''\g<1>options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + });\n\g<2>''') + # # Node.js specific cleanup # subprocess.run(['npm', 'ci']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) - From 23d06b9fa303307121af3676fdf86a5fda59b5be Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Tue, 17 Jul 2018 13:20:14 -0700 Subject: [PATCH 016/370] add bug id for replacement --- packages/google-cloud-iot/synth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index e9c1ff4ad4d..8752a0921c7 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -37,6 +37,7 @@ ) # Streaming is broken and missing grpc handling +# https://github.com/googleapis/gapic-generator/issues/2152 s.replace( 'src/v1/device_manager_client.js', f'(listDeviceRegistriesStream\(.*\n\s+options = .*\n)(\n\s+return)', From d69a8bb9c250de028e2160bdaf444a7aff98e0f7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 18 Jul 2018 09:28:08 -0700 Subject: [PATCH 017/370] test: use strictEqual in tests (#6) --- packages/google-cloud-iot/test/gapic-v1.js | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index b6c8277d338..69eb44fad29 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -82,7 +82,7 @@ describe('DeviceManagerClient', () => { client.createDeviceRegistry(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(); }); @@ -152,7 +152,7 @@ describe('DeviceManagerClient', () => { client.getDeviceRegistry(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(); }); @@ -218,7 +218,7 @@ describe('DeviceManagerClient', () => { client.updateDeviceRegistry(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(); }); @@ -278,7 +278,7 @@ describe('DeviceManagerClient', () => { client.deleteDeviceRegistry(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -344,7 +344,7 @@ describe('DeviceManagerClient', () => { client.listDeviceRegistries(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(); }); @@ -422,7 +422,7 @@ describe('DeviceManagerClient', () => { client.createDevice(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(); }); @@ -498,7 +498,7 @@ describe('DeviceManagerClient', () => { client.getDevice(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(); }); @@ -568,7 +568,7 @@ describe('DeviceManagerClient', () => { client.updateDevice(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(); }); @@ -628,7 +628,7 @@ describe('DeviceManagerClient', () => { client.deleteDevice(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -702,7 +702,7 @@ describe('DeviceManagerClient', () => { client.listDevices(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(); }); @@ -778,7 +778,7 @@ describe('DeviceManagerClient', () => { client.modifyCloudToDeviceConfig(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(); }); @@ -845,7 +845,7 @@ describe('DeviceManagerClient', () => { client.listDeviceConfigVersions(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(); }); @@ -912,7 +912,7 @@ describe('DeviceManagerClient', () => { client.listDeviceStates(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(); }); @@ -986,7 +986,7 @@ describe('DeviceManagerClient', () => { client.setIamPolicy(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(); }); @@ -1056,7 +1056,7 @@ describe('DeviceManagerClient', () => { client.getIamPolicy(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(); }); @@ -1125,7 +1125,7 @@ describe('DeviceManagerClient', () => { client.testIamPermissions(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 8933217c5008aa5cfdd9ba6f9fa25f71b7c8a92c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 18 Jul 2018 15:18:07 -0700 Subject: [PATCH 018/370] chore(deps): update dependency eslint-plugin-node to v7 (#8) --- packages/google-cloud-iot/package-lock.json | 79 ++++++++++++++++----- packages/google-cloud-iot/package.json | 2 +- 2 files changed, 64 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 8c9a385d1f1..9fab94e77e9 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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", @@ -8219,7 +8263,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", @@ -8805,6 +8850,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9747,7 +9793,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-iot/package.json b/packages/google-cloud-iot/package.json index 74134fbf2ba..80f6dcefca0 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -53,7 +53,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.1", "eslint-config-prettier": "^2.9.0", - "eslint-plugin-node": "^6.0.1", + "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.1", "extend": "^3.0.1", "ink-docstrap": "^1.3.2", From 8b7a20f8f0aade15bd08a16c7419594cdaf0435c Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 23 Jul 2018 15:03:20 -0700 Subject: [PATCH 019/370] Add missing JSDoc namespaces. (#9) --- packages/google-cloud-iot/src/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/google-cloud-iot/src/index.js b/packages/google-cloud-iot/src/index.js index d53593512c4..3d6dc4e2cc1 100644 --- a/packages/google-cloud-iot/src/index.js +++ b/packages/google-cloud-iot/src/index.js @@ -24,6 +24,18 @@ /** * @namespace google.cloud.iot.v1 */ +/** + * @namespace google.iam + */ +/** + * @namespace google.iam.v1 + */ +/** + * @namespace google.protobuf + */ +/** + * @namespace google.rpc + */ 'use strict'; From fc877c7c3b0334ec9e7533bd7935c0079725c4fe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 24 Jul 2018 10:05:41 -0700 Subject: [PATCH 020/370] chore(deps): lock file maintenance (#13) --- packages/google-cloud-iot/package-lock.json | 109 +++++++++----------- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 9fab94e77e9..9eed5a738ba 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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" } @@ -5051,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", @@ -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", @@ -8263,8 +8251,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", @@ -8545,18 +8532,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": { @@ -8850,7 +8837,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9793,8 +9779,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -11526,9 +11511,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", @@ -11540,8 +11525,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 c4dd197148dd5a14d5ae5eaf965bb1820e2d0e3d Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 24 Jul 2018 21:34:48 -0700 Subject: [PATCH 021/370] chore(build): use .circleci/config.yml from synth tool template (#11) --- .../google-cloud-iot/.circleci/config.yml | 39 +++++++------------ packages/google-cloud-iot/package.json | 14 +++---- .../google-cloud-iot/samples/package.json | 22 +++++++++++ .../google-cloud-iot/samples/quickstart.js | 6 +-- packages/google-cloud-iot/synth.py | 5 ++- 5 files changed, 49 insertions(+), 37 deletions(-) create mode 100644 packages/google-cloud-iot/samples/package.json diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index a7b4db9d9f1..cf867c5f06d 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.circleci/config.yml @@ -76,17 +76,11 @@ 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 - - run: - name: Run unit tests. - command: npm test - - run: - name: Submit coverage data to codecov. - command: node_modules/.bin/codecov - when: always + - run: npm test + - run: node_modules/.bin/codecov + node8: docker: - image: 'node:8' @@ -99,7 +93,7 @@ jobs: steps: *unit_tests_steps lint: docker: - - image: 'node:10' + - image: 'node:8' user: node steps: - checkout @@ -109,9 +103,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm link @google-cloud/tasks + npm link ../ npm install - cd .. environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: @@ -121,7 +114,8 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global docs: docker: - - image: 'node:10' + - image: 'node:8' + user: node steps: - checkout - run: *remove_package_lock @@ -131,7 +125,7 @@ jobs: command: npm run docs sample_tests: docker: - - image: 'node:10' + - image: 'node:8' user: node steps: - checkout @@ -149,16 +143,16 @@ jobs: command: npm run samples-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /home/node/tasks-samples/.circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /home/node/samples/.circleci/key.json NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. command: rm .circleci/key.json when: always - working_directory: /home/node/tasks-samples/ + working_directory: /home/node/samples/ system_tests: docker: - - image: 'node:10' + - image: 'node:8' user: node steps: - checkout @@ -174,7 +168,6 @@ jobs: 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. @@ -182,13 +175,9 @@ jobs: when: always publish_npm: docker: - - image: 'node:10' + - image: 'node:8' user: node steps: - checkout - - run: - name: Set NPM authentication. - command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: - name: Publish the module to npm. - command: npm publish + - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - run: npm publish --access=public \ No newline at end of file diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 80f6dcefca0..0ad2999277f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -32,16 +32,14 @@ "Chris Wilcox " ], "scripts": { - "test": "repo-tools test run --cmd npm -- run cover", - "generate-scaffolding": "repo-tools generate all", - "generate-scaffolding-samples": "repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", + "test": "npm run cover", "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --timeout 600000", - "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/ smoke-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 smoke-test/*.js", - "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", - "system-test": "repo-tools test run --cmd mocha -- system-test/*.js smoke-test/*.js --timeout 600000" + "test-no-cover": "mocha test/*.js --timeout 600000", + "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", + "docs": "jsdoc -c .jsdoc.js", + "system-test": "mocha system-test/*.js --timeout 600000" }, "dependencies": { "google-gax": "^0.17.1", diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json new file mode 100644 index 00000000000..07690f0a81a --- /dev/null +++ b/packages/google-cloud-iot/samples/package.json @@ -0,0 +1,22 @@ +{ + "name": "@google-cloud/iot-samples", + "description": "Samples for the Cloud IoT Client Library for Node.js.", + "version": "0.0.1", + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=6" + }, + "repository": "googleapis/nodejs-iot", + "private": true, + "nyc": { + "exclude": [ + "**/*.test.js" + ] + }, + "scripts": {}, + "dependencies": { + "@google-cloud/iot": "^0.1.0" + }, + "devDependencies": {} +} diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index c549de8d706..7e2e5a46ed6 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -23,7 +23,7 @@ describe('DeviceManagerSmokeTest', () => { var projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { - const iot = require('../src'); + const iot = require('@google-cloud/iot'); var client = new iot.v1.DeviceManagerClient({ // optional auth parameters. @@ -45,7 +45,7 @@ describe('DeviceManagerSmokeTest', () => { }); it('successfully makes a call to the service using callbacks', done => { - const iot = require('../src'); + const iot = require('@google-cloud/iot'); var client = new iot.v1.DeviceManagerClient({ // optional auth parameters. @@ -78,7 +78,7 @@ describe('DeviceManagerSmokeTest', () => { }); it('successfully makes a call to the service using streaming', done => { - const iot = require('../src'); + const iot = require('@google-cloud/iot'); var client = new iot.v1.DeviceManagerClient({ // optional auth parameters. diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 8752a0921c7..012bece7e73 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -23,7 +23,7 @@ logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() - +common_templates = gcp.CommonTemplates() library = gapic.node_library( 'iot', 'v1', @@ -49,6 +49,9 @@ parent: request.parent, });\n\g<2>''') +templates = common_templates.node_library(package_name="@google-cloud/automl") +s.copy(templates) + # # Node.js specific cleanup # From b9ea183f04a2cde66fff1edb17090cc9edbf802d Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 25 Jul 2018 16:24:48 -0700 Subject: [PATCH 022/370] doc: fix product name, etc.. in README.md (#14) --- .../google-cloud-iot/.cloud-repo-tools.json | 10 ++-------- packages/google-cloud-iot/README.md | 20 +++++++++---------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-iot/.cloud-repo-tools.json b/packages/google-cloud-iot/.cloud-repo-tools.json index 7d341be44ec..60724941462 100644 --- a/packages/google-cloud-iot/.cloud-repo-tools.json +++ b/packages/google-cloud-iot/.cloud-repo-tools.json @@ -1,13 +1,7 @@ { - "_product": "iot", - "id": "iot", - "name": "Google Cloud IoT", - "short_name": "Cloud IoT", - "docs_url": "https://cloud.google.com/iot/docs/", - "description": "Manages connecting to IoT devices and integrating with Google Cloud Platform", - "api_id": "iot.googleapis.com", "requiresKeyFile": true, "requiresProjectId": true, - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/iot/latest/", + "product": "cloudiot", + "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/cloudiot/latest/", "release_quality": "alpha" } diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 1e061265a33..0954e6df9a4 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -2,21 +2,21 @@ [//]: # "To regenerate it, use `npm run generate-scaffolding`." Google Cloud Platform logo -# [Google Cloud IoT: Node.js Client](https://github.com/googleapis/nodejs-iot) +# [Google Cloud IoT Core: Node.js Client](https://github.com/googleapis/nodejs-iot) [![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-iot.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-iot) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-iot?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) -> Node.js idiomatic client for [Cloud IoT][product-docs]. +> Node.js idiomatic client for [Cloud IoT Core][product-docs]. -Manages connecting to IoT devices and integrating with Google Cloud Platform +[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. -* [Cloud IoT Node.js Client API Reference][client-docs] +* [Cloud IoT Core Node.js Client API Reference][client-docs] * [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) -* [Cloud IoT Documentation][product-docs] +* [Cloud IoT Core Documentation][product-docs] Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -45,7 +45,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. [Enable billing][billing] -1. Enable the Google Cloud IoT API. +1. Enable the Google Cloud IoT Core API. [Enable the API][enable_api] @@ -54,7 +54,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=iot.googleapis.com +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudiot.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started ### Installing the client library @@ -63,7 +63,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. -The [Cloud IoT Node.js Client API Reference][client-docs] documentation +The [Cloud IoT Core Node.js Client API Reference][client-docs] documentation also contains samples. ## Versioning @@ -88,6 +88,6 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest/ -[product-docs]: https://cloud.google.com/iot/docs/ +[client-docs]: https://cloud.google.com/nodejs/docs/reference/cloudiot/latest/ +[product-docs]: https://cloud.google.com/iot/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png From 163498ceeeebfa1b80fe7fc3fec616db2134f287 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Fri, 27 Jul 2018 16:15:59 -0700 Subject: [PATCH 023/370] Release nodejs-iot v0.1.1 (#15) * Release v0.1.1 * chore: package-lock regen --- packages/google-cloud-iot/CHANGELOG.md | 14 +++++++++++ packages/google-cloud-iot/package-lock.json | 26 ++++++++++----------- packages/google-cloud-iot/package.json | 2 +- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index bcd867b61ed..44f53c0b06b 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## v0.1.1 + +### Dependencies +- chore(deps): update dependency eslint-plugin-node to v7 (#8) + +### Documentation +- doc: fix product name, etc.. in README.md (#14) +- Add missing JSDoc namespaces. (#9) + +### Internal / Testing Changes +- chore(build): use .circleci/config.yml from synth tool template (#11) +- test: use strictEqual in tests (#6) +- chore: Configure Renovate (#7) + ## v0.1.0 - Initial release of @google-cloud/iot diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 9eed5a738ba..9db24375444 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/iot", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -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.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.3.tgz", + "integrity": "sha512-jQ1p+SyF/z8ygPxfSPKZKMWazlCgTBSyIaC1UCUvkLHDdxdmPQtQFk02X4WFM31Z1BKMAS3MSAK0cRP2c92n6Q==" }, "acorn": { "version": "5.7.1", @@ -6668,9 +6668,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 +6884,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 +6912,7 @@ "bundled": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.1.11", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -7869,9 +7869,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", diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0ad2999277f..25eec43cd0b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "0.1.0", + "version": "0.1.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { From 49ff82b9e89fa3ec6aea41e84c624e76fb6d9ecd Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 07:52:21 -0700 Subject: [PATCH 024/370] chore: require node 8 for samples (#17) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 07690f0a81a..27f271b13d7 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=6" + "node": ">=8" }, "repository": "googleapis/nodejs-iot", "private": true, From d6fc16db3a8c26e702c14e3147f0790e3015b3d6 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 10:51:08 -0700 Subject: [PATCH 025/370] chore: move mocha options to mocha.opts (#16) --- packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/test/mocha.opts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-iot/test/mocha.opts diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 25eec43cd0b..a6a6f4ddeb0 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -33,7 +33,7 @@ ], "scripts": { "test": "npm run cover", - "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "test-no-cover": "mocha test/*.js --timeout 600000", "lint": "eslint src/ samples/ system-test/ test/", diff --git a/packages/google-cloud-iot/test/mocha.opts b/packages/google-cloud-iot/test/mocha.opts new file mode 100644 index 00000000000..3e740ac6e4c --- /dev/null +++ b/packages/google-cloud-iot/test/mocha.opts @@ -0,0 +1,2 @@ +--require intelli-espower-loader +--timeout 10000 From d923f74265f4139554e6d2ee49308fc395c1bf99 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 30 Jul 2018 18:45:37 -0700 Subject: [PATCH 026/370] chore(deps): lock file maintenance (#18) --- packages/google-cloud-iot/package-lock.json | 27 +++++++++++---------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 9db24375444..0b16c5cab13 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.3.tgz", - "integrity": "sha512-jQ1p+SyF/z8ygPxfSPKZKMWazlCgTBSyIaC1UCUvkLHDdxdmPQtQFk02X4WFM31Z1BKMAS3MSAK0cRP2c92n6Q==" + "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": { @@ -11471,9 +11472,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 6d5bb9a3ab6097eee1220c2e943a2c2676ec72b0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 1 Aug 2018 17:48:32 -0700 Subject: [PATCH 027/370] fix(deps): update dependency google-gax to ^0.18.0 (#19) --- packages/google-cloud-iot/package-lock.json | 85 ++++++++++++++++----- packages/google-cloud-iot/package.json | 2 +- 2 files changed, 66 insertions(+), 21 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 0b16c5cab13..a75576686f6 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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" } @@ -8252,7 +8287,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", @@ -8838,6 +8874,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9780,7 +9817,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", @@ -11529,6 +11567,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-iot/package.json b/packages/google-cloud-iot/package.json index a6a6f4ddeb0..0044b582ac4 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -42,7 +42,7 @@ "system-test": "mocha system-test/*.js --timeout 600000" }, "dependencies": { - "google-gax": "^0.17.1", + "google-gax": "^0.18.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From a8afb56730716abffd02b4114a967a14a75b76bb Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 2 Aug 2018 05:12:50 -0700 Subject: [PATCH 028/370] test: throw on deprecation (#20) * remove that whitespace * Update mocha.opts --- packages/google-cloud-iot/test/mocha.opts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/test/mocha.opts b/packages/google-cloud-iot/test/mocha.opts index 3e740ac6e4c..fdcf6d2300d 100644 --- a/packages/google-cloud-iot/test/mocha.opts +++ b/packages/google-cloud-iot/test/mocha.opts @@ -1,2 +1,3 @@ --require intelli-espower-loader +--throw-deprecation --timeout 10000 From 4a21d45425a79b0235c6d15b59342c375bb7cc3b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 6 Aug 2018 19:08:14 -0700 Subject: [PATCH 029/370] chore(deps): lock file maintenance (#22) --- packages/google-cloud-iot/package-lock.json | 128 ++++++++------------ 1 file changed, 51 insertions(+), 77 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index a75576686f6..6503ca94ce1 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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", @@ -8287,8 +8264,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", @@ -8874,7 +8850,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9817,8 +9792,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -11244,9 +11218,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": { @@ -11570,9 +11544,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==" } } }, @@ -11779,9 +11753,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": { @@ -12078,9 +12052,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", @@ -13187,9 +13161,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 3b850cb6e97dc7e4ee272590cf9525d8aec9f3aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 7 Aug 2018 07:50:59 -0700 Subject: [PATCH 030/370] chore(deps): lock file maintenance (#23) --- packages/google-cloud-iot/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json index 6503ca94ce1..d1afc7e98df 100644 --- a/packages/google-cloud-iot/package-lock.json +++ b/packages/google-cloud-iot/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 6e1c872c3b7e26c9f330ecf6a97766948285674f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 7 Aug 2018 14:04:03 -0700 Subject: [PATCH 031/370] chore: ignore package-lock.json (#24) * chore: ignore package-log.json * remove locky * renovateeee --- .../google-cloud-iot/.circleci/config.yml | 17 +- .../.circleci/get_workflow_name.py | 67 - packages/google-cloud-iot/.gitignore | 3 +- packages/google-cloud-iot/package-lock.json | 13383 ---------------- 4 files changed, 3 insertions(+), 13467 deletions(-) delete mode 100644 packages/google-cloud-iot/.circleci/get_workflow_name.py delete mode 100644 packages/google-cloud-iot/package-lock.json diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index cf867c5f06d..dd4c80cc6e9 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.circleci/config.yml @@ -59,18 +59,7 @@ jobs: - image: 'node:6' user: node steps: &unit_tests_steps - - checkout - - run: &remove_package_lock - name: Remove package-lock.json if needed. - command: | - WORKFLOW_NAME=`python .circleci/get_workflow_name.py` - echo "Workflow name: $WORKFLOW_NAME" - if [ "$WORKFLOW_NAME" = "nightly" ]; then - echo "Nightly build detected, removing package-lock.json." - rm -f package-lock.json samples/package-lock.json - else - echo "Not a nightly build, skipping this step." - fi + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -97,7 +86,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: &samples_npm_install_and_link name: Link the module being tested to the samples. @@ -118,7 +106,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: name: Build documentation. @@ -129,7 +116,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -156,7 +142,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/packages/google-cloud-iot/.circleci/get_workflow_name.py b/packages/google-cloud-iot/.circleci/get_workflow_name.py deleted file mode 100644 index ff6b58fd24f..00000000000 --- a/packages/google-cloud-iot/.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-iot/.gitignore b/packages/google-cloud-iot/.gitignore index 082cf01ed78..531c77e628b 100644 --- a/packages/google-cloud-iot/.gitignore +++ b/packages/google-cloud-iot/.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-iot/package-lock.json b/packages/google-cloud-iot/package-lock.json deleted file mode 100644 index d1afc7e98df..00000000000 --- a/packages/google-cloud-iot/package-lock.json +++ /dev/null @@ -1,13383 +0,0 @@ -{ - "name": "@google-cloud/iot", - "version": "0.1.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.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 - }, - "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 c34f3c474e46dab286dc0767e89b816078e478f0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 9 Aug 2018 14:44:17 -0700 Subject: [PATCH 032/370] chore: do not use npm ci (#25) --- packages/google-cloud-iot/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 012bece7e73..b4a9ebbc109 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -55,6 +55,6 @@ # # Node.js specific cleanup # -subprocess.run(['npm', 'ci']) +subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From f0b55651cfedabcd4f6c412df4b11c7f64989c29 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 16 Aug 2018 16:29:48 -0700 Subject: [PATCH 033/370] chore(deps): update dependency eslint-config-prettier to v3 (#26) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0044b582ac4..7137a727085 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -50,7 +50,7 @@ "async": "^2.6.1", "codecov": "^3.0.2", "eslint": "^5.0.1", - "eslint-config-prettier": "^2.9.0", + "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.1", "extend": "^3.0.1", From 58fde47179ebc08f6e47f30306e0aa923884736d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 22 Aug 2018 07:29:41 -0700 Subject: [PATCH 034/370] fix(deps): update dependency google-gax to ^0.19.0 (#28) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 7137a727085..07a272e22c9 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -42,7 +42,7 @@ "system-test": "mocha system-test/*.js --timeout 600000" }, "dependencies": { - "google-gax": "^0.18.0", + "google-gax": "^0.19.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From df36659225192d09fbe8f6f6a8833a14c9b62046 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 28 Aug 2018 07:50:50 -0700 Subject: [PATCH 035/370] chore(deps): update dependency nyc to v13 (#30) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 07a272e22c9..0180af9058c 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -58,7 +58,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", - "nyc": "^12.0.2", + "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.7", "through2": "^2.0.3" From a6e457c6596f4008ef77e9d26167abb3197d58d7 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 28 Aug 2018 13:19:27 -0700 Subject: [PATCH 036/370] Re-generate library using /synth.py (#31) --- .../google-cloud-iot/.circleci/config.yml | 13 ++++++------ packages/google-cloud-iot/.jsdoc.js | 4 ++-- .../smoke-test/device_manager_smoke_test.js | 20 ++++++++---------- .../src/v1/doc/google/protobuf/doc_any.js | 21 ++++++++++++------- .../v1/doc/google/protobuf/doc_field_mask.js | 6 ++++++ .../v1/doc/google/protobuf/doc_timestamp.js | 8 ++++--- 6 files changed, 41 insertions(+), 31 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index dd4c80cc6e9..eab76c4a6ba 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.circleci/config.yml @@ -59,7 +59,7 @@ jobs: - image: 'node:6' user: node steps: &unit_tests_steps - - checkout + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -69,7 +69,7 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - run: node_modules/.bin/codecov - + node8: docker: - image: 'node:8' @@ -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' - - run: npm publish --access=public \ No newline at end of file + - npm install + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + - run: npm publish --access=public diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 7327b0f586a..5f3137d9f8c 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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/iot', diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index 4a943a4b410..2853e048fc2 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -16,7 +16,7 @@ describe('DeviceManagerSmokeTest', () => { 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; @@ -28,10 +28,9 @@ describe('DeviceManagerSmokeTest', () => { }); // Iterate over all elements. - var formattedParent = client.locationPath(projectId, 'us-central1'); + var formattedParent = client.locationPath(projectId, "us-central1"); - client - .listDeviceRegistries({parent: formattedParent}) + client.listDeviceRegistries({parent: formattedParent}) .then(responses => { var resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -50,7 +49,8 @@ describe('DeviceManagerSmokeTest', () => { }); // Or obtain the paged response. - var formattedParent = client.locationPath(projectId, 'us-central1'); + var formattedParent = client.locationPath(projectId, "us-central1"); + var options = {autoPaginate: false}; var callback = responses => { @@ -67,9 +67,8 @@ describe('DeviceManagerSmokeTest', () => { // Fetch the next page. return client.listDeviceRegistries(nextRequest, options).then(callback); } - }; - client - .listDeviceRegistries({parent: formattedParent}, options) + } + client.listDeviceRegistries({parent: formattedParent}, options) .then(callback) .then(done) .catch(done); @@ -82,9 +81,8 @@ describe('DeviceManagerSmokeTest', () => { // optional auth parameters. }); - var formattedParent = client.locationPath(projectId, 'us-central1'); - client - .listDeviceRegistriesStream({parent: formattedParent}) + var formattedParent = client.locationPath(projectId, "us-central1"); + client.listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); }) diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js index f55fa17ff12..c5c5bbafa23 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js index c82c2b33949..d700752b7c6 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js index a02db52bdeb..51d8f40f54d 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-iot/src/v1/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 eac9ea3f659ebfe46ece309b8c3482fb235afc18 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 31 Aug 2018 16:30:32 -0700 Subject: [PATCH 037/370] Update CI config (#32) --- .../google-cloud-iot/.circleci/config.yml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index eab76c4a6ba..9a65e928a47 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.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 From a7a74e6564b818dfcb8eb38097ee7a4c467228aa Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Sep 2018 10:56:48 -0700 Subject: [PATCH 038/370] Retry npm install in CI (#35) --- .../google-cloud-iot/.circleci/config.yml | 6 +- .../.circleci/npm-install-retry.js | 60 +++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100755 packages/google-cloud-iot/.circleci/npm-install-retry.js diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index 9a65e928a47..80dcf7e67d9 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.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-iot/.circleci/npm-install-retry.js b/packages/google-cloud-iot/.circleci/npm-install-retry.js new file mode 100755 index 00000000000..ae3220d7348 --- /dev/null +++ b/packages/google-cloud-iot/.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 9bcdf6f57a7fb70c73da17d7800ae3a4f08504ff Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 10 Sep 2018 08:09:59 -0700 Subject: [PATCH 039/370] Update CI config (#37) --- packages/google-cloud-iot/.circleci/config.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index 80dcf7e67d9..8af6a4d0489 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.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: From a8a825fd56b2bc4ac774f8c15d6b132f223af447 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 13 Sep 2018 06:59:02 -0700 Subject: [PATCH 040/370] fix(deps): update dependency google-gax to ^0.20.0 (#38) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0180af9058c..1e972a4be80 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -42,7 +42,7 @@ "system-test": "mocha system-test/*.js --timeout 600000" }, "dependencies": { - "google-gax": "^0.19.0", + "google-gax": "^0.20.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 0764a7ed3feb41c39e629286861fbd9dd08169a4 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 14 Sep 2018 08:44:02 -0700 Subject: [PATCH 041/370] Switch to let/const (#39) --- .../smoke-test/device_manager_smoke_test.js | 26 +- .../src/v1/device_manager_client.js | 166 +++++----- .../google/cloud/iot/v1/doc_device_manager.js | 34 +- .../doc/google/cloud/iot/v1/doc_resources.js | 34 +- .../v1/doc/google/iam/v1/doc_iam_policy.js | 8 +- .../src/v1/doc/google/iam/v1/doc_policy.js | 8 +- .../src/v1/doc/google/protobuf/doc_any.js | 2 +- .../src/v1/doc/google/protobuf/doc_empty.js | 2 +- .../v1/doc/google/protobuf/doc_field_mask.js | 2 +- .../v1/doc/google/protobuf/doc_timestamp.js | 2 +- .../src/v1/doc/google/rpc/doc_status.js | 2 +- packages/google-cloud-iot/test/gapic-v1.js | 312 +++++++++--------- 12 files changed, 299 insertions(+), 299 deletions(-) diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index 2853e048fc2..a59a8318324 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -18,21 +18,21 @@ describe('DeviceManagerSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); } - var projectId = process.env.GCLOUD_PROJECT; + const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { const iot = require('../src'); - var client = new iot.v1.DeviceManagerClient({ + const client = new iot.v1.DeviceManagerClient({ // optional auth parameters. }); // Iterate over all elements. - var formattedParent = client.locationPath(projectId, "us-central1"); + const formattedParent = client.locationPath(projectId, "us-central1"); client.listDeviceRegistries({parent: formattedParent}) .then(responses => { - var resources = responses[0]; + const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } @@ -44,22 +44,22 @@ describe('DeviceManagerSmokeTest', () => { it('successfully makes a call to the service using callbacks', done => { const iot = require('../src'); - var client = new iot.v1.DeviceManagerClient({ + const client = new iot.v1.DeviceManagerClient({ // optional auth parameters. }); // Or obtain the paged response. - var formattedParent = client.locationPath(projectId, "us-central1"); + const formattedParent = client.locationPath(projectId, "us-central1"); - 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) { console.log(resources[i]); } @@ -77,11 +77,11 @@ describe('DeviceManagerSmokeTest', () => { it('successfully makes a call to the service using streaming', done => { const iot = require('../src'); - var client = new iot.v1.DeviceManagerClient({ + const client = new iot.v1.DeviceManagerClient({ // optional auth parameters. }); - var formattedParent = client.locationPath(projectId, "us-central1"); + const formattedParent = client.locationPath(projectId, "us-central1"); client.listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 9a1f09f6510..b1d87fa75e9 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -72,13 +72,13 @@ class DeviceManagerClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class DeviceManagerClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -129,7 +129,7 @@ class DeviceManagerClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.iot.v1.DeviceManager', gapicConfig, opts.clientConfig, @@ -143,14 +143,14 @@ class DeviceManagerClient { // Put together the "service stub" for // google.cloud.iot.v1.DeviceManager. - var deviceManagerStub = gaxGrpc.createStub( + const deviceManagerStub = gaxGrpc.createStub( protos.google.cloud.iot.v1.DeviceManager, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var deviceManagerStubMethods = [ + const deviceManagerStubMethods = [ 'createDeviceRegistry', 'getDeviceRegistry', 'updateDeviceRegistry', @@ -173,7 +173,7 @@ class DeviceManagerClient { deviceManagerStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -250,19 +250,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * var deviceRegistry = {}; - * var request = { + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const deviceRegistry = {}; + * const request = { * parent: formattedParent, * deviceRegistry: deviceRegistry, * }; * client.createDeviceRegistry(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -309,14 +309,14 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.getDeviceRegistry({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -374,19 +374,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var deviceRegistry = {}; - * var updateMask = {}; - * var request = { + * const deviceRegistry = {}; + * const updateMask = {}; + * const request = { * deviceRegistry: deviceRegistry, * updateMask: updateMask, * }; * client.updateDeviceRegistry(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -430,11 +430,11 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.deleteDeviceRegistry({name: formattedName}).catch(err => { * console.error(err); * }); @@ -497,16 +497,16 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * * client.listDeviceRegistries({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -516,17 +516,17 @@ class DeviceManagerClient { * }); * * // Or obtain the paged response. - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -592,11 +592,11 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); * client.listDeviceRegistriesStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -651,19 +651,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * var device = {}; - * var request = { + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const device = {}; + * const request = { * parent: formattedParent, * device: device, * }; * client.createDevice(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -716,14 +716,14 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); * client.getDevice({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -781,19 +781,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var device = {}; - * var updateMask = {}; - * var request = { + * const device = {}; + * const updateMask = {}; + * const request = { * device: device, * updateMask: updateMask, * }; * client.updateDevice(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -838,11 +838,11 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); * client.deleteDevice({name: formattedName}).catch(err => { * console.error(err); * }); @@ -918,16 +918,16 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * * client.listDevices({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -937,17 +937,17 @@ class DeviceManagerClient { * }); * * // Or obtain the paged response. - * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * * - * 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]); * } @@ -1026,11 +1026,11 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.listDevicesStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -1082,19 +1082,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * var binaryData = ''; - * var request = { + * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * const binaryData = ''; + * const request = { * name: formattedName, * binaryData: binaryData, * }; * client.modifyCloudToDeviceConfig(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1151,14 +1151,14 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); * client.listDeviceConfigVersions({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1215,14 +1215,14 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); * client.listDeviceStates({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1278,19 +1278,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * var policy = {}; - * var request = { + * const formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const policy = {}; + * const request = { * resource: formattedResource, * policy: policy, * }; * client.setIamPolicy(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1340,14 +1340,14 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.getIamPolicy({resource: formattedResource}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1402,19 +1402,19 @@ class DeviceManagerClient { * * const iot = require('@google-cloud/iot'); * - * var client = new iot.v1.DeviceManagerClient({ + * const client = new iot.v1.DeviceManagerClient({ * // optional auth parameters. * }); * - * var formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * var permissions = []; - * var request = { + * const formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const permissions = []; + * const request = { * resource: formattedResource, * permissions: permissions, * }; * client.testIamPermissions(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js index 475ce2767e6..1dc6946fde6 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js @@ -33,7 +33,7 @@ * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.CreateDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var CreateDeviceRegistryRequest = { +const CreateDeviceRegistryRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -48,7 +48,7 @@ var CreateDeviceRegistryRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.GetDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var GetDeviceRegistryRequest = { +const GetDeviceRegistryRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -63,7 +63,7 @@ var GetDeviceRegistryRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.DeleteDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var DeleteDeviceRegistryRequest = { +const DeleteDeviceRegistryRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -90,7 +90,7 @@ var DeleteDeviceRegistryRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.UpdateDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var UpdateDeviceRegistryRequest = { +const UpdateDeviceRegistryRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -116,7 +116,7 @@ var UpdateDeviceRegistryRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDeviceRegistriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDeviceRegistriesRequest = { +const ListDeviceRegistriesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -137,7 +137,7 @@ var ListDeviceRegistriesRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDeviceRegistriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDeviceRegistriesResponse = { +const ListDeviceRegistriesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -160,7 +160,7 @@ var ListDeviceRegistriesResponse = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.CreateDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var CreateDeviceRequest = { +const CreateDeviceRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -182,7 +182,7 @@ var CreateDeviceRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.GetDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var GetDeviceRequest = { +const GetDeviceRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -209,7 +209,7 @@ var GetDeviceRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.UpdateDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var UpdateDeviceRequest = { +const UpdateDeviceRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -225,7 +225,7 @@ var UpdateDeviceRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.DeleteDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var DeleteDeviceRequest = { +const DeleteDeviceRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -267,7 +267,7 @@ var DeleteDeviceRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDevicesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDevicesRequest = { +const ListDevicesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -287,7 +287,7 @@ var ListDevicesRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDevicesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDevicesResponse = { +const ListDevicesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -313,7 +313,7 @@ var ListDevicesResponse = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ModifyCloudToDeviceConfigRequest = { +const ModifyCloudToDeviceConfigRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -334,7 +334,7 @@ var ModifyCloudToDeviceConfigRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDeviceConfigVersionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDeviceConfigVersionsRequest = { +const ListDeviceConfigVersionsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -351,7 +351,7 @@ var ListDeviceConfigVersionsRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDeviceConfigVersionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDeviceConfigVersionsResponse = { +const ListDeviceConfigVersionsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -372,7 +372,7 @@ var ListDeviceConfigVersionsResponse = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDeviceStatesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDeviceStatesRequest = { +const ListDeviceStatesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -389,6 +389,6 @@ var ListDeviceStatesRequest = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.ListDeviceStatesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} */ -var ListDeviceStatesResponse = { +const ListDeviceStatesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js index d8146b11785..c95f4e92caf 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js @@ -133,7 +133,7 @@ * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.Device definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var Device = { +const Device = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -199,7 +199,7 @@ var Device = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.DeviceRegistry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var DeviceRegistry = { +const DeviceRegistry = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -216,7 +216,7 @@ var DeviceRegistry = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.MqttConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var MqttConfig = { +const MqttConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -233,7 +233,7 @@ var MqttConfig = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.HttpConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var HttpConfig = { +const HttpConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -254,7 +254,7 @@ var HttpConfig = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.EventNotificationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var EventNotificationConfig = { +const EventNotificationConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -269,7 +269,7 @@ var EventNotificationConfig = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.StateNotificationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var StateNotificationConfig = { +const StateNotificationConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -285,7 +285,7 @@ var StateNotificationConfig = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.RegistryCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var RegistryCredential = { +const RegistryCredential = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -318,7 +318,7 @@ var RegistryCredential = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.X509CertificateDetails definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var X509CertificateDetails = { +const X509CertificateDetails = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -342,7 +342,7 @@ var X509CertificateDetails = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.PublicKeyCertificate definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var PublicKeyCertificate = { +const PublicKeyCertificate = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -375,7 +375,7 @@ var PublicKeyCertificate = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.DeviceCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var DeviceCredential = { +const DeviceCredential = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -394,7 +394,7 @@ var DeviceCredential = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.PublicKeyCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var PublicKeyCredential = { +const PublicKeyCredential = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -433,7 +433,7 @@ var PublicKeyCredential = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.DeviceConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var DeviceConfig = { +const DeviceConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -453,7 +453,7 @@ var DeviceConfig = { * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.DeviceState definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} */ -var DeviceState = { +const DeviceState = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -464,7 +464,7 @@ var DeviceState = { * @enum {number} * @memberof google.cloud.iot.v1 */ -var MqttState = { +const MqttState = { /** * No MQTT state specified. If not specified, MQTT will be enabled by default. @@ -489,7 +489,7 @@ var MqttState = { * @enum {number} * @memberof google.cloud.iot.v1 */ -var HttpState = { +const HttpState = { /** * No HTTP state specified. If not specified, DeviceService will be @@ -514,7 +514,7 @@ var HttpState = { * @enum {number} * @memberof google.cloud.iot.v1 */ -var PublicKeyCertificateFormat = { +const PublicKeyCertificateFormat = { /** * The format has not been specified. This is an invalid default value and @@ -536,7 +536,7 @@ var PublicKeyCertificateFormat = { * @enum {number} * @memberof google.cloud.iot.v1 */ -var PublicKeyFormat = { +const PublicKeyFormat = { /** * The format has not been specified. This is an invalid default value and diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js index 52a719ae88d..e952d5d1f02 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js @@ -35,7 +35,7 @@ * @memberof google.iam.v1 * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} */ -var SetIamPolicyRequest = { +const SetIamPolicyRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -51,7 +51,7 @@ var SetIamPolicyRequest = { * @memberof google.iam.v1 * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} */ -var GetIamPolicyRequest = { +const GetIamPolicyRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -73,7 +73,7 @@ var GetIamPolicyRequest = { * @memberof google.iam.v1 * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} */ -var TestIamPermissionsRequest = { +const TestIamPermissionsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -88,6 +88,6 @@ var TestIamPermissionsRequest = { * @memberof google.iam.v1 * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} */ -var TestIamPermissionsResponse = { +const TestIamPermissionsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index 0163cf59f58..59fca18810c 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -74,7 +74,7 @@ * @memberof google.iam.v1 * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var Policy = { +const Policy = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -113,7 +113,7 @@ var Policy = { * @memberof google.iam.v1 * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var Binding = { +const Binding = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -129,7 +129,7 @@ var Binding = { * @memberof google.iam.v1 * @see [google.iam.v1.PolicyDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var PolicyDelta = { +const PolicyDelta = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -157,6 +157,6 @@ var PolicyDelta = { * @memberof google.iam.v1 * @see [google.iam.v1.BindingDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var BindingDelta = { +const BindingDelta = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js index 5e3640e90d8..b1d6b5e32a9 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js index d700752b7c6..0cb35328962 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js index 51d8f40f54d..1ebe2e6e1a5 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-iot/src/v1/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-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 69eb44fad29..0c5b2049212 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -18,30 +18,30 @@ const assert = require('assert'); const iotModule = require('../src'); -var FAKE_STATUS_CODE = 1; -var error = new Error(); +const FAKE_STATUS_CODE = 1; +const error = new Error(); error.code = FAKE_STATUS_CODE; describe('DeviceManagerClient', () => { describe('createDeviceRegistry', () => { it('invokes createDeviceRegistry without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var deviceRegistry = {}; - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const deviceRegistry = {}; + const request = { parent: formattedParent, deviceRegistry: deviceRegistry, }; // Mock response - var id = 'id3355'; - var name = 'name3373707'; - var expectedResponse = { + const id = 'id3355'; + const name = 'name3373707'; + const expectedResponse = { id: id, name: name, }; @@ -60,15 +60,15 @@ describe('DeviceManagerClient', () => { }); it('invokes createDeviceRegistry with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var deviceRegistry = {}; - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const deviceRegistry = {}; + const request = { parent: formattedParent, deviceRegistry: deviceRegistry, }; @@ -91,25 +91,25 @@ describe('DeviceManagerClient', () => { describe('getDeviceRegistry', () => { it('invokes getDeviceRegistry without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.registryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var id = 'id3355'; - var name2 = 'name2-1052831874'; - var expectedResponse = { + const id = 'id3355'; + const name2 = 'name2-1052831874'; + const expectedResponse = { id: id, name: name2, }; @@ -128,18 +128,18 @@ describe('DeviceManagerClient', () => { }); it('invokes getDeviceRegistry with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.registryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { name: formattedName, }; @@ -161,23 +161,23 @@ describe('DeviceManagerClient', () => { describe('updateDeviceRegistry', () => { it('invokes updateDeviceRegistry without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var deviceRegistry = {}; - var updateMask = {}; - var request = { + const deviceRegistry = {}; + const updateMask = {}; + const request = { deviceRegistry: deviceRegistry, updateMask: updateMask, }; // Mock response - var id = 'id3355'; - var name = 'name3373707'; - var expectedResponse = { + const id = 'id3355'; + const name = 'name3373707'; + const expectedResponse = { id: id, name: name, }; @@ -196,15 +196,15 @@ describe('DeviceManagerClient', () => { }); it('invokes updateDeviceRegistry with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var deviceRegistry = {}; - var updateMask = {}; - var request = { + const deviceRegistry = {}; + const updateMask = {}; + const request = { deviceRegistry: deviceRegistry, updateMask: updateMask, }; @@ -227,18 +227,18 @@ describe('DeviceManagerClient', () => { describe('deleteDeviceRegistry', () => { it('invokes deleteDeviceRegistry without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.registryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { name: formattedName, }; @@ -254,18 +254,18 @@ describe('DeviceManagerClient', () => { }); it('invokes deleteDeviceRegistry with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.registryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { name: formattedName, }; @@ -286,22 +286,22 @@ describe('DeviceManagerClient', () => { describe('listDeviceRegistries', () => { it('invokes listDeviceRegistries without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var deviceRegistriesElement = {}; - var deviceRegistries = [deviceRegistriesElement]; - var expectedResponse = { + const nextPageToken = ''; + const deviceRegistriesElement = {}; + const deviceRegistries = [deviceRegistriesElement]; + const expectedResponse = { nextPageToken: nextPageToken, deviceRegistries: deviceRegistries, }; @@ -324,14 +324,14 @@ describe('DeviceManagerClient', () => { }); it('invokes listDeviceRegistries with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - var request = { + const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); + const request = { parent: formattedParent, }; @@ -353,29 +353,29 @@ describe('DeviceManagerClient', () => { describe('createDevice', () => { it('invokes createDevice without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.registryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var device = {}; - var request = { + const device = {}; + const request = { parent: formattedParent, device: device, }; // Mock response - var id = 'id3355'; - var name = 'name3373707'; - var numId = 1034366860; - var blocked = true; - var expectedResponse = { + const id = 'id3355'; + const name = 'name3373707'; + const numId = 1034366860; + const blocked = true; + const expectedResponse = { id: id, name: name, numId: numId, @@ -396,19 +396,19 @@ describe('DeviceManagerClient', () => { }); it('invokes createDevice with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.registryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var device = {}; - var request = { + const device = {}; + const request = { parent: formattedParent, device: device, }; @@ -431,28 +431,28 @@ describe('DeviceManagerClient', () => { describe('getDevice', () => { it('invokes getDevice without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var id = 'id3355'; - var name2 = 'name2-1052831874'; - var numId = 1034366860; - var blocked = true; - var expectedResponse = { + const id = 'id3355'; + const name2 = 'name2-1052831874'; + const numId = 1034366860; + const blocked = true; + const expectedResponse = { id: id, name: name2, numId: numId, @@ -473,19 +473,19 @@ describe('DeviceManagerClient', () => { }); it('invokes getDevice with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; @@ -507,25 +507,25 @@ describe('DeviceManagerClient', () => { describe('updateDevice', () => { it('invokes updateDevice without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var device = {}; - var updateMask = {}; - var request = { + const device = {}; + const updateMask = {}; + const request = { device: device, updateMask: updateMask, }; // Mock response - var id = 'id3355'; - var name = 'name3373707'; - var numId = 1034366860; - var blocked = true; - var expectedResponse = { + const id = 'id3355'; + const name = 'name3373707'; + const numId = 1034366860; + const blocked = true; + const expectedResponse = { id: id, name: name, numId: numId, @@ -546,15 +546,15 @@ describe('DeviceManagerClient', () => { }); it('invokes updateDevice with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var device = {}; - var updateMask = {}; - var request = { + const device = {}; + const updateMask = {}; + const request = { device: device, updateMask: updateMask, }; @@ -577,19 +577,19 @@ describe('DeviceManagerClient', () => { describe('deleteDevice', () => { it('invokes deleteDevice without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; @@ -603,19 +603,19 @@ describe('DeviceManagerClient', () => { }); it('invokes deleteDevice with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; @@ -636,26 +636,26 @@ describe('DeviceManagerClient', () => { describe('listDevices', () => { it('invokes listDevices without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.registryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var devicesElement = {}; - var devices = [devicesElement]; - var expectedResponse = { + const nextPageToken = ''; + const devicesElement = {}; + const devices = [devicesElement]; + const expectedResponse = { nextPageToken: nextPageToken, devices: devices, }; @@ -678,18 +678,18 @@ describe('DeviceManagerClient', () => { }); it('invokes listDevices with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.registryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { parent: formattedParent, }; @@ -711,28 +711,28 @@ describe('DeviceManagerClient', () => { describe('modifyCloudToDeviceConfig', () => { it('invokes modifyCloudToDeviceConfig without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var binaryData = '40'; - var request = { + const binaryData = '40'; + const request = { name: formattedName, binaryData: binaryData, }; // Mock response - var version = 351608024; - var binaryData2 = '-37'; - var expectedResponse = { + const version = 351608024; + const binaryData2 = '-37'; + const expectedResponse = { version: version, binaryData: binaryData2, }; @@ -751,20 +751,20 @@ describe('DeviceManagerClient', () => { }); it('invokes modifyCloudToDeviceConfig with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var binaryData = '40'; - var request = { + const binaryData = '40'; + const request = { name: formattedName, binaryData: binaryData, }; @@ -787,24 +787,24 @@ describe('DeviceManagerClient', () => { describe('listDeviceConfigVersions', () => { it('invokes listDeviceConfigVersions without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( @@ -820,19 +820,19 @@ describe('DeviceManagerClient', () => { }); it('invokes listDeviceConfigVersions with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; @@ -854,24 +854,24 @@ describe('DeviceManagerClient', () => { describe('listDeviceStates', () => { it('invokes listDeviceStates without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( @@ -887,19 +887,19 @@ describe('DeviceManagerClient', () => { }); it('invokes listDeviceStates with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.devicePath( + const formattedName = client.devicePath( '[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]' ); - var request = { + const request = { name: formattedName, }; @@ -921,27 +921,27 @@ describe('DeviceManagerClient', () => { describe('setIamPolicy', () => { it('invokes setIamPolicy without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResource = client.registryPath( + const formattedResource = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var policy = {}; - var request = { + const policy = {}; + const request = { resource: formattedResource, policy: policy, }; // Mock response - var version = 351608024; - var etag = '21'; - var expectedResponse = { + const version = 351608024; + const etag = '21'; + const expectedResponse = { version: version, etag: etag, }; @@ -960,19 +960,19 @@ describe('DeviceManagerClient', () => { }); it('invokes setIamPolicy with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResource = client.registryPath( + const formattedResource = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var policy = {}; - var request = { + const policy = {}; + const request = { resource: formattedResource, policy: policy, }; @@ -995,25 +995,25 @@ describe('DeviceManagerClient', () => { describe('getIamPolicy', () => { it('invokes getIamPolicy without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResource = client.registryPath( + const formattedResource = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { resource: formattedResource, }; // Mock response - var version = 351608024; - var etag = '21'; - var expectedResponse = { + const version = 351608024; + const etag = '21'; + const expectedResponse = { version: version, etag: etag, }; @@ -1032,18 +1032,18 @@ describe('DeviceManagerClient', () => { }); it('invokes getIamPolicy with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResource = client.registryPath( + const formattedResource = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var request = { + const request = { resource: formattedResource, }; @@ -1065,25 +1065,25 @@ describe('DeviceManagerClient', () => { describe('testIamPermissions', () => { it('invokes testIamPermissions without error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResource = client.registryPath( + const formattedResource = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var permissions = []; - var request = { + const permissions = []; + const request = { resource: formattedResource, permissions: permissions, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( @@ -1099,19 +1099,19 @@ describe('DeviceManagerClient', () => { }); it('invokes testIamPermissions with error', done => { - var client = new iotModule.v1.DeviceManagerClient({ + const client = new iotModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResource = client.registryPath( + const formattedResource = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' ); - var permissions = []; - var request = { + const permissions = []; + const request = { resource: formattedResource, permissions: permissions, }; From 7e90ed54b6d021dbd71c7197b051a38fa739ecc6 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 18 Sep 2018 13:04:05 -0700 Subject: [PATCH 042/370] Enable no-var in eslint (#40) * Enable no-var in eslint * no more vars --- packages/google-cloud-iot/.eslintrc.yml | 1 + .../google-cloud-iot/samples/quickstart.js | 26 +++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-iot/.eslintrc.yml b/packages/google-cloud-iot/.eslintrc.yml index bed57fbc42c..65f1dce6c0c 100644 --- a/packages/google-cloud-iot/.eslintrc.yml +++ b/packages/google-cloud-iot/.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-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 7e2e5a46ed6..9f96c85bfe9 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -20,22 +20,22 @@ describe('DeviceManagerSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } - var projectId = process.env.GCLOUD_PROJECT; + const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { const iot = require('@google-cloud/iot'); - var client = new iot.v1.DeviceManagerClient({ + const client = new iot.v1.DeviceManagerClient({ // optional auth parameters. }); // Iterate over all elements. - var formattedParent = client.locationPath(projectId, 'us-central1'); + const formattedParent = client.locationPath(projectId, 'us-central1'); client .listDeviceRegistries({parent: formattedParent}) .then(responses => { - var resources = responses[0]; + let resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } @@ -47,21 +47,21 @@ describe('DeviceManagerSmokeTest', () => { it('successfully makes a call to the service using callbacks', done => { const iot = require('@google-cloud/iot'); - var client = new iot.v1.DeviceManagerClient({ + const client = new iot.v1.DeviceManagerClient({ // optional auth parameters. }); // Or obtain the paged response. - var formattedParent = client.locationPath(projectId, 'us-central1'); + const formattedParent = client.locationPath(projectId, 'us-central1'); - 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) { console.log(resources[i]); } @@ -80,11 +80,11 @@ describe('DeviceManagerSmokeTest', () => { it('successfully makes a call to the service using streaming', done => { const iot = require('@google-cloud/iot'); - var client = new iot.v1.DeviceManagerClient({ + const client = new iot.v1.DeviceManagerClient({ // optional auth parameters. }); - var formattedParent = client.locationPath(projectId, 'us-central1'); + const formattedParent = client.locationPath(projectId, 'us-central1'); client .listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { From 07cf1a3c83d3c337e74c3a66e7b4d9fdaa07a96e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 12:29:07 -0700 Subject: [PATCH 043/370] Enable prefer-const in the eslint config (#41) --- packages/google-cloud-iot/.eslintrc.yml | 1 + .../google-cloud-iot/samples/quickstart.js | 2 +- .../smoke-test/device_manager_smoke_test.js | 20 ++++++++++--------- .../src/v1/device_manager_client.js | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-iot/.eslintrc.yml b/packages/google-cloud-iot/.eslintrc.yml index 65f1dce6c0c..73eeec27612 100644 --- a/packages/google-cloud-iot/.eslintrc.yml +++ b/packages/google-cloud-iot/.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-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 9f96c85bfe9..2de3461409d 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -35,7 +35,7 @@ describe('DeviceManagerSmokeTest', () => { client .listDeviceRegistries({parent: formattedParent}) .then(responses => { - let resources = responses[0]; + const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index a59a8318324..0391ad4cb3c 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -16,7 +16,7 @@ describe('DeviceManagerSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { - throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); + throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } const projectId = process.env.GCLOUD_PROJECT; @@ -28,9 +28,10 @@ describe('DeviceManagerSmokeTest', () => { }); // Iterate over all elements. - const formattedParent = client.locationPath(projectId, "us-central1"); + const formattedParent = client.locationPath(projectId, 'us-central1'); - client.listDeviceRegistries({parent: formattedParent}) + client + .listDeviceRegistries({parent: formattedParent}) .then(responses => { const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -49,8 +50,7 @@ describe('DeviceManagerSmokeTest', () => { }); // Or obtain the paged response. - const formattedParent = client.locationPath(projectId, "us-central1"); - + const formattedParent = client.locationPath(projectId, 'us-central1'); const options = {autoPaginate: false}; const callback = responses => { @@ -67,8 +67,9 @@ describe('DeviceManagerSmokeTest', () => { // Fetch the next page. return client.listDeviceRegistries(nextRequest, options).then(callback); } - } - client.listDeviceRegistries({parent: formattedParent}, options) + }; + client + .listDeviceRegistries({parent: formattedParent}, options) .then(callback) .then(done) .catch(done); @@ -81,8 +82,9 @@ describe('DeviceManagerSmokeTest', () => { // optional auth parameters. }); - const formattedParent = client.locationPath(projectId, "us-central1"); - client.listDeviceRegistriesStream({parent: formattedParent}) + const formattedParent = client.locationPath(projectId, 'us-central1'); + client + .listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); }) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index b1d87fa75e9..544add784dd 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -168,7 +168,7 @@ class DeviceManagerClient { 'getIamPolicy', 'testIamPermissions', ]; - for (let methodName of deviceManagerStubMethods) { + for (const methodName of deviceManagerStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( deviceManagerStub.then( stub => From 39f52a52c7132c62cd29a31071ec1915df26fc34 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 21 Sep 2018 17:31:44 -0700 Subject: [PATCH 044/370] Update the CI config (#43) --- .../.circleci/npm-install-retry.js | 2 +- .../smoke-test/device_manager_smoke_test.js | 20 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/npm-install-retry.js b/packages/google-cloud-iot/.circleci/npm-install-retry.js index ae3220d7348..3240aa2cbf2 100755 --- a/packages/google-cloud-iot/.circleci/npm-install-retry.js +++ b/packages/google-cloud-iot/.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-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index 0391ad4cb3c..a59a8318324 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -16,7 +16,7 @@ describe('DeviceManagerSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { - throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); + throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); } const projectId = process.env.GCLOUD_PROJECT; @@ -28,10 +28,9 @@ describe('DeviceManagerSmokeTest', () => { }); // Iterate over all elements. - const formattedParent = client.locationPath(projectId, 'us-central1'); + const formattedParent = client.locationPath(projectId, "us-central1"); - client - .listDeviceRegistries({parent: formattedParent}) + client.listDeviceRegistries({parent: formattedParent}) .then(responses => { const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -50,7 +49,8 @@ describe('DeviceManagerSmokeTest', () => { }); // Or obtain the paged response. - const formattedParent = client.locationPath(projectId, 'us-central1'); + const formattedParent = client.locationPath(projectId, "us-central1"); + const options = {autoPaginate: false}; const callback = responses => { @@ -67,9 +67,8 @@ describe('DeviceManagerSmokeTest', () => { // Fetch the next page. return client.listDeviceRegistries(nextRequest, options).then(callback); } - }; - client - .listDeviceRegistries({parent: formattedParent}, options) + } + client.listDeviceRegistries({parent: formattedParent}, options) .then(callback) .then(done) .catch(done); @@ -82,9 +81,8 @@ describe('DeviceManagerSmokeTest', () => { // optional auth parameters. }); - const formattedParent = client.locationPath(projectId, 'us-central1'); - client - .listDeviceRegistriesStream({parent: formattedParent}) + const formattedParent = client.locationPath(projectId, "us-central1"); + client.listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); }) From 6376687fef7cabbb4fbde626d993cc076c8a2c4d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 24 Sep 2018 17:00:05 -0700 Subject: [PATCH 045/370] test: remove appveyor config (#44) --- packages/google-cloud-iot/.appveyor.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 packages/google-cloud-iot/.appveyor.yml diff --git a/packages/google-cloud-iot/.appveyor.yml b/packages/google-cloud-iot/.appveyor.yml deleted file mode 100644 index 24082152655..00000000000 --- a/packages/google-cloud-iot/.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 886416d553f2309c04706a25dfededb6984bbbba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 1 Oct 2018 05:02:17 -0700 Subject: [PATCH 046/370] chore(deps): update dependency eslint-plugin-prettier to v3 (#48) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1e972a4be80..540afefcc5b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -52,7 +52,7 @@ "eslint": "^5.0.1", "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", - "eslint-plugin-prettier": "^2.6.1", + "eslint-plugin-prettier": "^3.0.0", "extend": "^3.0.1", "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", From 7542414dc5c407277d0231a734a243a23ad934f7 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 2 Oct 2018 08:22:05 -0700 Subject: [PATCH 047/370] Update kokoro config (#49) --- packages/google-cloud-iot/.circleci/config.yml | 2 -- packages/google-cloud-iot/codecov.yaml | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-iot/codecov.yaml diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index 8af6a4d0489..da54155fc57 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.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-iot/codecov.yaml b/packages/google-cloud-iot/codecov.yaml new file mode 100644 index 00000000000..5724ea9478d --- /dev/null +++ b/packages/google-cloud-iot/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com From 98e7f5995ab9dc2cf077d970ab670bde932cb3a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 28 Oct 2018 08:34:03 -0700 Subject: [PATCH 048/370] chore(deps): update dependency eslint-plugin-node to v8 (#61) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 540afefcc5b..dfa99eff54f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -51,7 +51,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.1", "eslint-config-prettier": "^3.0.0", - "eslint-plugin-node": "^7.0.0", + "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "extend": "^3.0.1", "ink-docstrap": "^1.3.2", From bacf2a12441a80f945e45b91dda98030cb5ea986 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 30 Oct 2018 10:00:34 -0700 Subject: [PATCH 049/370] chore: include build in eslintignore (#65) --- packages/google-cloud-iot/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore index f6fac98b0a8..f08b0fd1c65 100644 --- a/packages/google-cloud-iot/.eslintignore +++ b/packages/google-cloud-iot/.eslintignore @@ -1,3 +1,4 @@ node_modules/* samples/node_modules/* src/**/doc/* +build/ From f9ebbc5f946eaeb8ad8a5b9bab00841f38fbc85e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 1 Nov 2018 12:02:59 -0700 Subject: [PATCH 050/370] chore: update CircleCI config (#68) --- packages/google-cloud-iot/.circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index da54155fc57..6735ebdaaa1 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.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 6513ca6c3841edc891e153052e9eb21b8e568c02 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 7 Nov 2018 08:40:53 -0800 Subject: [PATCH 051/370] chore(deps): update dependency through2 to v3 (#69) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index dfa99eff54f..4cfa60eae81 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -61,6 +61,6 @@ "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.7", - "through2": "^2.0.3" + "through2": "^3.0.0" } } From 3a74e7070647af7ff4beb24caa011683ce790c55 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 9 Nov 2018 10:00:30 -0800 Subject: [PATCH 052/370] chore: drop contributors from multiple places (#72) --- packages/google-cloud-iot/CONTRIBUTORS | 6 ------ packages/google-cloud-iot/package.json | 3 --- 2 files changed, 9 deletions(-) delete mode 100644 packages/google-cloud-iot/CONTRIBUTORS diff --git a/packages/google-cloud-iot/CONTRIBUTORS b/packages/google-cloud-iot/CONTRIBUTORS deleted file mode 100644 index 297ddb26758..00000000000 --- a/packages/google-cloud-iot/CONTRIBUTORS +++ /dev/null @@ -1,6 +0,0 @@ -# The names of individuals who have contributed to this project. -# -# Names are formatted as: -# name -# -Chris Wilcox diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 4cfa60eae81..32c783113b7 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -28,9 +28,6 @@ "iot", "Cloud IoT API" ], - "contributors": [ - "Chris Wilcox " - ], "scripts": { "test": "npm run cover", "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", From 2bdfc81b9d19d3e5e198715dcdb8bb640be998ad Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 9 Nov 2018 15:16:52 -0800 Subject: [PATCH 053/370] chore: remove unused deps (#71) --- packages/google-cloud-iot/package.json | 13 +++++------- .../google-cloud-iot/samples/.eslintrc.yml | 1 + .../google-cloud-iot/samples/package.json | 4 +--- .../smoke-test/device_manager_smoke_test.js | 20 ++++++++++--------- packages/google-cloud-iot/synth.py | 12 ++++------- .../system-test/.eslintrc.yml | 3 --- packages/google-cloud-iot/test/.eslintrc.yml | 2 -- 7 files changed, 22 insertions(+), 33 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 32c783113b7..33d8c1751b6 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" }, "repository": "googleapis/nodejs-iot", "main": "src/index.js", @@ -33,10 +33,10 @@ "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "test-no-cover": "mocha test/*.js --timeout 600000", - "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", + "lint": "eslint '**/*.js'", "docs": "jsdoc -c .jsdoc.js", - "system-test": "mocha system-test/*.js --timeout 600000" + "system-test": "mocha system-test/*.js --timeout 600000", + "fix": "eslint --fix '**/*.js'" }, "dependencies": { "google-gax": "^0.20.0", @@ -44,20 +44,17 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", - "async": "^2.6.1", "codecov": "^3.0.2", "eslint": "^5.0.1", "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "extend": "^3.0.1", "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", "nyc": "^13.0.0", "power-assert": "^1.6.0", - "prettier": "^1.13.7", - "through2": "^3.0.0" + "prettier": "^1.13.7" } } diff --git a/packages/google-cloud-iot/samples/.eslintrc.yml b/packages/google-cloud-iot/samples/.eslintrc.yml index 282535f55f6..0aa37ac630e 100644 --- a/packages/google-cloud-iot/samples/.eslintrc.yml +++ b/packages/google-cloud-iot/samples/.eslintrc.yml @@ -1,3 +1,4 @@ --- rules: no-console: off + node/no-missing-require: off diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 27f271b13d7..efb061a08e2 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -14,9 +14,7 @@ "**/*.test.js" ] }, - "scripts": {}, "dependencies": { "@google-cloud/iot": "^0.1.0" - }, - "devDependencies": {} + } } diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index a59a8318324..0391ad4cb3c 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -16,7 +16,7 @@ describe('DeviceManagerSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { - throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); + throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } const projectId = process.env.GCLOUD_PROJECT; @@ -28,9 +28,10 @@ describe('DeviceManagerSmokeTest', () => { }); // Iterate over all elements. - const formattedParent = client.locationPath(projectId, "us-central1"); + const formattedParent = client.locationPath(projectId, 'us-central1'); - client.listDeviceRegistries({parent: formattedParent}) + client + .listDeviceRegistries({parent: formattedParent}) .then(responses => { const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -49,8 +50,7 @@ describe('DeviceManagerSmokeTest', () => { }); // Or obtain the paged response. - const formattedParent = client.locationPath(projectId, "us-central1"); - + const formattedParent = client.locationPath(projectId, 'us-central1'); const options = {autoPaginate: false}; const callback = responses => { @@ -67,8 +67,9 @@ describe('DeviceManagerSmokeTest', () => { // Fetch the next page. return client.listDeviceRegistries(nextRequest, options).then(callback); } - } - client.listDeviceRegistries({parent: formattedParent}, options) + }; + client + .listDeviceRegistries({parent: formattedParent}, options) .then(callback) .then(done) .catch(done); @@ -81,8 +82,9 @@ describe('DeviceManagerSmokeTest', () => { // optional auth parameters. }); - const formattedParent = client.locationPath(projectId, "us-central1"); - client.listDeviceRegistriesStream({parent: formattedParent}) + const formattedParent = client.locationPath(projectId, 'us-central1'); + client + .listDeviceRegistriesStream({parent: formattedParent}) .on('data', element => { console.log(element); }) diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index b4a9ebbc109..1cb6bb63d21 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -17,14 +17,11 @@ import synthtool as s import synthtool.gcp as gcp import logging -from pathlib import Path import subprocess logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() -common_templates = gcp.CommonTemplates() - library = gapic.node_library( 'iot', 'v1', config_path="/google/cloud/iot/" @@ -49,12 +46,11 @@ parent: request.parent, });\n\g<2>''') -templates = common_templates.node_library(package_name="@google-cloud/automl") +# Copy common templated files +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']) diff --git a/packages/google-cloud-iot/system-test/.eslintrc.yml b/packages/google-cloud-iot/system-test/.eslintrc.yml index 2e6882e46d2..6db2a46c535 100644 --- a/packages/google-cloud-iot/system-test/.eslintrc.yml +++ b/packages/google-cloud-iot/system-test/.eslintrc.yml @@ -1,6 +1,3 @@ --- env: mocha: true -rules: - node/no-unpublished-require: off - no-console: off diff --git a/packages/google-cloud-iot/test/.eslintrc.yml b/packages/google-cloud-iot/test/.eslintrc.yml index 73f7bbc946f..6db2a46c535 100644 --- a/packages/google-cloud-iot/test/.eslintrc.yml +++ b/packages/google-cloud-iot/test/.eslintrc.yml @@ -1,5 +1,3 @@ --- env: mocha: true -rules: - node/no-unpublished-require: off From 15c897c0bf497872864c29055a16e4766518a169 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 10 Nov 2018 10:49:42 -0800 Subject: [PATCH 054/370] chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#73) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 33d8c1751b6..aafe715b82a 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -43,7 +43,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.2", "eslint": "^5.0.1", "eslint-config-prettier": "^3.0.0", From e9e32f9d5238ff8c1f0a96465fb9bdbe7a1ff92a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 12 Nov 2018 15:54:15 -0800 Subject: [PATCH 055/370] chore: update eslintignore config (#74) --- packages/google-cloud-iot/.eslintignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore index f08b0fd1c65..2f642cb6044 100644 --- a/packages/google-cloud-iot/.eslintignore +++ b/packages/google-cloud-iot/.eslintignore @@ -1,4 +1,3 @@ -node_modules/* -samples/node_modules/* +**/node_modules src/**/doc/* build/ From e2c6ac2c2282c95be464f2f20325c971c81d6ab1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 15 Nov 2018 12:16:06 -0800 Subject: [PATCH 056/370] fix(deps): update dependency google-gax to ^0.22.0 (#75) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index aafe715b82a..9ded4b76886 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -39,7 +39,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.20.0", + "google-gax": "^0.22.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 2cad50f14d7380cf0dde5ffb22743204b0439ddd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 19 Nov 2018 09:13:41 -0800 Subject: [PATCH 057/370] chore: add a synth.metadata chore: add a synth.metadata --- packages/google-cloud-iot/synth.metadata | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/google-cloud-iot/synth.metadata diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata new file mode 100644 index 00000000000..f26e69af884 --- /dev/null +++ b/packages/google-cloud-iot/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 ae1fe47f03996af0c4e10433f2f503be1ee2dcca Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 22 Nov 2018 13:48:28 -0800 Subject: [PATCH 058/370] feat: add enhanced gateway features (#80) --- .../google/cloud/iot/v1/device_manager.proto | 183 ++++++++++-- .../google/cloud/iot/v1/resources.proto | 92 ++++++- .../src/v1/device_manager_client.js | 260 ++++++++++++++++-- .../src/v1/device_manager_client_config.json | 15 + .../google/cloud/iot/v1/doc_device_manager.js | 170 ++++++++++-- .../doc/google/cloud/iot/v1/doc_resources.js | 151 ++++++++++ packages/google-cloud-iot/test/gapic-v1.js | 217 +++++++++++++++ 7 files changed, 1032 insertions(+), 56 deletions(-) diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto index dd9f994107e..12e5a973dd7 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2018 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -24,6 +25,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot"; @@ -32,8 +34,7 @@ option java_outer_classname = "DeviceManagerProto"; option java_package = "com.google.cloud.iot.v1"; -// Internet of things (IoT) service. Allows to manipulate device registry -// instances and the registration of devices (Things) to the cloud. +// Internet of Things (IoT) service. Securely connect and manage IoT devices. service DeviceManager { // Creates a device registry that contains devices. rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) { @@ -106,9 +107,6 @@ service DeviceManager { rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" - } }; } @@ -117,7 +115,7 @@ service DeviceManager { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/registries/*}/devices" additional_bindings { - get: "/v1/{parent=projects/*/locations/*/groups/*}/devices" + get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" } }; } @@ -198,6 +196,54 @@ service DeviceManager { } }; } + + // Sends a command to the specified device. In order for a device to be able + // to receive commands, it must: + // 1) be connected to Cloud IoT Core using the MQTT protocol, and + // 2) be subscribed to the group of MQTT topics specified by + // /devices/{device-id}/commands/#. This subscription will receive commands + // at the top-level topic /devices/{device-id}/commands as well as commands + // for subfolders, like /devices/{device-id}/commands/subfolder. + // Note that subscribing to specific subfolders is not supported. + // If the command could not be delivered to the device, this method will + // return an error; in particular, if the device is not subscribed, this + // method will return FAILED_PRECONDITION. Otherwise, this method will + // return OK. If the subscription is QoS 1, at least once delivery will be + // guaranteed; for QoS 0, no acknowledgment will be expected from the device. + rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice" + body: "*" + } + }; + } + + // Associates the device with the gateway. + rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway" + body: "*" + } + }; + } + + // Deletes the association between the device and the gateway. + rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway" + body: "*" + } + }; + } } // Request for `CreateDeviceRegistry`. @@ -249,13 +295,13 @@ message ListDeviceRegistriesRequest { // The maximum number of registries to return in the response. If this value // is zero, the service will select a default size. A call may return fewer - // objects than requested, but if there is a non-empty `page_token`, it - // indicates that more entries are available. + // objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. int32 page_size = 2; // The value returned by the last `ListDeviceRegistriesResponse`; indicates - // that this is a continuation of a prior `ListDeviceRegistries` call, and - // that the system should return the next page of data. + // that this is a continuation of a prior `ListDeviceRegistries` call and + // the system should return the next page of data. string page_token = 3; } @@ -278,7 +324,7 @@ message CreateDeviceRequest { string parent = 1; // The device registration details. The field `name` must be empty. The server - // will generate that field from the device registry `id` provided and the + // generates `name` from the device registry `id` and the // `parent` field. Device device = 2; } @@ -297,7 +343,7 @@ message GetDeviceRequest { // Request for `UpdateDevice`. message UpdateDeviceRequest { - // The new values for the device registry. The `id` and `num_id` fields must + // The new values for the device. The `id` and `num_id` fields must // be empty, and the field `name` must specify the name path. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0`or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. @@ -324,32 +370,58 @@ message ListDevicesRequest { // `projects/my-project/locations/us-central1/registries/my-registry`. string parent = 1; - // A list of device numerical ids. If empty, it will ignore this field. This - // field cannot hold more than 10,000 entries. + // A list of device numeric IDs. If empty, this field is ignored. Maximum + // IDs: 10,000. repeated uint64 device_num_ids = 2; - // A list of device string identifiers. If empty, it will ignore this field. - // For example, `['device0', 'device12']`. This field cannot hold more than - // 10,000 entries. + // A list of device string IDs. For example, `['device0', 'device12']`. + // If empty, this field is ignored. Maximum IDs: 10,000 repeated string device_ids = 3; // The fields of the `Device` resource to be returned in the response. The - // fields `id`, and `num_id` are always returned by default, along with any + // fields `id` and `num_id` are always returned, along with any // other fields specified. google.protobuf.FieldMask field_mask = 4; + // Options related to gateways. + GatewayListOptions gateway_list_options = 6; + // The maximum number of devices to return in the response. If this value // is zero, the service will select a default size. A call may return fewer - // objects than requested, but if there is a non-empty `page_token`, it - // indicates that more entries are available. + // objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. int32 page_size = 100; // The value returned by the last `ListDevicesResponse`; indicates - // that this is a continuation of a prior `ListDevices` call, and - // that the system should return the next page of data. + // that this is a continuation of a prior `ListDevices` call and + // the system should return the next page of data. string page_token = 101; } +// Options for limiting the list based on gateway type and associations. +message GatewayListOptions { + // If not set, all devices and gateways are returned. If set, the list is + // filtered based on gateway type and associations. + oneof filter { + // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + // is specified, only non-gateway devices are returned. If + // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. + GatewayType gateway_type = 1; + + // If set, only devices associated with the specified gateway are returned. + // The gateway ID can be numeric (`num_id`) or the user-defined string + // (`id`). For example, if `123` is specified, only devices bound to the + // gateway with `num_id` 123 are returned. + string associations_gateway_id = 2; + + // If set, returns only the gateways with which the specified device is + // associated. The device ID can be numeric (`num_id`) or the user-defined + // string (`id`). For example, if `456` is specified, returns only the + // gateways to which the device with `num_id` 456 is bound. + string associations_device_id = 3; + } +} + // Response for `ListDevices`. message ListDevicesResponse { // The devices that match the request. @@ -417,3 +489,68 @@ message ListDeviceStatesResponse { // update time, starting from the most recent one. repeated DeviceState device_states = 1; } + +// Request for `SendCommandToDevice`. +message SendCommandToDeviceRequest { + // The name of the device. For example, + // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + string name = 1; + + // The command data to send to the device. + bytes binary_data = 2; + + // Optional subfolder for the command. If empty, the command will be delivered + // to the /devices/{device-id}/commands topic, otherwise it will be delivered + // to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + // subfolders are allowed. This field must not have more than 256 characters, + // and must not contain any MQTT wildcards ("+" or "#") or null characters. + string subfolder = 3; +} + +// Response for `SendCommandToDevice`. +message SendCommandToDeviceResponse { + +} + +// Request for `BindDeviceToGateway`. +message BindDeviceToGatewayRequest { + // The name of the registry. For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + string parent = 1; + + // The value of `gateway_id` can be either the device numeric ID or the + // user-defined device identifier. + string gateway_id = 2; + + // The device to associate with the specified gateway. The value of + // `device_id` can be either the device numeric ID or the user-defined device + // identifier. + string device_id = 3; +} + +// Response for `BindDeviceToGateway`. +message BindDeviceToGatewayResponse { + +} + +// Request for `UnbindDeviceFromGateway`. +message UnbindDeviceFromGatewayRequest { + // The name of the registry. For example, + // `projects/example-project/locations/us-central1/registries/my-registry`. + string parent = 1; + + // The value of `gateway_id` can be either the device numeric ID or the + // user-defined device identifier. + string gateway_id = 2; + + // The device to disassociate from the specified gateway. The value of + // `device_id` can be either the device numeric ID or the user-defined device + // identifier. + string device_id = 3; +} + +// Response for `UnbindDeviceFromGateway`. +message UnbindDeviceFromGatewayResponse { + +} diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto index 54294763707..a362ca26b39 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2018 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -106,6 +107,12 @@ message Device { // has been reported, this field is not present. DeviceState state = 16; + // **Beta Feature** + // + // The logging verbosity for device activity. If unspecified, + // DeviceRegistry.log_level will be used. + LogLevel log_level = 21; + // The metadata key-value pairs assigned to the device. This metadata is not // interpreted or indexed by Cloud IoT Core. It can be used to add contextual // information for the device. @@ -119,6 +126,26 @@ message Device { // The total size of all keys and values must be less than 256 KB, and the // maximum number of key-value pairs is 500. map metadata = 17; + + // Gateway-related configuration and state. + GatewayConfig gateway_config = 24; +} + +// Gateway-related configuration and state. +message GatewayConfig { + // Indicates whether the device is a gateway. + GatewayType gateway_type = 1; + + // Indicates how to authorize and/or authenticate devices to access the + // gateway. + GatewayAuthMethod gateway_auth_method = 2; + + // [Output only] The ID of the gateway the device accessed most recently. + string last_accessed_gateway_id = 3; + + // [Output only] The most recent time at which the device accessed the gateway + // specified in `last_accessed_gateway`. + google.protobuf.Timestamp last_accessed_gateway_time = 4; } // A container for a group of devices. @@ -155,6 +182,12 @@ message DeviceRegistry { // The DeviceService (HTTP) configuration for this device registry. HttpConfig http_config = 9; + // **Beta Feature** + // + // The default logging verbosity for activity from devices in this registry. + // The verbosity level can be overridden by Device.log_level. + LogLevel log_level = 11; + // The credentials used to verify the device credentials. No more than 10 // credentials can be bound to a single registry at a time. The verification // process occurs at the time of device creation or update. If this field is @@ -342,6 +375,63 @@ enum HttpState { HTTP_DISABLED = 2; } +// **Beta Feature** +// +// The logging verbosity for device activity. Specifies which events should be +// written to logs. For example, if the LogLevel is ERROR, only events that +// terminate in errors will be logged. LogLevel is inclusive; enabling INFO +// logging will also enable ERROR logging. +enum LogLevel { + // No logging specified. If not specified, logging will be disabled. + LOG_LEVEL_UNSPECIFIED = 0; + + // Disables logging. + NONE = 10; + + // Error events will be logged. + ERROR = 20; + + // Informational events will be logged, such as connections and + // disconnections. + INFO = 30; + + // All events will be logged. + DEBUG = 40; +} + +// Gateway type. +enum GatewayType { + // If unspecified, the device is considered a non-gateway device. + GATEWAY_TYPE_UNSPECIFIED = 0; + + // The device is a gateway. + GATEWAY = 1; + + // The device is not a gateway. + NON_GATEWAY = 2; +} + +// The gateway authorization/authentication method. This setting determines how +// Cloud IoT Core authorizes/authenticate devices to access the gateway. +enum GatewayAuthMethod { + // No authentication/authorization method specified. No devices are allowed to + // access the gateway. + GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; + + // The device is authenticated through the gateway association only. Device + // credentials are ignored even if provided. + ASSOCIATION_ONLY = 1; + + // The device is authenticated through its own credentials. Gateway + // association is not checked. + DEVICE_AUTH_TOKEN_ONLY = 2; + + // The device is authenticated through both device credentials and gateway + // association. The device must be bound to the gateway and must provide its + // own credentials. + ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; +} + // The supported formats for the public key. enum PublicKeyCertificateFormat { // The format has not been specified. This is an invalid default value and diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 544add784dd..47a83a15a68 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -22,8 +22,7 @@ const path = require('path'); const VERSION = require('../../package.json').version; /** - * Internet of things (IoT) service. Allows to manipulate device registry - * instances and the registration of devices (Things) to the cloud. + * Internet of Things (IoT) service. Securely connect and manage IoT devices. * * @class * @memberof v1 @@ -167,6 +166,9 @@ class DeviceManagerClient { 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', + 'sendCommandToDevice', + 'bindDeviceToGateway', + 'unbindDeviceFromGateway', ]; for (const methodName of deviceManagerStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( @@ -632,7 +634,7 @@ class DeviceManagerClient { * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {Object} request.device * The device registration details. The field `name` must be empty. The server - * will generate that field from the device registry `id` provided and the + * generates `name` from the device registry `id` and the * `parent` field. * * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} @@ -753,7 +755,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.device - * The new values for the device registry. The `id` and `num_id` fields must + * The new values for the device. The `id` and `num_id` fields must * be empty, and the field `name` must specify the name path. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. @@ -873,18 +875,21 @@ class DeviceManagerClient { * The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * @param {number[]} [request.deviceNumIds] - * A list of device numerical ids. If empty, it will ignore this field. This - * field cannot hold more than 10,000 entries. + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. * @param {string[]} [request.deviceIds] - * A list of device string identifiers. If empty, it will ignore this field. - * For example, `['device0', 'device12']`. This field cannot hold more than - * 10,000 entries. + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 * @param {Object} [request.fieldMask] * The fields of the `Device` resource to be returned in the response. The - * fields `id`, and `num_id` are always returned by default, along with any + * fields `id` and `num_id` are always returned, along with any * other fields specified. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @param {Object} [request.gatewayListOptions] + * Options related to gateways. + * + * This object should have the same structure as [GatewayListOptions]{@link google.cloud.iot.v1.GatewayListOptions} * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -998,18 +1003,21 @@ class DeviceManagerClient { * The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * @param {number[]} [request.deviceNumIds] - * A list of device numerical ids. If empty, it will ignore this field. This - * field cannot hold more than 10,000 entries. + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. * @param {string[]} [request.deviceIds] - * A list of device string identifiers. If empty, it will ignore this field. - * For example, `['device0', 'device12']`. This field cannot hold more than - * 10,000 entries. + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 * @param {Object} [request.fieldMask] * The fields of the `Device` resource to be returned in the response. The - * fields `id`, and `num_id` are always returned by default, along with any + * fields `id` and `num_id` are always returned, along with any * other fields specified. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @param {Object} [request.gatewayListOptions] + * Options related to gateways. + * + * This object should have the same structure as [GatewayListOptions]{@link google.cloud.iot.v1.GatewayListOptions} * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -1438,6 +1446,226 @@ class DeviceManagerClient { return this._innerApiCalls.testIamPermissions(request, options, callback); } + /** + * Sends a command to the specified device. In order for a device to be able + * to receive commands, it must: + * 1) be connected to Cloud IoT Core using the MQTT protocol, and + * 2) be subscribed to the group of MQTT topics specified by + * /devices/{device-id}/commands/#. This subscription will receive commands + * at the top-level topic /devices/{device-id}/commands as well as commands + * for subfolders, like /devices/{device-id}/commands/subfolder. + * Note that subscribing to specific subfolders is not supported. + * If the command could not be delivered to the device, this method will + * return an error; in particular, if the device is not subscribed, this + * method will return FAILED_PRECONDITION. Otherwise, this method will + * return OK. If the subscription is QoS 1, at least once delivery will be + * guaranteed; for QoS 0, no acknowledgment will be expected from the device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {string} request.binaryData + * The command data to send to the device. + * @param {string} [request.subfolder] + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * const client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * const binaryData = ''; + * const request = { + * name: formattedName, + * binaryData: binaryData, + * }; + * client.sendCommandToDevice(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + sendCommandToDevice(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.sendCommandToDevice(request, options, callback); + } + + /** + * Associates the device with the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * const client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const gatewayId = ''; + * const deviceId = ''; + * const request = { + * parent: formattedParent, + * gatewayId: gatewayId, + * deviceId: deviceId, + * }; + * client.bindDeviceToGateway(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + bindDeviceToGateway(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.bindDeviceToGateway(request, options, callback); + } + + /** + * Deletes the association between the device and the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const iot = require('@google-cloud/iot'); + * + * const client = new iot.v1.DeviceManagerClient({ + * // optional auth parameters. + * }); + * + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const gatewayId = ''; + * const deviceId = ''; + * const request = { + * parent: formattedParent, + * gatewayId: gatewayId, + * deviceId: deviceId, + * }; + * client.unbindDeviceFromGateway(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + unbindDeviceFromGateway(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + 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.unbindDeviceFromGateway( + request, + options, + callback + ); + } + // -------------------- // -- Path templates -- // -------------------- diff --git a/packages/google-cloud-iot/src/v1/device_manager_client_config.json b/packages/google-cloud-iot/src/v1/device_manager_client_config.json index 028934968df..024d680d160 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client_config.json +++ b/packages/google-cloud-iot/src/v1/device_manager_client_config.json @@ -113,6 +113,21 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "SendCommandToDevice": { + "timeout_millis": 60000, + "retry_codes_name": "rate_limited_aware", + "retry_params_name": "rate_limited_aware" + }, + "BindDeviceToGateway": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UnbindDeviceFromGateway": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js index 1dc6946fde6..7af5ab31c63 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js @@ -104,13 +104,13 @@ const UpdateDeviceRegistryRequest = { * @property {number} pageSize * The maximum number of registries to return in the response. If this value * is zero, the service will select a default size. A call may return fewer - * objects than requested, but if there is a non-empty `page_token`, it - * indicates that more entries are available. + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. * * @property {string} pageToken * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call, and - * that the system should return the next page of data. + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. * * @typedef ListDeviceRegistriesRequest * @memberof google.cloud.iot.v1 @@ -151,7 +151,7 @@ const ListDeviceRegistriesResponse = { * * @property {Object} device * The device registration details. The field `name` must be empty. The server - * will generate that field from the device registry `id` provided and the + * generates `name` from the device registry `id` and the * `parent` field. * * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} @@ -190,7 +190,7 @@ const GetDeviceRequest = { * Request for `UpdateDevice`. * * @property {Object} device - * The new values for the device registry. The `id` and `num_id` fields must + * The new values for the device. The `id` and `num_id` fields must * be empty, and the field `name` must specify the name path. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. @@ -237,31 +237,35 @@ const DeleteDeviceRequest = { * `projects/my-project/locations/us-central1/registries/my-registry`. * * @property {number[]} deviceNumIds - * A list of device numerical ids. If empty, it will ignore this field. This - * field cannot hold more than 10,000 entries. + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. * * @property {string[]} deviceIds - * A list of device string identifiers. If empty, it will ignore this field. - * For example, `['device0', 'device12']`. This field cannot hold more than - * 10,000 entries. + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 * * @property {Object} fieldMask * The fields of the `Device` resource to be returned in the response. The - * fields `id`, and `num_id` are always returned by default, along with any + * fields `id` and `num_id` are always returned, along with any * other fields specified. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * + * @property {Object} gatewayListOptions + * Options related to gateways. + * + * This object should have the same structure as [GatewayListOptions]{@link google.cloud.iot.v1.GatewayListOptions} + * * @property {number} pageSize * The maximum number of devices to return in the response. If this value * is zero, the service will select a default size. A call may return fewer - * objects than requested, but if there is a non-empty `page_token`, it - * indicates that more entries are available. + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. * * @property {string} pageToken * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call, and - * that the system should return the next page of data. + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. * * @typedef ListDevicesRequest * @memberof google.cloud.iot.v1 @@ -271,6 +275,36 @@ const ListDevicesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * Options for limiting the list based on gateway type and associations. + * + * @property {number} gatewayType + * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + * is specified, only non-gateway devices are returned. If + * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. + * + * The number should be among the values of [GatewayType]{@link google.cloud.iot.v1.GatewayType} + * + * @property {string} associationsGatewayId + * If set, only devices associated with the specified gateway are returned. + * The gateway ID can be numeric (`num_id`) or the user-defined string + * (`id`). For example, if `123` is specified, only devices bound to the + * gateway with `num_id` 123 are returned. + * + * @property {string} associationsDeviceId + * If set, returns only the gateways with which the specified device is + * associated. The device ID can be numeric (`num_id`) or the user-defined + * string (`id`). For example, if `456` is specified, returns only the + * gateways to which the device with `num_id` 456 is bound. + * + * @typedef GatewayListOptions + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.GatewayListOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const GatewayListOptions = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * Response for `ListDevices`. * @@ -391,4 +425,108 @@ const ListDeviceStatesRequest = { */ const ListDeviceStatesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `SendCommandToDevice`. + * + * @property {string} name + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * @property {string} binaryData + * The command data to send to the device. + * + * @property {string} subfolder + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * + * @typedef SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.SendCommandToDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const SendCommandToDeviceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `SendCommandToDevice`. + * @typedef SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.SendCommandToDeviceResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const SendCommandToDeviceResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `BindDeviceToGateway`. + * + * @property {string} parent + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * @property {string} gatewayId + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * @property {string} deviceId + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * @typedef BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.BindDeviceToGatewayRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const BindDeviceToGatewayRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `BindDeviceToGateway`. + * @typedef BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.BindDeviceToGatewayResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const BindDeviceToGatewayResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for `UnbindDeviceFromGateway`. + * + * @property {string} parent + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * @property {string} gatewayId + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * @property {string} deviceId + * The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * @typedef UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.UnbindDeviceFromGatewayRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const UnbindDeviceFromGatewayRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for `UnbindDeviceFromGateway`. + * @typedef UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.UnbindDeviceFromGatewayResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} + */ +const UnbindDeviceFromGatewayResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js index c95f4e92caf..fc0063e28f0 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js @@ -115,6 +115,14 @@ * * This object should have the same structure as [DeviceState]{@link google.cloud.iot.v1.DeviceState} * + * @property {number} logLevel + * **Beta Feature** + * + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + * + * The number should be among the values of [LogLevel]{@link google.cloud.iot.v1.LogLevel} + * * @property {Object.} metadata * The metadata key-value pairs assigned to the device. This metadata is not * interpreted or indexed by Cloud IoT Core. It can be used to add contextual @@ -129,6 +137,11 @@ * The total size of all keys and values must be less than 256 KB, and the * maximum number of key-value pairs is 500. * + * @property {Object} gatewayConfig + * Gateway-related configuration and state. + * + * This object should have the same structure as [GatewayConfig]{@link google.cloud.iot.v1.GatewayConfig} + * * @typedef Device * @memberof google.cloud.iot.v1 * @see [google.cloud.iot.v1.Device definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} @@ -137,6 +150,37 @@ const Device = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * Gateway-related configuration and state. + * + * @property {number} gatewayType + * Indicates whether the device is a gateway. + * + * The number should be among the values of [GatewayType]{@link google.cloud.iot.v1.GatewayType} + * + * @property {number} gatewayAuthMethod + * Indicates how to authorize and/or authenticate devices to access the + * gateway. + * + * The number should be among the values of [GatewayAuthMethod]{@link google.cloud.iot.v1.GatewayAuthMethod} + * + * @property {string} lastAccessedGatewayId + * [Output only] The ID of the gateway the device accessed most recently. + * + * @property {Object} lastAccessedGatewayTime + * [Output only] The most recent time at which the device accessed the gateway + * specified in `last_accessed_gateway`. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @typedef GatewayConfig + * @memberof google.cloud.iot.v1 + * @see [google.cloud.iot.v1.GatewayConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} + */ +const GatewayConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * A container for a group of devices. * @@ -180,6 +224,14 @@ const Device = { * * This object should have the same structure as [HttpConfig]{@link google.cloud.iot.v1.HttpConfig} * + * @property {number} logLevel + * **Beta Feature** + * + * The default logging verbosity for activity from devices in this registry. + * The verbosity level can be overridden by Device.log_level. + * + * The number should be among the values of [LogLevel]{@link google.cloud.iot.v1.LogLevel} + * * @property {Object[]} credentials * The credentials used to verify the device credentials. No more than 10 * credentials can be bound to a single registry at a time. The verification @@ -508,6 +560,105 @@ const HttpState = { HTTP_DISABLED: 2 }; +/** + * **Beta Feature** + * + * The logging verbosity for device activity. Specifies which events should be + * written to logs. For example, if the LogLevel is ERROR, only events that + * terminate in errors will be logged. LogLevel is inclusive; enabling INFO + * logging will also enable ERROR logging. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +const LogLevel = { + + /** + * No logging specified. If not specified, logging will be disabled. + */ + LOG_LEVEL_UNSPECIFIED: 0, + + /** + * Disables logging. + */ + NONE: 10, + + /** + * Error events will be logged. + */ + ERROR: 20, + + /** + * Informational events will be logged, such as connections and + * disconnections. + */ + INFO: 30, + + /** + * All events will be logged. + */ + DEBUG: 40 +}; + +/** + * Gateway type. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +const GatewayType = { + + /** + * If unspecified, the device is considered a non-gateway device. + */ + GATEWAY_TYPE_UNSPECIFIED: 0, + + /** + * The device is a gateway. + */ + GATEWAY: 1, + + /** + * The device is not a gateway. + */ + NON_GATEWAY: 2 +}; + +/** + * The gateway authorization/authentication method. This setting determines how + * Cloud IoT Core authorizes/authenticate devices to access the gateway. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +const GatewayAuthMethod = { + + /** + * No authentication/authorization method specified. No devices are allowed to + * access the gateway. + */ + GATEWAY_AUTH_METHOD_UNSPECIFIED: 0, + + /** + * The device is authenticated through the gateway association only. Device + * credentials are ignored even if provided. + */ + ASSOCIATION_ONLY: 1, + + /** + * The device is authenticated through its own credentials. Gateway + * association is not checked. + */ + DEVICE_AUTH_TOKEN_ONLY: 2, + + /** + * The device is authenticated through both device credentials and gateway + * association. The device must be bound to the gateway and must provide its + * own credentials. + */ + ASSOCIATION_AND_DEVICE_AUTH_TOKEN: 3 +}; + /** * The supported formats for the public key. * diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 0c5b2049212..546dcc32107 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -1131,6 +1131,223 @@ describe('DeviceManagerClient', () => { }); }); }); + + describe('sendCommandToDevice', () => { + it('invokes sendCommandToDevice without error', done => { + const client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + const binaryData = '40'; + const request = { + name: formattedName, + binaryData: binaryData, + }; + + // Mock response + const expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.sendCommandToDevice(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes sendCommandToDevice with error', done => { + const client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.devicePath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + const binaryData = '40'; + const request = { + name: formattedName, + binaryData: binaryData, + }; + + // Mock Grpc layer + client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.sendCommandToDevice(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('bindDeviceToGateway', () => { + it('invokes bindDeviceToGateway without error', done => { + const client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); + const gatewayId = 'gatewayId955798774'; + const deviceId = 'deviceId25209764'; + const request = { + parent: formattedParent, + gatewayId: gatewayId, + deviceId: deviceId, + }; + + // Mock response + const expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.bindDeviceToGateway(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes bindDeviceToGateway with error', done => { + const client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); + const gatewayId = 'gatewayId955798774'; + const deviceId = 'deviceId25209764'; + const request = { + parent: formattedParent, + gatewayId: gatewayId, + deviceId: deviceId, + }; + + // Mock Grpc layer + client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.bindDeviceToGateway(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('unbindDeviceFromGateway', () => { + it('invokes unbindDeviceFromGateway without error', done => { + const client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); + const gatewayId = 'gatewayId955798774'; + const deviceId = 'deviceId25209764'; + const request = { + parent: formattedParent, + gatewayId: gatewayId, + deviceId: deviceId, + }; + + // Mock response + const expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.unbindDeviceFromGateway(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes unbindDeviceFromGateway with error', done => { + const client = new iotModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.registryPath( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]' + ); + const gatewayId = 'gatewayId955798774'; + const deviceId = 'deviceId25209764'; + const request = { + parent: formattedParent, + gatewayId: gatewayId, + deviceId: deviceId, + }; + + // Mock Grpc layer + client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.unbindDeviceFromGateway(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); }); function mockSimpleGrpcMethod(expectedRequest, response, error) { From 1e67282a2caeb4f1197eb393a915da4c8577ec2b Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Sat, 1 Dec 2018 18:41:33 -0800 Subject: [PATCH 059/370] fix(build): fix system key decryption (#81) --- packages/google-cloud-iot/.circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml index 6735ebdaaa1..86c63432242 100644 --- a/packages/google-cloud-iot/.circleci/config.yml +++ b/packages/google-cloud-iot/.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 26f2362d8fe7c2ccd2dc41846cd145f1c669a91a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 3 Dec 2018 15:51:46 -0800 Subject: [PATCH 060/370] docs: update readme badges (#83) --- packages/google-cloud-iot/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 0954e6df9a4..07d9cc52980 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -5,8 +5,7 @@ # [Google Cloud IoT Core: Node.js Client](https://github.com/googleapis/nodejs-iot) [![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-iot.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-iot) -[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-iot?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-iot) +[![npm version](https://img.shields.io/npm/v/@google-cloud/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) > Node.js idiomatic client for [Cloud IoT Core][product-docs]. @@ -91,3 +90,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/cloudiot/latest/ [product-docs]: https://cloud.google.com/iot/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + From 508b8d61b640ff7240910b1f90526918227f08f9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Dec 2018 08:54:39 -0800 Subject: [PATCH 061/370] chore: update license file (#85) --- packages/google-cloud-iot/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/LICENSE b/packages/google-cloud-iot/LICENSE index 7a4a3ea2424..d6456956733 100644 --- a/packages/google-cloud-iot/LICENSE +++ b/packages/google-cloud-iot/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 7b4c79a22b7700f6050c8e3655f011c2dd938349 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 5 Dec 2018 15:54:40 -0800 Subject: [PATCH 062/370] chore: nyc ignore build/test by default (#87) --- packages/google-cloud-iot/.nycrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index a1a8e6920ce..feb032400d4 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.nycrc @@ -3,7 +3,8 @@ "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", - "test/**/*.js" + "test/**/*.js", + "build/test" ], "watermarks": { "branches": [ From 8252eb919316fccc0d50f453f48d28ae4ab44294 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 10 Dec 2018 13:34:02 -0800 Subject: [PATCH 063/370] build: add Kokoro configs for autorelease (#92) * build: add Kokoro configs for autorelease * build: add Kokoro configs for autorelease * chore: remove CircleCI config --- .../google-cloud-iot/.circleci/config.yml | 179 ------------------ .../google-cloud-iot/.circleci/key.json.enc | Bin 2352 -> 0 bytes .../.circleci/npm-install-retry.js | 60 ------ 3 files changed, 239 deletions(-) delete mode 100644 packages/google-cloud-iot/.circleci/config.yml delete mode 100644 packages/google-cloud-iot/.circleci/key.json.enc delete mode 100755 packages/google-cloud-iot/.circleci/npm-install-retry.js diff --git a/packages/google-cloud-iot/.circleci/config.yml b/packages/google-cloud-iot/.circleci/config.yml deleted file mode 100644 index 86c63432242..00000000000 --- a/packages/google-cloud-iot/.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-iot/.circleci/key.json.enc b/packages/google-cloud-iot/.circleci/key.json.enc deleted file mode 100644 index 3977509d735c7e7b9ebe4bc6eb0fb74de3cf7f3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2352 zcmV-03D5RZVQh3|WM5z3)|(K1VhT7^v6-I7Q8*J-<)~4o9Xbjw)CnurX!XsguGHgc zVzj*x%b?hKSlC`9nFR|lw8H5T77*;&;7VivPn3FxR`rwzMVOB;$9H?+1in# z1I}7^s3CwSg3RyiT7*>IkElGmVIu#Y@Mt7>%fa!rb}F>`8OG-d_Vax4doJ0Ih|FksDpji z7U@H|?}!L5cCSUk%ESz$fD?On`31nCTyQ{;^&v*~M~%4+S~b%zUgfCmNto zkr}v(8umXio_c+qAkpPWnUpimLjEC3MIk6|z_F7r-?uRr=t*3!Oz#_Z3*6ksmxMgqf zKr#m~~fJ;-#doax3P!rg| zEWwWmH@=*;JHN}jfz4QFL_4e~0ztTJ-|6rVlF((SV^)?f1wyKjPPEs0)}#S)7GWNn zEh&%5^NL1DO!3KG2pGHcR(nwOxuPG%sdB!c2$O{7_7HMOf%@1jDX+WQ6rd7_l|>~X zd)V!y%e@OzlU`bffifvav73N8>c|Jr5`j05<~bS>NAs3n-;pmmppE8Q0fA7uk%;W! z>OZ-{1QhYNqVa16j%cAV_6sO+?v2;>MBkQv)=Bc;g2EU==_&9dwUq*9*$OXX*inJm zsZCwJoj%qQj{G2c<3j(i{-dwfcHEjGm37%E)3wrlB{)J40}nadilQLtR)8&i-0(jI z&pK(;BaHi9s!ecXoR9CQyVm3{SS{b|4pIy@rMJV zK?Eet?{%b9ib?WH z8GbSv>T1@zi_>H32i14e(ij7RqDW5cri!apR5(q0oeB*ZojfWUe5x?YB;a%-ihsj# zF%LK|$UkFvLOMKchG+6-f7i~Z>uSu<8sQ@mKvrp@Nm(zQJE#HGWHZ1J&X_LsNwRSj;klRYwl&|rBjq~bBGeY z%OQ|e*`ygc1+X?dKB*(bEU|FNK#3}^CsNv_Hs*QX|(1}x_faRmQRnW0j`%U z41!2)L=%kHYgu2Pz9?=eG?W|a0yn#=5PbQ^zr=r>`Ao65I^VZ@$m77}__cKWm~M3F zsl&&mf$>8nvxSZX15eUS0Ac=PFRH*OZ|3pIA`3d9VGgKjro(cDm_KF(KDJnB*Qj*T z%7dWk%{N01mB38G=iA|md!qjLgAwI~gM09g-7u9C*(A2&+MWO!^Jio0j*Z&`W)in) zIEL5^1HK&xPvSc;Qd|L<+M4~9tThOXr)^@T*K6A8z^9vjD27|L2<}&IR{#5^Mux=H zKvdQ?LIL%WZL*CxF_xHNo*Me|7Q9t$ZCtJH1{J<2k(!$xUrGYvJKH4dgpDsMKB2u3 z4(%XwloKCPF`|)Cr^E)*#^r%b`=ii&Zjs9@vq2?!EjKB;o^xNn@qOS#1U2a9uzy)P z1~^<;(?TT%V`YNqTK*=pXZT7^HlUB%GU6=*V`wM01Bcw>8g(A2!!v;GdsCJ=f1P3~ z;Tygq!TZq_o*cA)mp!#Yg^*O)C}VTMB*oDsqOW{;&k1p{>-(|5?{#AT!i?Idsy@$mDzW4Yj_dz0{*V zlwrP=k+_6sAbC5b`qZRa&rDY^L$U?vmY_XI#WEGs89o2jc$8pa?0t%LPfpT7Ze}k# zWgofZqtyo^s#*uo;QP!2h5!cDUpIlDUZQP+H&>MMku79M_JF=o&@+lz9|=E0X34)l z_K&c^Vs}Pv5z>$spuK9aHGqvlKqo$4q*1u>^_8>2@)xO0x!+@Aow9c-eAXyTph7IA zkC{^H^fi7BSjWltmZC`#Hgi`L?fWqtj>p~Z8Y6$H3LpN|5+7mX8h3yfSH>SRDCY&z z;7*`q-qj7``@}8p(TKzZcy?$bRfWNve7Fb~{jIqzr`Y&ee(57D^EJKwA~W;W&np({ z=kTg^?RKjzhF5&rt9%3wI~Kzef(8W8Z$TP5uW)< zNutGXjKU=lz5?u0Qv>6Y4brdxDhSx%zZyA6)QGAi<-)Km%-IqO?}4?Mt)yvJJa5FO zN%n?nCmzgqmNyA;jar9>prG6le%ty;uykprU8QG(u)tui6R0BIWf{cHcS5^&O=${L z_aVjCCMC3HEo70aBpTb+fNDR5Kx*s_EQ@3Y=6x%seBiG-CXKe+KjyPXrs@wH9$h|H z7 [... 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 5113f5634e4ff4f33ed373c897905e921e9ad360 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 11 Dec 2018 10:33:23 -0800 Subject: [PATCH 064/370] chore: update nyc and eslint configs (#96) --- packages/google-cloud-iot/.eslintignore | 1 + packages/google-cloud-iot/.nycrc | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore index 2f642cb6044..f0c7aead4bf 100644 --- a/packages/google-cloud-iot/.eslintignore +++ b/packages/google-cloud-iot/.eslintignore @@ -1,3 +1,4 @@ **/node_modules src/**/doc/* build/ +docs/ diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index feb032400d4..88b001cb587 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.nycrc @@ -1,5 +1,6 @@ { "report-dir": "./.coverage", + "reporter": "lcov", "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", From 3b1d4f658a2c4bb10221ad65c5c0fa2b5a674ef8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 17 Dec 2018 11:54:27 -0800 Subject: [PATCH 065/370] samples: update quickstart sample and add sample tests (#98) --- packages/google-cloud-iot/package.json | 10 +-- .../google-cloud-iot/samples/package.json | 15 ++-- .../google-cloud-iot/samples/quickstart.js | 90 +++---------------- .../samples/test/quickstart.test.js | 25 ++++++ 4 files changed, 49 insertions(+), 91 deletions(-) create mode 100644 packages/google-cloud-iot/samples/test/quickstart.test.js diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 9ded4b76886..a6e2bb5fb37 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -11,9 +11,7 @@ "main": "src/index.js", "files": [ "protos", - "src", - "AUTHORS", - "COPYING" + "src" ], "keywords": [ "google apis client", @@ -29,13 +27,11 @@ "Cloud IoT API" ], "scripts": { - "test": "npm run cover", - "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", + "test": "nyc mocha", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "test-no-cover": "mocha test/*.js --timeout 600000", "lint": "eslint '**/*.js'", "docs": "jsdoc -c .jsdoc.js", - "system-test": "mocha system-test/*.js --timeout 600000", + "system-test": "mocha system-test --timeout 600000", "fix": "eslint --fix '**/*.js'" }, "dependencies": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index efb061a08e2..c25158baa58 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -1,7 +1,9 @@ { "name": "@google-cloud/iot-samples", "description": "Samples for the Cloud IoT Client Library for Node.js.", - "version": "0.0.1", + "files": [ + "*.js" + ], "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -9,12 +11,15 @@ }, "repository": "googleapis/nodejs-iot", "private": true, - "nyc": { - "exclude": [ - "**/*.test.js" - ] + "scripts": { + "test": "mocha --timeout 10000" }, "dependencies": { "@google-cloud/iot": "^0.1.0" + }, + "devDependencies": { + "chai": "^4.2.0", + "execa": "^1.0.0", + "mocha": "^5.2.0" } } diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 2de3461409d..83d10f4feb5 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -14,83 +14,15 @@ 'use strict'; -/* global describe, it */ - -describe('DeviceManagerSmokeTest', () => { - if (!process.env.GCLOUD_PROJECT) { - throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); +async function quickstart() { + const iot = require('@google-cloud/iot'); + const client = new iot.v1.DeviceManagerClient(); + const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID'; + const parent = client.locationPath(projectId, 'us-central1'); + const [resources] = await client.listDeviceRegistries({parent}); + console.log(`${resources.length} resource(s) found.`); + for (const resource of resources) { + console.log(resource); } - const projectId = process.env.GCLOUD_PROJECT; - - it('successfully makes a call to the service using promises', done => { - const iot = require('@google-cloud/iot'); - - const client = new iot.v1.DeviceManagerClient({ - // optional auth parameters. - }); - - // Iterate over all elements. - const formattedParent = client.locationPath(projectId, 'us-central1'); - - client - .listDeviceRegistries({parent: formattedParent}) - .then(responses => { - 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 => { - const iot = require('@google-cloud/iot'); - - const client = new iot.v1.DeviceManagerClient({ - // optional auth parameters. - }); - - // Or obtain the paged response. - const formattedParent = client.locationPath(projectId, 'us-central1'); - - 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 (let i = 0; i < resources.length; i += 1) { - console.log(resources[i]); - } - if (nextRequest) { - // Fetch the next page. - return client.listDeviceRegistries(nextRequest, options).then(callback); - } - }; - client - .listDeviceRegistries({parent: formattedParent}, options) - .then(callback) - .then(done) - .catch(done); - }); - - it('successfully makes a call to the service using streaming', done => { - const iot = require('@google-cloud/iot'); - - const client = new iot.v1.DeviceManagerClient({ - // optional auth parameters. - }); - - const formattedParent = client.locationPath(projectId, 'us-central1'); - client - .listDeviceRegistriesStream({parent: formattedParent}) - .on('data', element => { - console.log(element); - }) - .on('error', done) - .on('end', done); - }); -}); +} +quickstart().catch(console.error); diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js new file mode 100644 index 00000000000..f348dd55a7e --- /dev/null +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -0,0 +1,25 @@ +// 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 {assert} = require('chai'); +const execa = require('execa'); + +describe('iot samples', () => { + it('should run the quickstart', async () => { + const {stdout} = await execa.shell('node quickstart'); + assert.match(stdout, /\d resource\(s\) found./); + }); +}); From fda8499034fbb394c595e78f96bd41f57812a697 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:49:49 -0800 Subject: [PATCH 066/370] fix(docs): remove unused IAM message types fix(docs): remove unused IAM message types --- .../doc/google/cloud/iot/v1/doc_resources.js | 104 +++++++++--------- .../src/v1/doc/google/iam/v1/doc_policy.js | 44 -------- packages/google-cloud-iot/synth.metadata | 36 ++++-- 3 files changed, 76 insertions(+), 108 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js index fc0063e28f0..67206dd8202 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js @@ -510,28 +510,62 @@ const DeviceState = { }; /** - * Indicates whether an MQTT connection is enabled or disabled. See the field - * description for details. + * The gateway authorization/authentication method. This setting determines how + * Cloud IoT Core authorizes/authenticate devices to access the gateway. * * @enum {number} * @memberof google.cloud.iot.v1 */ -const MqttState = { +const GatewayAuthMethod = { /** - * No MQTT state specified. If not specified, MQTT will be enabled by default. + * No authentication/authorization method specified. No devices are allowed to + * access the gateway. */ - MQTT_STATE_UNSPECIFIED: 0, + GATEWAY_AUTH_METHOD_UNSPECIFIED: 0, /** - * Enables a MQTT connection. + * The device is authenticated through the gateway association only. Device + * credentials are ignored even if provided. */ - MQTT_ENABLED: 1, + ASSOCIATION_ONLY: 1, /** - * Disables a MQTT connection. + * The device is authenticated through its own credentials. Gateway + * association is not checked. */ - MQTT_DISABLED: 2 + DEVICE_AUTH_TOKEN_ONLY: 2, + + /** + * The device is authenticated through both device credentials and gateway + * association. The device must be bound to the gateway and must provide its + * own credentials. + */ + ASSOCIATION_AND_DEVICE_AUTH_TOKEN: 3 +}; + +/** + * Gateway type. + * + * @enum {number} + * @memberof google.cloud.iot.v1 + */ +const GatewayType = { + + /** + * If unspecified, the device is considered a non-gateway device. + */ + GATEWAY_TYPE_UNSPECIFIED: 0, + + /** + * The device is a gateway. + */ + GATEWAY: 1, + + /** + * The device is not a gateway. + */ + NON_GATEWAY: 2 }; /** @@ -601,62 +635,28 @@ const LogLevel = { }; /** - * Gateway type. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const GatewayType = { - - /** - * If unspecified, the device is considered a non-gateway device. - */ - GATEWAY_TYPE_UNSPECIFIED: 0, - - /** - * The device is a gateway. - */ - GATEWAY: 1, - - /** - * The device is not a gateway. - */ - NON_GATEWAY: 2 -}; - -/** - * The gateway authorization/authentication method. This setting determines how - * Cloud IoT Core authorizes/authenticate devices to access the gateway. + * Indicates whether an MQTT connection is enabled or disabled. See the field + * description for details. * * @enum {number} * @memberof google.cloud.iot.v1 */ -const GatewayAuthMethod = { - - /** - * No authentication/authorization method specified. No devices are allowed to - * access the gateway. - */ - GATEWAY_AUTH_METHOD_UNSPECIFIED: 0, +const MqttState = { /** - * The device is authenticated through the gateway association only. Device - * credentials are ignored even if provided. + * No MQTT state specified. If not specified, MQTT will be enabled by default. */ - ASSOCIATION_ONLY: 1, + MQTT_STATE_UNSPECIFIED: 0, /** - * The device is authenticated through its own credentials. Gateway - * association is not checked. + * Enables a MQTT connection. */ - DEVICE_AUTH_TOKEN_ONLY: 2, + MQTT_ENABLED: 1, /** - * The device is authenticated through both device credentials and gateway - * association. The device must be bound to the gateway and must provide its - * own credentials. + * Disables a MQTT connection. */ - ASSOCIATION_AND_DEVICE_AUTH_TOKEN: 3 + MQTT_DISABLED: 2 }; /** diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index 59fca18810c..5e7237e0fa9 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -115,48 +115,4 @@ const Policy = { */ const Binding = { // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The difference delta between two policies. - * - * @property {Object[]} bindingDeltas - * The delta for Bindings between two policies. - * - * This object should have the same structure as [BindingDelta]{@link google.iam.v1.BindingDelta} - * - * @typedef PolicyDelta - * @memberof google.iam.v1 - * @see [google.iam.v1.PolicyDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const PolicyDelta = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * One delta entry for Binding. Each individual change (only one member in each - * entry) to a binding will be a separate entry. - * - * @property {number} action - * The action that was performed on a Binding. - * Required - * - * The number should be among the values of [Action]{@link google.iam.v1.Action} - * - * @property {string} role - * Role that is assigned to `members`. - * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * Required - * - * @property {string} member - * A single identity requesting access for a Cloud Platform resource. - * Follows the same format of Binding.members. - * Required - * - * @typedef BindingDelta - * @memberof google.iam.v1 - * @see [google.iam.v1.BindingDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const BindingDelta = { - // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f26e69af884..c87408465bc 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,26 +1,38 @@ { + "updateTime": "2019-01-03T17:42:23.243166Z", "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": "iot", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/iot/artman_cloudiot.yaml" } } ] From 7729a8e4f6a84cfd022fbc42cbc76b3557775740 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 14 Jan 2019 12:02:56 -0800 Subject: [PATCH 067/370] fix(deps): update dependency google-gax to ^0.23.0 (#103) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index a6e2bb5fb37..ce9611eae53 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -35,7 +35,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.22.0", + "google-gax": "^0.23.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From b8f31061085a313daccc78db69014415db7bb2f2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 14 Jan 2019 15:33:49 -0800 Subject: [PATCH 068/370] Release v0.2.0 (#104) --- packages/google-cloud-iot/CHANGELOG.md | 67 +++++++++++++++++++ packages/google-cloud-iot/package.json | 2 +- .../google-cloud-iot/samples/package.json | 2 +- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 44f53c0b06b..7aa06b668a3 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,72 @@ # Changelog +## v0.2.0 + +01-14-2019 14:30 PST + +### New Features +- feat: add enhanced gateway features ([#80](https://github.com/googleapis/nodejs-iot/pull/80)) + +### Dependencies +- chore(deps): update dependency through2 to v3 ([#69](https://github.com/googleapis/nodejs-iot/pull/69)) +- fix(deps): update dependency google-gax to ^0.23.0 ([#103](https://github.com/googleapis/nodejs-iot/pull/103)) + +### Documentation +- fix(docs): remove unused IAM message types +- samples: update quickstart sample and add sample tests ([#98](https://github.com/googleapis/nodejs-iot/pull/98)) +- docs: update readme badges ([#83](https://github.com/googleapis/nodejs-iot/pull/83)) + +### Internal / Testing Changes +- chore(build): inject yoshi automation key ([#97](https://github.com/googleapis/nodejs-iot/pull/97)) +- chore: update nyc and eslint configs ([#96](https://github.com/googleapis/nodejs-iot/pull/96)) +- chore: fix publish.sh permission +x ([#94](https://github.com/googleapis/nodejs-iot/pull/94)) +- fix(build): fix Kokoro release script ([#93](https://github.com/googleapis/nodejs-iot/pull/93)) +- build: add Kokoro configs for autorelease ([#92](https://github.com/googleapis/nodejs-iot/pull/92)) +- chore: always nyc report before calling codecov ([#88](https://github.com/googleapis/nodejs-iot/pull/88)) +- chore: nyc ignore build/test by default ([#87](https://github.com/googleapis/nodejs-iot/pull/87)) +- chore: update license file ([#85](https://github.com/googleapis/nodejs-iot/pull/85)) +- fix(build): fix system key decryption ([#81](https://github.com/googleapis/nodejs-iot/pull/81)) +- chore: add a synth.metadata +- chore: update eslintignore config ([#74](https://github.com/googleapis/nodejs-iot/pull/74)) +- chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 ([#73](https://github.com/googleapis/nodejs-iot/pull/73)) +- chore: remove unused deps ([#71](https://github.com/googleapis/nodejs-iot/pull/71)) +- chore: drop contributors from multiple places ([#72](https://github.com/googleapis/nodejs-iot/pull/72)) +- chore: use latest npm on Windows ([#70](https://github.com/googleapis/nodejs-iot/pull/70)) +- chore: update CircleCI config ([#68](https://github.com/googleapis/nodejs-iot/pull/68)) +- chore: include build in eslintignore ([#65](https://github.com/googleapis/nodejs-iot/pull/65)) +- chore(deps): update dependency eslint-plugin-node to v8 ([#61](https://github.com/googleapis/nodejs-iot/pull/61)) +- chore: update issue templates ([#60](https://github.com/googleapis/nodejs-iot/pull/60)) +- chore: remove old issue template ([#58](https://github.com/googleapis/nodejs-iot/pull/58)) +- build: run tests on node11 ([#57](https://github.com/googleapis/nodejs-iot/pull/57)) +- chores(build): do not collect sponge.xml from windows builds ([#56](https://github.com/googleapis/nodejs-iot/pull/56)) +- chores(build): run codecov on continuous builds ([#55](https://github.com/googleapis/nodejs-iot/pull/55)) +- chore: update new issue template ([#54](https://github.com/googleapis/nodejs-iot/pull/54)) +- build: fix codecov uploading on Kokoro ([#51](https://github.com/googleapis/nodejs-iot/pull/51)) +- Update kokoro config ([#49](https://github.com/googleapis/nodejs-iot/pull/49)) +- chore(deps): update dependency eslint-plugin-prettier to v3 ([#48](https://github.com/googleapis/nodejs-iot/pull/48)) +- build: prevent system/sample-test from leaking credentials +- Update the kokoro config ([#45](https://github.com/googleapis/nodejs-iot/pull/45)) +- test: remove appveyor config ([#44](https://github.com/googleapis/nodejs-iot/pull/44)) +- Update the CI config ([#43](https://github.com/googleapis/nodejs-iot/pull/43)) +- Enable prefer-const in the eslint config ([#41](https://github.com/googleapis/nodejs-iot/pull/41)) +- Enable no-var in eslint ([#40](https://github.com/googleapis/nodejs-iot/pull/40)) +- Switch to let/const ([#39](https://github.com/googleapis/nodejs-iot/pull/39)) +- Update CI config ([#37](https://github.com/googleapis/nodejs-iot/pull/37)) +- Retry npm install in CI ([#35](https://github.com/googleapis/nodejs-iot/pull/35)) +- Update CI config ([#32](https://github.com/googleapis/nodejs-iot/pull/32)) +- Re-generate library using /synth.py ([#31](https://github.com/googleapis/nodejs-iot/pull/31)) +- chore(deps): update dependency nyc to v13 ([#30](https://github.com/googleapis/nodejs-iot/pull/30)) +- chore(deps): update dependency eslint-config-prettier to v3 ([#26](https://github.com/googleapis/nodejs-iot/pull/26)) +- chore: do not use npm ci ([#25](https://github.com/googleapis/nodejs-iot/pull/25)) +- chore: ignore package-lock.json ([#24](https://github.com/googleapis/nodejs-iot/pull/24)) +- chore(deps): lock file maintenance ([#23](https://github.com/googleapis/nodejs-iot/pull/23)) +- chore(deps): lock file maintenance ([#22](https://github.com/googleapis/nodejs-iot/pull/22)) +- chore: update renovate config ([#21](https://github.com/googleapis/nodejs-iot/pull/21)) +- test: throw on deprecation ([#20](https://github.com/googleapis/nodejs-iot/pull/20)) +- chore(deps): lock file maintenance ([#18](https://github.com/googleapis/nodejs-iot/pull/18)) +- chore: move mocha options to mocha.opts ([#16](https://github.com/googleapis/nodejs-iot/pull/16)) +- chore: require node 8 for samples ([#17](https://github.com/googleapis/nodejs-iot/pull/17)) + ## v0.1.1 ### Dependencies diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index ce9611eae53..713a8495c80 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "0.1.1", + "version": "0.2.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index c25158baa58..1628fc0ee11 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^0.1.0" + "@google-cloud/iot": "^0.2.0" }, "devDependencies": { "chai": "^4.2.0", From 1377d45d8e059d1a22a02dfaa2f1b2cde1c2dd2f Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 14 Jan 2019 18:30:10 -0800 Subject: [PATCH 069/370] build: check broken links in generated docs (#101) * build: check dead links on Kokoro * recursive crawl local links * fix dead links --- .../google-cloud-iot/.cloud-repo-tools.json | 2 +- packages/google-cloud-iot/.jsdoc.js | 2 +- packages/google-cloud-iot/README.md | 61 +++++++------------ packages/google-cloud-iot/package.json | 2 +- .../doc/google/cloud/iot/v1/doc_resources.js | 6 +- .../v1/doc/google/protobuf/doc_timestamp.js | 6 +- packages/google-cloud-iot/synth.py | 14 +++++ 7 files changed, 45 insertions(+), 48 deletions(-) diff --git a/packages/google-cloud-iot/.cloud-repo-tools.json b/packages/google-cloud-iot/.cloud-repo-tools.json index 60724941462..259daca8f8d 100644 --- a/packages/google-cloud-iot/.cloud-repo-tools.json +++ b/packages/google-cloud-iot/.cloud-repo-tools.json @@ -2,6 +2,6 @@ "requiresKeyFile": true, "requiresProjectId": true, "product": "cloudiot", - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/cloudiot/latest/", + "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/iot/latest/", "release_quality": "alpha" } diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 5f3137d9f8c..67c759c42f6 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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-iot/README.md b/packages/google-cloud-iot/README.md index 07d9cc52980..c7a56090876 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -8,57 +8,28 @@ [![npm version](https://img.shields.io/npm/v/@google-cloud/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) -> Node.js idiomatic client for [Cloud IoT Core][product-docs]. - [Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. -* [Cloud IoT Core Node.js Client API Reference][client-docs] -* [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) -* [Cloud IoT Core 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) +* [Using the client library](#using-the-client-library) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) -## Quickstart - -### Before you begin - -1. Select or create a Cloud Platform project. - - [Go to the projects page][projects] +## Using the client library -1. Enable billing for your project. +1. [Select or create a Cloud Platform project][projects]. - [Enable billing][billing] +1. [Enable billing for your project][billing]. -1. Enable the Google Cloud IoT Core API. - - [Enable the API][enable_api] +1. [Enable the Google Cloud IoT Core 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=cloudiot.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started - -### Installing the client library +1. Install the client library: - npm install --save @google-cloud/iot + npm install --save @google-cloud/iot @@ -87,7 +58,21 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/cloudiot/latest/ +## What's Next + +* [Cloud IoT Core Documentation][product-docs] +* [Cloud IoT Core Node.js Client API Reference][client-docs] +* [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) + +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 + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest/ [product-docs]: https://cloud.google.com/iot/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=cloudiot.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 713a8495c80..914aa8c186a 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -45,7 +45,7 @@ "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "ink-docstrap": "^1.3.2", + "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js index 67206dd8202..5e8e6e48433 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js @@ -698,13 +698,13 @@ const PublicKeyFormat = { /** * An RSA public key encoded in base64, and wrapped by * `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be - * used to verify `RS256` signatures in JWT tokens ([RFC7518](https://cloud.google.com + * used to verify `RS256` signatures in JWT tokens ([RFC7518]( * https://www.ietf.org/rfc/rfc7518.txt)). */ RSA_PEM: 3, /** - * As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://cloud.google.com + * As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. */ @@ -720,7 +720,7 @@ const PublicKeyFormat = { ES256_PEM: 2, /** - * As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://cloud.google.com + * As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. */ diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js index 1ebe2e6e1a5..1cc64cbed80 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.py b/packages/google-cloud-iot/synth.py index 1cb6bb63d21..15a39617694 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -51,6 +51,20 @@ templates = common_templates.node_library() s.copy(templates) +s.replace("src/v1/doc/google/cloud/iot/v1/doc_resources.js", + "\[RFC(.*)\]\(https:\/\/cloud\.google\.com", + r"[RFC\1](") + +# [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] # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) From eebcc373cd57a95d31660aaeb10b00d9f586deb2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 17 Jan 2019 08:40:58 -0800 Subject: [PATCH 070/370] chore: update year in the license headers. (#106) chore: update year in the license headers --- .../smoke-test/device_manager_smoke_test.js | 2 +- .../google-cloud-iot/src/v1/device_manager_client.js | 2 +- .../v1/doc/google/cloud/iot/v1/doc_device_manager.js | 2 +- .../src/v1/doc/google/cloud/iot/v1/doc_resources.js | 2 +- .../src/v1/doc/google/iam/v1/doc_iam_policy.js | 2 +- .../src/v1/doc/google/iam/v1/doc_policy.js | 2 +- .../src/v1/doc/google/protobuf/doc_any.js | 2 +- .../src/v1/doc/google/protobuf/doc_empty.js | 2 +- .../src/v1/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v1/doc/google/protobuf/doc_timestamp.js | 2 +- .../src/v1/doc/google/rpc/doc_status.js | 2 +- packages/google-cloud-iot/src/v1/index.js | 2 +- packages/google-cloud-iot/synth.metadata | 12 ++++++------ packages/google-cloud-iot/test/gapic-v1.js | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index 0391ad4cb3c..9de0516b918 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_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-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 47a83a15a68..d3c1645a124 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_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-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js index 7af5ab31c63..041b61d747f 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.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-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js index 5e8e6e48433..7d371016a20 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.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-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js index e952d5d1f02..12b7ac5df09 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.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-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index 5e7237e0fa9..bcae4a7d873 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.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-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js index 3accb1fc0d8..f3278b34e66 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js index b1d6b5e32a9..0b446dd9ce4 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js index 0cb35328962..d55d97e6e38 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js index 1cc64cbed80..b47f41c2b30 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js index 13cfcab1021..fc4b5be93f0 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/index.js b/packages/google-cloud-iot/src/v1/index.js index 10daf7a7145..97521c35a12 100644 --- a/packages/google-cloud-iot/src/v1/index.js +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index c87408465bc..7f9b6467604 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-01-03T17:42:23.243166Z", + "updateTime": "2019-01-17T12:45:51.888549Z", "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-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 546dcc32107..b4514a911b7 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.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 cf60690b15b3a87ddda6c8558174f43dc0d78b3c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 25 Jan 2019 09:51:48 -0800 Subject: [PATCH 071/370] fix(deps): update dependency google-gax to ^0.24.0 (#108) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 914aa8c186a..f4c7a5f5d8a 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -35,7 +35,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.23.0", + "google-gax": "^0.24.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From e85ddfc232faec56e31ed0030fec5747bba06d71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 26 Jan 2019 10:39:52 -0800 Subject: [PATCH 072/370] chore(deps): update dependency eslint-config-prettier to v4 (#109) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f4c7a5f5d8a..20e006153e8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -42,7 +42,7 @@ "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.2", "eslint": "^5.0.1", - "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 739b2fa672eddc01b1f50a3da2a33eda7333862b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 30 Jan 2019 12:19:04 -0800 Subject: [PATCH 073/370] fix(deps): update dependency google-gax to ^0.25.0 (#110) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 20e006153e8..2ae4959d890 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -35,7 +35,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.24.0", + "google-gax": "^0.25.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From d40409eb36f03a1bde453c58124b1c4056ac928d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 7 Feb 2019 08:25:30 -0800 Subject: [PATCH 074/370] refactor: improve generated code style. (#114) --- .../smoke-test/device_manager_smoke_test.js | 8 ++++---- .../src/v1/device_manager_client.js | 16 ++++++++-------- packages/google-cloud-iot/synth.metadata | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index 9de0516b918..e0a6f7f8684 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -34,8 +34,8 @@ describe('DeviceManagerSmokeTest', () => { .listDeviceRegistries({parent: formattedParent}) .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('DeviceManagerSmokeTest', () => { 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-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index d3c1645a124..e5e549ba1d7 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -509,8 +509,8 @@ class DeviceManagerClient { * client.listDeviceRegistries({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 => { @@ -529,8 +529,8 @@ class DeviceManagerClient { * 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. @@ -933,8 +933,8 @@ class DeviceManagerClient { * client.listDevices({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 => { @@ -953,8 +953,8 @@ class DeviceManagerClient { * 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 7f9b6467604..93dbbabd3be 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-01-17T12:45:51.888549Z", + "updateTime": "2019-02-07T12:15:14.362115Z", "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 7f1fbff95c693d4dd330add82510f9c49dbaaa6e Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Feb 2019 15:38:57 -0800 Subject: [PATCH 075/370] chore: move CONTRIBUTING.md to root (#115) --- packages/google-cloud-iot/CONTRIBUTING.md | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/google-cloud-iot/CONTRIBUTING.md diff --git a/packages/google-cloud-iot/CONTRIBUTING.md b/packages/google-cloud-iot/CONTRIBUTING.md new file mode 100644 index 00000000000..b958f235007 --- /dev/null +++ b/packages/google-cloud-iot/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 3be2352d9b6aec94b81b81a78c73dcb452efbb55 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 7 Feb 2019 18:47:03 -0800 Subject: [PATCH 076/370] docs: update contributing path in README (#116) --- packages/google-cloud-iot/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index c7a56090876..2f2ccdd1a84 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -50,7 +50,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-iot/blob/master/.github/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-iot/blob/master/CONTRIBUTING.md). ## License From 1a29e1f167b05526f23a004825b18f73f6873147 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 10 Feb 2019 20:53:37 -0800 Subject: [PATCH 077/370] build: create docs test npm scripts (#118) --- packages/google-cloud-iot/package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2ae4959d890..2da70c859d1 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -32,7 +32,9 @@ "lint": "eslint '**/*.js'", "docs": "jsdoc -c .jsdoc.js", "system-test": "mocha system-test --timeout 600000", - "fix": "eslint --fix '**/*.js'" + "fix": "eslint --fix '**/*.js'", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "dependencies": { "google-gax": "^0.25.0", @@ -51,6 +53,7 @@ "mocha": "^5.2.0", "nyc": "^13.0.0", "power-assert": "^1.6.0", - "prettier": "^1.13.7" + "prettier": "^1.13.7", + "broken-link-checker-local": "^0.2.0" } } From 83ee5a37ba8f8fd663a4351d4a444cc9612080c2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 08:49:17 -0800 Subject: [PATCH 078/370] docs: update links in contrib guide (#121) --- packages/google-cloud-iot/CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/CONTRIBUTING.md b/packages/google-cloud-iot/CONTRIBUTING.md index b958f235007..78aaa61b269 100644 --- a/packages/google-cloud-iot/CONTRIBUTING.md +++ b/packages/google-cloud-iot/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 c9ea3aac3ea6f876fe00efe89eb2fe965f357f48 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 12:03:03 -0800 Subject: [PATCH 079/370] build: use linkinator for docs test (#120) --- packages/google-cloud-iot/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2da70c859d1..aec2c58295e 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -33,7 +33,7 @@ "docs": "jsdoc -c .jsdoc.js", "system-test": "mocha system-test --timeout 600000", "fix": "eslint --fix '**/*.js'", - "docs-test": "blcl docs -r --exclude www.googleapis.com", + "docs-test": "linkinator docs -r --skip www.googleapis.com", "predocs-test": "npm run docs" }, "dependencies": { @@ -54,6 +54,6 @@ "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.7", - "broken-link-checker-local": "^0.2.0" + "linkinator": "^1.1.2" } } From adb49c73825b7b406806b92cc62611f38e8f7860 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 14 Feb 2019 12:03:43 -0800 Subject: [PATCH 080/370] fix: throw on invalid credentials (#119) --- .../google-cloud-iot/src/v1/device_manager_client.js | 4 ++++ packages/google-cloud-iot/synth.metadata | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index e5e549ba1d7..16c351841b0 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -177,6 +177,10 @@ class DeviceManagerClient { 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 93dbbabd3be..969697b08c6 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-07T12:15:14.362115Z", + "updateTime": "2019-02-13T12:16:37.820785Z", "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": "ca61898878f0926dd9dcc68ba90764f17133efe4", + "internalRef": "233680013" } }, { From 91c32cd1e3b1c0794e71a0cd5ef723c97a410c15 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 19 Feb 2019 10:04:05 -0800 Subject: [PATCH 081/370] chore(deps): update dependency mocha to v6 chore(deps): update dependency mocha to v6 This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | mocha | devDependencies | major | `^5.2.0` -> `^6.0.0` | [homepage](https://mochajs.org/), [source](https://togithub.com/mochajs/mocha) | --- ### Release Notes
mochajs/mocha ### [`v6.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​600--2019-02-18) [Compare Source](https://togithub.com/mochajs/mocha/compare/v5.2.0...v6.0.0) #### :tada: Enhancements - [#​3726](https://togithub.com/mochajs/mocha/issues/3726): Add ability to unload files from `require` cache ([**@​plroebuck**](https://togithub.com/plroebuck)) #### :bug: Fixes - [#​3737](https://togithub.com/mochajs/mocha/issues/3737): Fix falsy values from options globals ([**@​plroebuck**](https://togithub.com/plroebuck)) - [#​3707](https://togithub.com/mochajs/mocha/issues/3707): Fix encapsulation issues for `Suite#_onlyTests` and `Suite#_onlySuites` ([**@​vkarpov15**](https://togithub.com/vkarpov15)) - [#​3711](https://togithub.com/mochajs/mocha/issues/3711): Fix diagnostic messages dealing with plurality and markup of output ([**@​plroebuck**](https://togithub.com/plroebuck)) - [#​3723](https://togithub.com/mochajs/mocha/issues/3723): Fix "reporter-option" to allow comma-separated options ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3722](https://togithub.com/mochajs/mocha/issues/3722): Fix code quality and performance of `lookupFiles` and `files` ([**@​plroebuck**](https://togithub.com/plroebuck)) - [#​3650](https://togithub.com/mochajs/mocha/issues/3650), [#​3654](https://togithub.com/mochajs/mocha/issues/3654): Fix noisy error message when no files found ([**@​craigtaub**](https://togithub.com/craigtaub)) - [#​3632](https://togithub.com/mochajs/mocha/issues/3632): Tests having an empty title are no longer confused with the "root" suite ([**@​juergba**](https://togithub.com/juergba)) - [#​3666](https://togithub.com/mochajs/mocha/issues/3666): Fix missing error codes ([**@​vkarpov15**](https://togithub.com/vkarpov15)) - [#​3684](https://togithub.com/mochajs/mocha/issues/3684): Fix exiting problem in Node.js v11.7.0+ ([**@​addaleax**](https://togithub.com/addaleax)) - [#​3691](https://togithub.com/mochajs/mocha/issues/3691): Fix `--delay` (and other boolean options) not working in all cases ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3692](https://togithub.com/mochajs/mocha/issues/3692): Fix invalid command-line argument usage not causing actual errors ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3698](https://togithub.com/mochajs/mocha/issues/3698), [#​3699](https://togithub.com/mochajs/mocha/issues/3699): Fix debug-related Node.js options not working in all cases ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3700](https://togithub.com/mochajs/mocha/issues/3700): Growl notifications now show the correct number of tests run ([**@​outsideris**](https://togithub.com/outsideris)) - [#​3686](https://togithub.com/mochajs/mocha/issues/3686): Avoid potential ReDoS when diffing large objects ([**@​cyjake**](https://togithub.com/cyjake)) - [#​3715](https://togithub.com/mochajs/mocha/issues/3715): Fix incorrect order of emitted events when used programmatically ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3706](https://togithub.com/mochajs/mocha/issues/3706): Fix regression wherein `--reporter-option`/`--reporter-options` did not support comma-separated key/value pairs ([**@​boneskull**](https://togithub.com/boneskull)) #### :book: Documentation - [#​3652](https://togithub.com/mochajs/mocha/issues/3652): Switch from Jekyll to Eleventy ([**@​Munter**](https://togithub.com/Munter)) #### :nut_and_bolt: Other - [#​3677](https://togithub.com/mochajs/mocha/issues/3677): Add error objects for createUnsupportedError and createInvalidExceptionError ([**@​boneskull**](https://togithub.com/boneskull)) - [#​3733](https://togithub.com/mochajs/mocha/issues/3733): Removed unnecessary processing in post-processing hook ([**@​wanseob**](https://togithub.com/wanseob)) - [#​3730](https://togithub.com/mochajs/mocha/issues/3730): Update nyc to latest version ([**@​coreyfarrell**](https://togithub.com/coreyfarrell)) - [#​3648](https://togithub.com/mochajs/mocha/issues/3648), [#​3680](https://togithub.com/mochajs/mocha/issues/3680): Fixes to support latest versions of [unexpected](https://npm.im/unexpected) and [unexpected-sinon](https://npm.im/unexpected-sinon) ([**@​sunesimonsen**](https://togithub.com/sunesimonsen)) - [#​3638](https://togithub.com/mochajs/mocha/issues/3638): Add meta tag to site ([**@​MartijnCuppens**](https://togithub.com/MartijnCuppens)) - [#​3653](https://togithub.com/mochajs/mocha/issues/3653): Fix parts of test suite failing to run on Windows ([**@​boneskull**](https://togithub.com/boneskull))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-iot). #122 automerged by dpebot --- packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index aec2c58295e..c085081e635 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -50,7 +50,7 @@ "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^5.2.0", + "mocha": "^6.0.0", "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.7", diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 1628fc0ee11..2b25e028ef2 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -20,6 +20,6 @@ "devDependencies": { "chai": "^4.2.0", "execa": "^1.0.0", - "mocha": "^5.2.0" + "mocha": "^6.0.0" } } From aabf409c1aef0bf42bfac1230d5b35c9d17d126c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 26 Feb 2019 05:51:24 -0800 Subject: [PATCH 082/370] chore: update proto docs and code style --- .../google/cloud/iot/v1/device_manager.proto | 52 +++++++++++-------- .../google/cloud/iot/v1/resources.proto | 1 - .../src/v1/doc/google/rpc/doc_status.js | 31 ++++++----- packages/google-cloud-iot/synth.metadata | 10 ++-- 4 files changed, 51 insertions(+), 43 deletions(-) diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto index 12e5a973dd7..27ec0f0301d 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto @@ -33,11 +33,11 @@ option java_multiple_files = true; option java_outer_classname = "DeviceManagerProto"; option java_package = "com.google.cloud.iot.v1"; - // Internet of Things (IoT) service. Securely connect and manage IoT devices. service DeviceManager { // Creates a device registry that contains devices. - rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) { + rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) + returns (DeviceRegistry) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/registries" body: "device_registry" @@ -52,7 +52,8 @@ service DeviceManager { } // Updates a device registry configuration. - rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) returns (DeviceRegistry) { + rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) + returns (DeviceRegistry) { option (google.api.http) = { patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}" body: "device_registry" @@ -60,14 +61,16 @@ service DeviceManager { } // Deletes a device registry configuration. - rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) returns (google.protobuf.Empty) { + rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/registries/*}" }; } // Lists device registries. - rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) { + rpc ListDeviceRegistries(ListDeviceRegistriesRequest) + returns (ListDeviceRegistriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/registries" }; @@ -123,7 +126,8 @@ service DeviceManager { // Modifies the configuration for the device, which is eventually sent from // the Cloud IoT Core servers. Returns the modified configuration version and // its metadata. - rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) returns (DeviceConfig) { + rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) + returns (DeviceConfig) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig" body: "*" @@ -136,7 +140,8 @@ service DeviceManager { // Lists the last few versions of the device configuration in descending // order (i.e.: newest first). - rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) returns (ListDeviceConfigVersionsResponse) { + rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) + returns (ListDeviceConfigVersionsResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions" additional_bindings { @@ -147,7 +152,8 @@ service DeviceManager { // Lists the last few versions of the device state in descending order (i.e.: // newest first). - rpc ListDeviceStates(ListDeviceStatesRequest) returns (ListDeviceStatesResponse) { + rpc ListDeviceStates(ListDeviceStatesRequest) + returns (ListDeviceStatesResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states" additional_bindings { @@ -158,7 +164,8 @@ service DeviceManager { // Sets the access control policy on the specified resource. Replaces any // existing policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy" body: "*" @@ -172,7 +179,8 @@ service DeviceManager { // Gets the access control policy for a resource. // Returns an empty policy if the resource exists and does not have a policy // set. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy" body: "*" @@ -186,7 +194,8 @@ service DeviceManager { // Returns permissions that a caller has on the specified resource. // If the resource does not exist, this will return an empty set of // permissions, not a NOT_FOUND error. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions" body: "*" @@ -210,7 +219,8 @@ service DeviceManager { // method will return FAILED_PRECONDITION. Otherwise, this method will // return OK. If the subscription is QoS 1, at least once delivery will be // guaranteed; for QoS 0, no acknowledgment will be expected from the device. - rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) { + rpc SendCommandToDevice(SendCommandToDeviceRequest) + returns (SendCommandToDeviceResponse) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice" body: "*" @@ -222,7 +232,8 @@ service DeviceManager { } // Associates the device with the gateway. - rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) { + rpc BindDeviceToGateway(BindDeviceToGatewayRequest) + returns (BindDeviceToGatewayResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway" body: "*" @@ -234,7 +245,8 @@ service DeviceManager { } // Deletes the association between the device and the gateway. - rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) { + rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) + returns (UnbindDeviceFromGatewayResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway" body: "*" @@ -509,9 +521,7 @@ message SendCommandToDeviceRequest { } // Response for `SendCommandToDevice`. -message SendCommandToDeviceResponse { - -} +message SendCommandToDeviceResponse {} // Request for `BindDeviceToGateway`. message BindDeviceToGatewayRequest { @@ -530,9 +540,7 @@ message BindDeviceToGatewayRequest { } // Response for `BindDeviceToGateway`. -message BindDeviceToGatewayResponse { - -} +message BindDeviceToGatewayResponse {} // Request for `UnbindDeviceFromGateway`. message UnbindDeviceFromGatewayRequest { @@ -551,6 +559,4 @@ message UnbindDeviceFromGatewayRequest { } // Response for `UnbindDeviceFromGateway`. -message UnbindDeviceFromGatewayResponse { - -} +message UnbindDeviceFromGatewayResponse {} diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto index a362ca26b39..2a91e989e98 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; option java_package = "com.google.cloud.iot.v1"; - // The device resource. message Device { // The user-defined device identifier. The device ID must be unique diff --git a/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js index fc4b5be93f0..432ab6bb928 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 969697b08c6..94ef357faf7 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-13T12:16:37.820785Z", + "updateTime": "2019-02-26T12:30:38.478922Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.13", - "dockerImage": "googleapis/artman@sha256:5fd9aee1d82a00cebf425c8fa431f5457539562f5867ad9c54370f0ec9a7ccaa" + "version": "0.16.14", + "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ca61898878f0926dd9dcc68ba90764f17133efe4", - "internalRef": "233680013" + "sha": "29f098cb03a9983cc9cb15993de5da64419046f2", + "internalRef": "235621085" } }, { From 24954ac48c39d0e717392b7fb06529d0432bbefc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 5 Mar 2019 05:40:20 -0800 Subject: [PATCH 083/370] build: update release configuration This PR was generated using Autosynth. :rainbow: Here's the log from Synthtool: ``` synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. synthtool > Ensuring dependencies. synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7 Status: Image is up to date for googleapis/artman:latest synthtool > Cloning googleapis. synthtool > Running generator for google/cloud/iot/artman_cloudiot.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/iot-v1. synthtool > Replaced '(listDeviceRegistriesStream\\(.*\n\\s+options = .*\n)(\n\\s+return)' in src/v1/device_manager_client.js. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .jsdoc.js .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node11/common.cfg .kokoro/continuous/node11/test.cfg .kokoro/continuous/node6/common.cfg .kokoro/continuous/node6/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/docs.cfg .kokoro/continuous/node8/lint.cfg .kokoro/continuous/node8/samples-test.cfg .kokoro/continuous/node8/system-test-grpcjs.cfg .kokoro/continuous/node8/system-test.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node11/common.cfg .kokoro/presubmit/node11/test.cfg .kokoro/presubmit/node6/common.cfg .kokoro/presubmit/node6/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/docs.cfg .kokoro/presubmit/node8/lint.cfg .kokoro/presubmit/node8/samples-test.cfg .kokoro/presubmit/node8/system-test-grpcjs.cfg .kokoro/presubmit/node8/system-test.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE codecov.yaml renovate.json synthtool > Replaced '\\[RFC(.*)\\]\\(https:\\/\\/cloud\\.google\\.com' in src/v1/doc/google/cloud/iot/v1/doc_resources.js. synthtool > Replaced 'https:\\/\\/cloud\\.google\\.com[\\s\\*]*http:\\/\\/(.*)[\\s\\*]*\\)' in src/v1/doc/google/protobuf/doc_timestamp.js. synthtool > Replaced 'toISOString\\]' in src/v1/doc/google/protobuf/doc_timestamp.js. > grpc@1.19.0 install /tmpfs/src/git/autosynth/working_repo/node_modules/grpc > node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp WARN Using needle for node-pre-gyp https download [grpc] Success: "/tmpfs/src/git/autosynth/working_repo/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote > protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1107 packages from 1300 contributors and audited 6722 packages in 23.515s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details > @google-cloud/iot@0.2.0 fix /tmpfs/src/git/autosynth/working_repo > eslint --fix '**/*.js' synthtool > Cleaned up 2 temporary directories. synthtool > Wrote metadata to synth.metadata. ``` --- packages/google-cloud-iot/synth.metadata | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 94ef357faf7..cfcf5fc4dd0 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-02-26T12:30:38.478922Z", + "updateTime": "2019-03-05T12:15:19.688014Z", "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 ce6b48cea75cf0f5402409f1dff18ade8c264683 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Mar 2019 18:04:54 -0800 Subject: [PATCH 084/370] build: Add docuploader credentials to node publish jobs (#126) --- packages/google-cloud-iot/synth.metadata | 28 ++++-------------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index cfcf5fc4dd0..c86e886b1dd 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,38 +1,18 @@ { - "updateTime": "2019-03-05T12:15:19.688014Z", + "updateTime": "2019-03-08T00:45:42.164560Z", "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": "iot", - "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/iot/artman_cloudiot.yaml" + "sha": "c986e1d9618ac41343962b353d136201d72626ae" } } ] From 0462afdba3c7dcbfc59abb7fd4f79eb4e41dc5e1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 12 Mar 2019 06:43:13 -0700 Subject: [PATCH 085/370] chore: update require statement code style This PR was generated using Autosynth. :rainbow: Here's the log from Synthtool: ``` synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. synthtool > Ensuring dependencies. synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319 Status: Image is up to date for googleapis/artman:latest synthtool > Cloning googleapis. synthtool > Running generator for google/cloud/iot/artman_cloudiot.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/iot-v1. synthtool > Replaced '(listDeviceRegistriesStream\\(.*\n\\s+options = .*\n)(\n\\s+return)' in src/v1/device_manager_client.js. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .jsdoc.js .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test-grpcjs.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node11/common.cfg .kokoro/continuous/node11/test.cfg .kokoro/continuous/node6/common.cfg .kokoro/continuous/node6/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test-grpcjs.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node11/common.cfg .kokoro/presubmit/node11/test.cfg .kokoro/presubmit/node6/common.cfg .kokoro/presubmit/node6/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE codecov.yaml renovate.json synthtool > Replaced '\\[RFC(.*)\\]\\(https:\\/\\/cloud\\.google\\.com' in src/v1/doc/google/cloud/iot/v1/doc_resources.js. synthtool > Replaced 'https:\\/\\/cloud\\.google\\.com[\\s\\*]*http:\\/\\/(.*)[\\s\\*]*\\)' in src/v1/doc/google/protobuf/doc_timestamp.js. synthtool > Replaced 'toISOString\\]' in src/v1/doc/google/protobuf/doc_timestamp.js. > grpc@1.19.0 install /tmpfs/src/git/autosynth/working_repo/node_modules/grpc > node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp WARN Using needle for node-pre-gyp https download [grpc] Success: "/tmpfs/src/git/autosynth/working_repo/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote > protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1104 packages from 1301 contributors and audited 6723 packages in 25.513s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details > @google-cloud/iot@0.2.0 fix /tmpfs/src/git/autosynth/working_repo > eslint --fix '**/*.js' synthtool > Cleaned up 2 temporary directories. synthtool > Wrote metadata to synth.metadata. ``` --- .../src/v1/device_manager_client.js | 2 +- packages/google-cloud-iot/synth.metadata | 28 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 16c351841b0..b361b389efe 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./device_manager_client_config'); +const gapicConfig = require('./device_manager_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index c86e886b1dd..03d1310e3b8 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,18 +1,38 @@ { - "updateTime": "2019-03-08T00:45:42.164560Z", + "updateTime": "2019-03-12T11:15:23.868456Z", "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": "iot", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/iot/artman_cloudiot.yaml" } } ] From 92a56ba405f484cbbcf65ce169b2ff1afe44f9a7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 13 Mar 2019 15:56:28 -0700 Subject: [PATCH 086/370] Release v0.2.1 (#129) --- packages/google-cloud-iot/CHANGELOG.md | 32 +++++++++++++++++++ packages/google-cloud-iot/package.json | 2 +- .../google-cloud-iot/samples/package.json | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 7aa06b668a3..6ef2eb65e11 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## v0.2.1 + +03-13-2019 14:59 PDT + +### Bug Fixes +- fix: throw on invalid credentials ([#119](https://github.com/googleapis/nodejs-iot/pull/119)) + +### Dependencies +- fix(deps): update dependency google-gax to ^0.25.0 ([#110](https://github.com/googleapis/nodejs-iot/pull/110)) + +### Documentation +- docs: update links in contrib guide ([#121](https://github.com/googleapis/nodejs-iot/pull/121)) +- docs: update contributing path in README ([#116](https://github.com/googleapis/nodejs-iot/pull/116)) +- docs: move CONTRIBUTING.md to root ([#115](https://github.com/googleapis/nodejs-iot/pull/115)) +- docs: add lint/fix example to contributing guide ([#112](https://github.com/googleapis/nodejs-iot/pull/112)) + +### Internal / Testing Changes +- chore: update require statement code style +- build: Add docuploader credentials to node publish jobs ([#126](https://github.com/googleapis/nodejs-iot/pull/126)) +- build: use node10 to run samples-test, system-test etc ([#125](https://github.com/googleapis/nodejs-iot/pull/125)) +- build: update release configuration +- chore: update proto docs and code style +- chore(deps): update dependency mocha to v6 +- build: use linkinator for docs test ([#120](https://github.com/googleapis/nodejs-iot/pull/120)) +- build: create docs test npm scripts ([#118](https://github.com/googleapis/nodejs-iot/pull/118)) +- build: test using @grpc/grpc-js in CI ([#117](https://github.com/googleapis/nodejs-iot/pull/117)) +- refactor: improve generated code style. ([#114](https://github.com/googleapis/nodejs-iot/pull/114)) +- chore(deps): update dependency eslint-config-prettier to v4 ([#109](https://github.com/googleapis/nodejs-iot/pull/109)) +- build: ignore googleapis.com in doc link check ([#107](https://github.com/googleapis/nodejs-iot/pull/107)) +- chore: update year in the license headers. ([#106](https://github.com/googleapis/nodejs-iot/pull/106)) +- build: check broken links in generated docs ([#101](https://github.com/googleapis/nodejs-iot/pull/101)) + ## v0.2.0 01-14-2019 14:30 PST diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index c085081e635..f460dd077df 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "0.2.0", + "version": "0.2.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 2b25e028ef2..e1c3d9f5593 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^0.2.0" + "@google-cloud/iot": "^0.2.1" }, "devDependencies": { "chai": "^4.2.0", From 4b8f9a4232cba750b5596c31a58865c633c6cc65 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 4 Apr 2019 12:54:35 -0700 Subject: [PATCH 087/370] refactor: use execSync for tests (#136) --- packages/google-cloud-iot/samples/package.json | 1 - packages/google-cloud-iot/samples/test/quickstart.test.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index e1c3d9f5593..66f17c78b96 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -19,7 +19,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "execa": "^1.0.0", "mocha": "^6.0.0" } } diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index f348dd55a7e..5f95391b50e 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -15,11 +15,11 @@ 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); describe('iot samples', () => { it('should run the quickstart', async () => { - const {stdout} = await execa.shell('node quickstart'); + const stdout = execSync('node quickstart'); assert.match(stdout, /\d resource\(s\) found./); }); }); From 43abb510847632fb71edf9a9daff17fcf4c797db Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 4 Apr 2019 18:40:05 -0700 Subject: [PATCH 088/370] refactor: wrap execSync with encoding: utf-8 (#137) --- packages/google-cloud-iot/samples/test/quickstart.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 5f95391b50e..18d79ae84a7 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -15,7 +15,9 @@ 'use strict'; const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); describe('iot samples', () => { it('should run the quickstart', async () => { From e909e6661ac4b80b3d22bb2be6e0f048725fc80b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 16 Apr 2019 06:58:14 -0700 Subject: [PATCH 089/370] chore(deps): update dependency nyc to v14 chore(deps): update dependency nyc to v14 This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | nyc | devDependencies | major | [`^13.0.0` -> `^14.0.0`](https://diff.intrinsic.com/nyc/13.3.0/14.0.0) | [source](https://togithub.com/istanbuljs/nyc) | --- ### Release Notes
istanbuljs/nyc ### [`v14.0.0`](https://togithub.com/istanbuljs/nyc/blob/master/CHANGELOG.md#​1400httpsgithubcomistanbuljsnyccomparev1330v1400-2019-04-15) [Compare Source](https://togithub.com/istanbuljs/nyc/compare/v13.3.0...v14.0.0) ##### Bug Fixes - Add `cwd` option to instrument command ([#​1024](https://togithub.com/istanbuljs/nyc/issues/1024)) ([051d95a](https://togithub.com/istanbuljs/nyc/commit/051d95a)) - Add config values to hash salt ([#​988](https://togithub.com/istanbuljs/nyc/issues/988)) ([7ac325d](https://togithub.com/istanbuljs/nyc/commit/7ac325d)), closes [#​522](https://togithub.com/istanbuljs/nyc/issues/522) - Exclude negated not working with '--all' switch ([#​977](https://togithub.com/istanbuljs/nyc/issues/977)) ([91de23c](https://togithub.com/istanbuljs/nyc/commit/91de23c)) - Make --all work for transpiled code ([#​1047](https://togithub.com/istanbuljs/nyc/issues/1047)) ([18e04ba](https://togithub.com/istanbuljs/nyc/commit/18e04ba)) - Resolve absolute paths in nyc instrument ([#​1012](https://togithub.com/istanbuljs/nyc/issues/1012)) ([3cb1861](https://togithub.com/istanbuljs/nyc/commit/3cb1861)), closes [#​1014](https://togithub.com/istanbuljs/nyc/issues/1014) - Set processinfo pid/ppid to actual numbers ([#​1057](https://togithub.com/istanbuljs/nyc/issues/1057)) ([32f75b0](https://togithub.com/istanbuljs/nyc/commit/32f75b0)) - Use a single instance of nyc for all actions of main command. ([#​1059](https://togithub.com/istanbuljs/nyc/issues/1059)) ([b909575](https://togithub.com/istanbuljs/nyc/commit/b909575)) ##### Features - Add `delete` option to instrument command ([#​1005](https://togithub.com/istanbuljs/nyc/issues/1005)) ([d6db551](https://togithub.com/istanbuljs/nyc/commit/d6db551)) - Add `include` and `exclude` options to instrument command ([#​1007](https://togithub.com/istanbuljs/nyc/issues/1007)) ([8da097e](https://togithub.com/istanbuljs/nyc/commit/8da097e)) - Add processinfo index, add externalId ([#​1055](https://togithub.com/istanbuljs/nyc/issues/1055)) ([8dcf180](https://togithub.com/istanbuljs/nyc/commit/8dcf180)) - Add support for nyc.config.js ([#​1019](https://togithub.com/istanbuljs/nyc/issues/1019)) ([3b203c7](https://togithub.com/istanbuljs/nyc/commit/3b203c7)) - Add support to exclude files on coverage report generation ([#​982](https://togithub.com/istanbuljs/nyc/issues/982)) ([509c6aa](https://togithub.com/istanbuljs/nyc/commit/509c6aa)) - Add test-exclude args to check-coverage and report subcommands. ([0fc217e](https://togithub.com/istanbuljs/nyc/commit/0fc217e)) - Always build the processinfo temp dir ([#​1061](https://togithub.com/istanbuljs/nyc/issues/1061)) ([c213469](https://togithub.com/istanbuljs/nyc/commit/c213469)) - Enable `es-modules` option for nyc instrument command ([#​1006](https://togithub.com/istanbuljs/nyc/issues/1006)) ([596b120](https://togithub.com/istanbuljs/nyc/commit/596b120)) - Fix excludeAfterRemap functionality. ([36bcc0b](https://togithub.com/istanbuljs/nyc/commit/36bcc0b)) - Implement `nyc instrument --complete-copy` ([#​1056](https://togithub.com/istanbuljs/nyc/issues/1056)) ([2eb13c6](https://togithub.com/istanbuljs/nyc/commit/2eb13c6)) - Remove bundling ([#​1017](https://togithub.com/istanbuljs/nyc/issues/1017)) ([b25492a](https://togithub.com/istanbuljs/nyc/commit/b25492a)) - Support turning off node_modules default exclude via `exclude-node-modules` option ([#​912](https://togithub.com/istanbuljs/nyc/issues/912)) ([b7e16cd](https://togithub.com/istanbuljs/nyc/commit/b7e16cd)) - Add support for `--exclude-node-modules` to subcommands. ([#​1053](https://togithub.com/istanbuljs/nyc/issues/1053)) ([e597c46](https://togithub.com/istanbuljs/nyc/commit/e597c46)) ##### BREAKING CHANGES - The `--exclude-after-remap` option is now functional and enabled by default. This causes the `include` and `exclude` lists to be processed after using source maps to determine the original filename of sources. - Add a file named 'index.json' to the .nyc_output/processinfo directory, which has a different format from the other files in this dir. - Change the data type of the pid/ppid fields in processinfo files - `nyc instrument` now honors `include` and `exclude` settings, potentially resulting in some files that were previously instrumented being ignored. - The `plugins` option has been renamed to `parser-plugins`. - The logic involving include/exclude processing has changed. Results should be verified to ensure all desired sources have coverage data. - `nyc instrument` now enables the `--es-module` option by default. This can cause failures to instrument scripts which violate `'use strict'` rules.
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-iot). #138 automerged by dpebot --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f460dd077df..18ae2f451cf 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -51,7 +51,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.6.0", "prettier": "^1.13.7", "linkinator": "^1.1.2" From 6a04cf925d4b1c09901bdb0ff0173cde65f7da85 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 22 Apr 2019 08:56:56 -0700 Subject: [PATCH 090/370] chore(docs): formatting updates (#139) --- .../src/v1/doc/google/protobuf/doc_any.js | 3 +- .../v1/doc/google/protobuf/doc_field_mask.js | 44 ++++++++----------- .../v1/doc/google/protobuf/doc_timestamp.js | 26 ++++++----- packages/google-cloud-iot/synth.metadata | 12 ++--- 4 files changed, 40 insertions(+), 45 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js index f3278b34e66..9ff5d007807 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js index d55d97e6e38..011207b8626 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-iot/src/v1/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-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js index b47f41c2b30..98c19dbf0d3 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 03d1310e3b8..13dc1bfe9f6 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-03-12T11:15:23.868456Z", + "updateTime": "2019-04-21T11:45:11.642022Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.16", - "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" + "version": "0.16.26", + "dockerImage": "googleapis/artman@sha256:314eae2a40f6f7822db77365cf5f45bd513d628ae17773fd0473f460e7c2a665" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", - "internalRef": "237945492" + "sha": "3369c803f56d52662ea3792076deb8545183bdb0", + "internalRef": "244282812" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.2.26" + "version": "2019.4.10" } } ], From ca72668b46120c5e7a0ed357f062ccd44becb385 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 23 Apr 2019 15:31:36 -0700 Subject: [PATCH 091/370] chore: re-order template utils (#140) --- .../src/v1/device_manager_client.js | 120 +++++++++--------- packages/google-cloud-iot/synth.metadata | 10 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index b361b389efe..d7d5923be5d 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -100,15 +100,15 @@ class DeviceManagerClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { + devicePathTemplate: new gax.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' + ), locationPathTemplate: new gax.PathTemplate( 'projects/{project}/locations/{location}' ), registryPathTemplate: new gax.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}' ), - devicePathTemplate: new gax.PathTemplate( - 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' - ), }; // Some of the methods on this service return "paged" results, @@ -1675,53 +1675,97 @@ class DeviceManagerClient { // -------------------- /** - * Return a fully-qualified location resource name string. + * Return a fully-qualified device resource name string. * * @param {String} project * @param {String} location + * @param {String} registry + * @param {String} device * @returns {String} */ - locationPath(project, location) { - return this._pathTemplates.locationPathTemplate.render({ + devicePath(project, location, registry, device) { + return this._pathTemplates.devicePathTemplate.render({ project: project, location: location, + registry: registry, + device: device, }); } /** - * Return a fully-qualified registry resource name string. + * Return a fully-qualified location resource name string. * * @param {String} project * @param {String} location - * @param {String} registry * @returns {String} */ - registryPath(project, location, registry) { - return this._pathTemplates.registryPathTemplate.render({ + locationPath(project, location) { + return this._pathTemplates.locationPathTemplate.render({ project: project, location: location, - registry: registry, }); } /** - * Return a fully-qualified device resource name string. + * Return a fully-qualified registry resource name string. * * @param {String} project * @param {String} location * @param {String} registry - * @param {String} device * @returns {String} */ - devicePath(project, location, registry, device) { - return this._pathTemplates.devicePathTemplate.render({ + registryPath(project, location, registry) { + return this._pathTemplates.registryPathTemplate.render({ project: project, location: location, registry: registry, - device: device, }); } + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate.match(deviceName).project; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the location. + */ + matchLocationFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate.match(deviceName).location; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the registry. + */ + matchRegistryFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate.match(deviceName).registry; + } + + /** + * Parse the deviceName from a device resource. + * + * @param {String} deviceName + * A fully-qualified path representing a device resources. + * @returns {String} - A string representing the device. + */ + matchDeviceFromDeviceName(deviceName) { + return this._pathTemplates.devicePathTemplate.match(deviceName).device; + } + /** * Parse the locationName from a location resource. * @@ -1779,50 +1823,6 @@ class DeviceManagerClient { return this._pathTemplates.registryPathTemplate.match(registryName) .registry; } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).project; - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).location; - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the registry. - */ - matchRegistryFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).registry; - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the device. - */ - matchDeviceFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).device; - } } module.exports = DeviceManagerClient; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 13dc1bfe9f6..5d27479e9f5 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-04-21T11:45:11.642022Z", + "updateTime": "2019-04-23T11:13:38.056552Z", "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 2daa5dc2dc8b025a122f1ffaafb359eda85fbf75 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 29 Apr 2019 15:03:43 -0700 Subject: [PATCH 092/370] update to .nycrc with --all enabled (#141) --- packages/google-cloud-iot/.nycrc | 40 ++++++++++++++------------------ 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index 88b001cb587..bfe4073a6ab 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.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 23e6b694fb84bfa172edfc32e1123325098064c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 2 May 2019 09:15:20 -0700 Subject: [PATCH 093/370] fix(deps): update dependency google-gax to ^0.26.0 (#142) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 18ae2f451cf..8b7e8e5345b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -37,7 +37,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^0.25.0", + "google-gax": "^0.26.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 3320c23ef864dc0c8faf50b48d7fc461285aaecf Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 2 May 2019 11:29:46 -0700 Subject: [PATCH 094/370] build!: upgrade engines field to >=8.10.0 (#144) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 8b7e8e5345b..fb639490a42 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=6.0.0" + "node": ">=8.10.0" }, "repository": "googleapis/nodejs-iot", "main": "src/index.js", From cc6d59645531c72cfec345048979125d715fe586 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 08:20:23 -0700 Subject: [PATCH 095/370] chore(deps): update dependency eslint-plugin-node to v9 (#146) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index fb639490a42..27b8c9eafd6 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -45,7 +45,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.1", "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 50df4403d179661513af0c64cf15149e791c9614 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 7 May 2019 10:35:55 -0700 Subject: [PATCH 096/370] build: only pipe to codecov if tests run on Node 10 (#147) --- packages/google-cloud-iot/synth.metadata | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 5d27479e9f5..9a48f8b57f1 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-04-23T11:13:38.056552Z", + "updateTime": "2019-05-04T11:15:24.641079Z", "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": "547e19e7df398e9290e8e3674d7351efc500f9b0", - "internalRef": "244712781" + "sha": "39c876cca5403e7e8282ce2229033cc3cc02962c", + "internalRef": "246561601" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.4.10" + "version": "2019.5.2" } } ], From 2292d0720fd448358e740ce47c7b5944e56174d2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Wed, 8 May 2019 17:40:58 -0700 Subject: [PATCH 097/370] fix: DEADLINE_EXCEEDED is no longer retried (#152) --- packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/src/index.js | 3 ++ .../src/v1/device_manager_client.js | 9 ++-- .../src/v1/device_manager_client_config.json | 2 - .../v1/doc/google/iam/v1/doc_iam_policy.js | 9 ++-- .../src/v1/doc/google/iam/v1/doc_policy.js | 39 ++++++++++---- .../src/v1/doc/google/type/doc_expr.js | 51 +++++++++++++++++++ packages/google-cloud-iot/synth.metadata | 10 ++-- 8 files changed, 96 insertions(+), 29 deletions(-) create mode 100644 packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 27b8c9eafd6..c8e5a0d6fab 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -49,7 +49,7 @@ "eslint-plugin-prettier": "^3.0.0", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", - "jsdoc": "^3.5.5", + "jsdoc": "3.5.5", "mocha": "^6.0.0", "nyc": "^14.0.0", "power-assert": "^1.6.0", diff --git a/packages/google-cloud-iot/src/index.js b/packages/google-cloud-iot/src/index.js index 3d6dc4e2cc1..8e2c67de6f6 100644 --- a/packages/google-cloud-iot/src/index.js +++ b/packages/google-cloud-iot/src/index.js @@ -36,6 +36,9 @@ /** * @namespace google.rpc */ +/** + * @namespace google.type + */ 'use strict'; diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index d7d5923be5d..5111f2b88c6 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -1266,8 +1266,7 @@ class DeviceManagerClient { * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy is being specified. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * @param {Object} request.policy * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a @@ -1335,8 +1334,7 @@ class DeviceManagerClient { * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -1392,8 +1390,7 @@ class DeviceManagerClient { * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy detail is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * @param {string[]} request.permissions * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more diff --git a/packages/google-cloud-iot/src/v1/device_manager_client_config.json b/packages/google-cloud-iot/src/v1/device_manager_client_config.json index 024d680d160..6f11beee8b4 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client_config.json +++ b/packages/google-cloud-iot/src/v1/device_manager_client_config.json @@ -3,12 +3,10 @@ "google.cloud.iot.v1.DeviceManager": { "retry_codes": { "idempotent": [ - "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [], "rate_limited_aware": [ - "DEADLINE_EXCEEDED", "RESOURCE_EXHAUSTED", "UNAVAILABLE" ] diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js index 12b7ac5df09..d675b1b0d54 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js @@ -20,8 +20,7 @@ * * @property {string} resource * REQUIRED: The resource for which the policy is being specified. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * * @property {Object} policy * REQUIRED: The complete policy to be applied to the `resource`. The size of @@ -44,8 +43,7 @@ const SetIamPolicyRequest = { * * @property {string} resource * REQUIRED: The resource for which the policy is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * * @typedef GetIamPolicyRequest * @memberof google.iam.v1 @@ -60,8 +58,7 @@ const GetIamPolicyRequest = { * * @property {string} resource * REQUIRED: The resource for which the policy detail is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * * @property {string[]} permissions * The set of permissions to check for the `resource`. Permissions with diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index bcae4a7d873..09c3a5bdc56 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -20,12 +20,12 @@ * specify access control policies for Cloud Platform resources. * * - * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + * A `Policy` consists of a list of `bindings`. A `binding` binds a list of * `members` to a `role`, where the members can be user accounts, Google groups, * Google domains, and service accounts. A `role` is a named list of permissions * defined by IAM. * - * **Example** + * **JSON Example** * * { * "bindings": [ @@ -35,7 +35,7 @@ * "user:mike@example.com", * "group:admins@example.com", * "domain:google.com", - * "serviceAccount:my-other-app@appspot.gserviceaccount.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" * ] * }, * { @@ -45,15 +45,28 @@ * ] * } * + * **YAML Example** + * + * bindings: + * - members: + * - user:mike@example.com + * - group:admins@example.com + * - domain:google.com + * - serviceAccount:my-other-app@appspot.gserviceaccount.com + * role: roles/owner + * - members: + * - user:sean@example.com + * role: roles/viewer + * + * * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam). + * [IAM developer's guide](https://cloud.google.com/iam/docs). * * @property {number} version - * Version of the `Policy`. The default version is 0. + * Deprecated. * * @property {Object[]} bindings * Associates a list of `members` to a `role`. - * Multiple `bindings` must not be specified for the same `role`. * `bindings` with no members will result in an error. * * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} @@ -84,7 +97,6 @@ const Policy = { * @property {string} role * Role that is assigned to `members`. * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * Required * * @property {string[]} members * Specifies the identities requesting access for a Cloud Platform resource. @@ -97,7 +109,7 @@ const Policy = { * who is authenticated with a Google account or a service account. * * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@gmail.com` or `joe@example.com`. + * account. For example, `alice@gmail.com` . * * * * `serviceAccount:{emailid}`: An email address that represents a service @@ -106,9 +118,18 @@ const Policy = { * * `group:{emailid}`: An email address that represents a Google group. * For example, `admins@example.com`. * - * * `domain:{domain}`: A Google Apps domain name that represents all the + * + * * `domain:{domain}`: The G Suite domain (primary) that represents all the * users of that domain. For example, `google.com` or `example.com`. * + * @property {Object} condition + * The condition that is associated with this binding. + * NOTE: An unsatisfied condition will not allow user access via current + * binding. Different bindings, including their conditions, are examined + * independently. + * + * This object should have the same structure as [Expr]{@link google.type.Expr} + * * @typedef Binding * @memberof google.iam.v1 * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} diff --git a/packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js b/packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js new file mode 100644 index 00000000000..421a7ee9e6a --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js @@ -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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * Represents an expression text. Example: + * + * title: "User account presence" + * description: "Determines whether the request has a user account" + * expression: "size(request.user) > 0" + * + * @property {string} expression + * Textual representation of an expression in + * Common Expression Language syntax. + * + * The application context of the containing message determines which + * well-known feature set of CEL is supported. + * + * @property {string} title + * An optional title for the expression, i.e. a short string describing + * its purpose. This can be used e.g. in UIs which allow to enter the + * expression. + * + * @property {string} description + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + * + * @property {string} location + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + * + * @typedef Expr + * @memberof google.type + * @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto} + */ +const Expr = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 9a48f8b57f1..5575ef7ff99 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-04T11:15:24.641079Z", + "updateTime": "2019-05-08T16:15:42.726285Z", "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": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", + "internalRef": "247143125" } }, { From 5956f2a63ab7f1fb9bad21b6c11f6a69704a9703 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 10 May 2019 15:08:35 -0700 Subject: [PATCH 098/370] fix: DEADLINE_EXCEEDED retry code is idempotent (#155) --- .../src/v1/device_manager_client_config.json | 2 ++ packages/google-cloud-iot/synth.metadata | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client_config.json b/packages/google-cloud-iot/src/v1/device_manager_client_config.json index 6f11beee8b4..024d680d160 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client_config.json +++ b/packages/google-cloud-iot/src/v1/device_manager_client_config.json @@ -3,10 +3,12 @@ "google.cloud.iot.v1.DeviceManager": { "retry_codes": { "idempotent": [ + "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [], "rate_limited_aware": [ + "DEADLINE_EXCEEDED", "RESOURCE_EXHAUSTED", "UNAVAILABLE" ] diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 5575ef7ff99..f4ca8b46cf0 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-08T16:15:42.726285Z", + "updateTime": "2019-05-10T12:04:23.805233Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", - "internalRef": "247143125" + "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a", + "internalRef": "247530843" } }, { From 542174cd04287271b4ab02ee2d9fe013488363d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 10 May 2019 15:13:31 -0700 Subject: [PATCH 099/370] fix(deps): update dependency google-gax to v1 (#154) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index c8e5a0d6fab..f183ac1acc9 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -37,7 +37,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^0.26.0", + "google-gax": "^1.0.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From d02032971170a62b1b89d1da80fcfa4edc66e044 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 13 May 2019 09:39:08 -0700 Subject: [PATCH 100/370] chore(deps): update dependency jsdoc to v3.6.2 (#156) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f183ac1acc9..e799b38561a 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -49,7 +49,7 @@ "eslint-plugin-prettier": "^3.0.0", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", - "jsdoc": "3.5.5", + "jsdoc": "^3.6.2", "mocha": "^6.0.0", "nyc": "^14.0.0", "power-assert": "^1.6.0", From 2096d13c1a7819bb72fa20d43101352908b0efbe Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 08:18:33 -0700 Subject: [PATCH 101/370] build: add new kokoro config for coverage and release-please (#157) --- packages/google-cloud-iot/synth.metadata | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f4ca8b46cf0..a6b5dc45246 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-10T12:04:23.805233Z", + "updateTime": "2019-05-17T01:06:32.297590Z", "sources": [ { "generator": { @@ -12,15 +12,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a", - "internalRef": "247530843" + "sha": "03269e767cff9dd644d7784a4d4350b2ba6daf69", + "internalRef": "248524261" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.4.10" } } ], From 719079d6a44af734cb0fcb0b287da6be84b15fea Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 16:49:14 -0700 Subject: [PATCH 102/370] build: updated kokoro config for coverage and release-please (#158) --- packages/google-cloud-iot/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a6b5dc45246..8ff223b3192 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-17T01:06:32.297590Z", + "updateTime": "2019-05-17T19:46:06.265179Z", "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 085fef124fd74c42c12727cad71780d1e4a98f46 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 May 2019 07:59:21 -0700 Subject: [PATCH 103/370] chore: release 1.0.0 (#162) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-iot/CHANGELOG.md | 19 +++++++++++++++++++ packages/google-cloud-iot/package.json | 2 +- .../google-cloud-iot/samples/package.json | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 6ef2eb65e11..ac07d101155 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.0.0](https://www.github.com/googleapis/nodejs-iot/compare/v0.2.1...v1.0.0) (2019-05-20) + + +### ⚠ BREAKING CHANGES + +* upgrade engines field to >=8.10.0 (#144) + +### Bug Fixes + +* **deps:** update dependency google-gax to ^0.26.0 ([#142](https://www.github.com/googleapis/nodejs-iot/issues/142)) ([e329c68](https://www.github.com/googleapis/nodejs-iot/commit/e329c68)) +* DEADLINE_EXCEEDED is no longer retried ([#152](https://www.github.com/googleapis/nodejs-iot/issues/152)) ([d037e51](https://www.github.com/googleapis/nodejs-iot/commit/d037e51)) +* DEADLINE_EXCEEDED retry code is idempotent ([#155](https://www.github.com/googleapis/nodejs-iot/issues/155)) ([9e177ed](https://www.github.com/googleapis/nodejs-iot/commit/9e177ed)) +* **deps:** update dependency google-gax to v1 ([#154](https://www.github.com/googleapis/nodejs-iot/issues/154)) ([ea2d803](https://www.github.com/googleapis/nodejs-iot/commit/ea2d803)) + + +### Build System + +* upgrade engines field to >=8.10.0 ([#144](https://www.github.com/googleapis/nodejs-iot/issues/144)) ([320fb70](https://www.github.com/googleapis/nodejs-iot/commit/320fb70)) + ## v0.2.1 03-13-2019 14:59 PDT diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index e799b38561a..30283819753 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "0.2.1", + "version": "1.0.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 66f17c78b96..e8e98306085 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^0.2.1" + "@google-cloud/iot": "^1.0.0" }, "devDependencies": { "chai": "^4.2.0", From fcef410f95f038eb5ceed5e436f6ab2ceef84092 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 May 2019 10:24:01 -0700 Subject: [PATCH 104/370] refactor: drop dependency on lodash.merge and update links (#164) --- packages/google-cloud-iot/package.json | 3 +- .../src/v1/device_manager_client.js | 52 +++++++++---------- packages/google-cloud-iot/synth.metadata | 12 ++--- 3 files changed, 31 insertions(+), 36 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 30283819753..0211f0b0d82 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -37,8 +37,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-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 5111f2b88c6..bd95c158257 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./device_manager_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../package.json').version; @@ -88,12 +87,9 @@ class DeviceManagerClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/cloud/iot/v1/device_manager.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/cloud/iot/v1/device_manager.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -243,7 +239,7 @@ class DeviceManagerClient { * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -302,7 +298,7 @@ class DeviceManagerClient { * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -367,7 +363,7 @@ class DeviceManagerClient { * 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. * @@ -426,7 +422,7 @@ class DeviceManagerClient { * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. @@ -478,7 +474,7 @@ class DeviceManagerClient { * 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. * @@ -590,7 +586,7 @@ class DeviceManagerClient { * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. * @@ -644,7 +640,7 @@ class DeviceManagerClient { * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -709,7 +705,7 @@ class DeviceManagerClient { * 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. * @@ -774,7 +770,7 @@ class DeviceManagerClient { * 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. * @@ -834,7 +830,7 @@ class DeviceManagerClient { * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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. @@ -902,7 +898,7 @@ class DeviceManagerClient { * 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. * @@ -1030,7 +1026,7 @@ class DeviceManagerClient { * 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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. * @@ -1081,7 +1077,7 @@ class DeviceManagerClient { * simultaneous updates without losing data. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -1150,7 +1146,7 @@ class DeviceManagerClient { * value is zero, it will return all the versions available. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1214,7 +1210,7 @@ class DeviceManagerClient { * value is zero, it will return all the states available. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1276,7 +1272,7 @@ class DeviceManagerClient { * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1337,7 +1333,7 @@ class DeviceManagerClient { * See the operation documentation for the appropriate value for this field. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1398,7 +1394,7 @@ class DeviceManagerClient { * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1478,7 +1474,7 @@ class DeviceManagerClient { * and must not contain any MQTT wildcards ("+" or "#") or null characters. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1544,7 +1540,7 @@ class DeviceManagerClient { * identifier. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -1612,7 +1608,7 @@ class DeviceManagerClient { * identifier. * @param {Object} [options] * Optional parameters. You can override the default settings for 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 8ff223b3192..bb1e3512eaa 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-05-17T19:46:06.265179Z", + "updateTime": "2019-05-21T11:16:06.378660Z", "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 7bc1fc4122e9dc4525d47f09ac65a13348e54568 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 May 2019 02:38:42 +0000 Subject: [PATCH 105/370] chore: use published jsdoc-baseline package (#165) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0211f0b0d82..071d4cb84e3 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -46,7 +46,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.6.2", "mocha": "^6.0.0", From a21b45aa00c8d0ce1e0a90c67202a1d086a3938c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 28 May 2019 16:21:18 +0000 Subject: [PATCH 106/370] docs: update quickstart and generate readme (#167) --- .../google-cloud-iot/.cloud-repo-tools.json | 7 -- packages/google-cloud-iot/.gitignore | 3 +- .../google-cloud-iot/.readme-partials.yaml | 4 + packages/google-cloud-iot/.repo-metadata.json | 12 +++ packages/google-cloud-iot/README.md | 97 ++++++++++++++----- packages/google-cloud-iot/package.json | 1 - packages/google-cloud-iot/samples/README.md | 46 +++++++++ .../google-cloud-iot/samples/quickstart.js | 22 +++-- packages/google-cloud-iot/synth.metadata | 6 +- 9 files changed, 152 insertions(+), 46 deletions(-) delete mode 100644 packages/google-cloud-iot/.cloud-repo-tools.json create mode 100644 packages/google-cloud-iot/.readme-partials.yaml create mode 100644 packages/google-cloud-iot/.repo-metadata.json create mode 100644 packages/google-cloud-iot/samples/README.md diff --git a/packages/google-cloud-iot/.cloud-repo-tools.json b/packages/google-cloud-iot/.cloud-repo-tools.json deleted file mode 100644 index 259daca8f8d..00000000000 --- a/packages/google-cloud-iot/.cloud-repo-tools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "requiresKeyFile": true, - "requiresProjectId": true, - "product": "cloudiot", - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/iot/latest/", - "release_quality": "alpha" -} diff --git a/packages/google-cloud-iot/.gitignore b/packages/google-cloud-iot/.gitignore index 531c77e628b..af6629b80e6 100644 --- a/packages/google-cloud-iot/.gitignore +++ b/packages/google-cloud-iot/.gitignore @@ -9,6 +9,5 @@ system-test/secrets.js system-test/*key.json *.lock .DS_Store -google-cloud-logging-winston-*.tgz -google-cloud-logging-bunyan-*.tgz +__pycache__ package-lock.json diff --git a/packages/google-cloud-iot/.readme-partials.yaml b/packages/google-cloud-iot/.readme-partials.yaml new file mode 100644 index 00000000000..b7b914a2154 --- /dev/null +++ b/packages/google-cloud-iot/.readme-partials.yaml @@ -0,0 +1,4 @@ +introduction: |- + > Node.js idiomatic client for [Cloud IoT Core][product-docs]. + + [Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json new file mode 100644 index 00000000000..6a39434734a --- /dev/null +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "iot", + "name_pretty": "Google Cloud Internet of Things (IoT) Core", + "product_documentation": "https://cloud.google.com/iot", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/iot/latest/", + "release_level": "alpha", + "language": "nodejs", + "repo": "googleapis/nodejs-iot", + "distribution_name": "@google-cloud/iot", + "api_id": "cloudiot.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 2f2ccdd1a84..21ebe3b5c8b 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -1,49 +1,107 @@ [//]: # "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 -# [Google Cloud IoT Core: Node.js Client](https://github.com/googleapis/nodejs-iot) +# [Google Cloud Internet of Things (IoT) Core: Node.js Client](https://github.com/googleapis/nodejs-iot) -[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) + + + +> Node.js idiomatic client for [Cloud IoT Core][product-docs]. + [Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. -* [Using the client library](#using-the-client-library) +* [Google Cloud Internet of Things (IoT) Core Node.js Client API Reference][client-docs] +* [Google Cloud Internet of Things (IoT) Core Documentation][product-docs] +* [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) + +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) -## Using the client library +## Quickstart -1. [Select or create a Cloud Platform project][projects]. +### Before you begin +1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. - -1. [Enable the Google Cloud IoT Core API][enable_api]. - +1. [Enable the Google Cloud Internet of Things (IoT) Core API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. -1. Install the client library: +### Installing the client library + +```bash +npm install @google-cloud/iot +``` + + +### Using the client library - npm install --save @google-cloud/iot +```javascript + const iot = require('@google-cloud/iot'); + const client = new iot.v1.DeviceManagerClient(); + async function quickstart() { + const projectId = await client.getProjectId(); + const parent = client.locationPath(projectId, 'us-central1'); + const [resources] = await client.listDeviceRegistries({parent}); + console.log(`${resources.length} resource(s) found.`); + for (const resource of resources) { + console.log(resource); + } + } + quickstart(); +``` -The [Cloud IoT Core Node.js Client API Reference][client-docs] documentation + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-iot/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | + + + +The [Google Cloud Internet of Things (IoT) Core 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 **alpha**. This means it is still a work-in-progress and under active development. Any release is subject to backwards-incompatible changes at any time. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages @@ -58,21 +116,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -## What's Next - -* [Cloud IoT Core Documentation][product-docs] -* [Cloud IoT Core Node.js Client API Reference][client-docs] -* [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) - -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 - [client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest/ -[product-docs]: https://cloud.google.com/iot/docs +[product-docs]: https://cloud.google.com/iot [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=cloudiot.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 071d4cb84e3..d9e133c43ca 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -40,7 +40,6 @@ "google-gax": "^1.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.2", "eslint": "^5.0.1", "eslint-config-prettier": "^4.0.0", diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md new file mode 100644 index 00000000000..74fa8fb6929 --- /dev/null +++ b/packages/google-cloud-iot/samples/README.md @@ -0,0 +1,46 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Cloud Internet of Things (IoT) Core: Node.js Samples](https://github.com/googleapis/nodejs-iot) + +[![Open in Cloud Shell][shell_img]][shell_link] + +> Node.js idiomatic client for [Cloud IoT Core][product-docs]. + +[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## 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-iot#using-the-client-library). + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node quickstart.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-iot&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/iot \ No newline at end of file diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 83d10f4feb5..01cd81a0329 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -14,15 +14,21 @@ 'use strict'; -async function quickstart() { +async function main() { + // [START iot_quickstart] const iot = require('@google-cloud/iot'); const client = new iot.v1.DeviceManagerClient(); - const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID'; - const parent = client.locationPath(projectId, 'us-central1'); - const [resources] = await client.listDeviceRegistries({parent}); - console.log(`${resources.length} resource(s) found.`); - for (const resource of resources) { - console.log(resource); + + async function quickstart() { + const projectId = await client.getProjectId(); + const parent = client.locationPath(projectId, 'us-central1'); + const [resources] = await client.listDeviceRegistries({parent}); + console.log(`${resources.length} resource(s) found.`); + for (const resource of resources) { + console.log(resource); + } } + quickstart(); + // [END iot_quickstart] } -quickstart().catch(console.error); +main(); diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index bb1e3512eaa..0bb2322e775 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-21T11:16:06.378660Z", + "updateTime": "2019-05-24T04:05:32.496621Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", - "internalRef": "249058354" + "sha": "0537189470f04f24836d6959821c24197a0ed120", + "internalRef": "249742806" } }, { From 8d67ff7ce5798df301d3d8aa2a9827d1ef85d679 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 28 May 2019 20:39:04 +0000 Subject: [PATCH 107/370] build: ignore proto files in test coverage (#168) --- packages/google-cloud-iot/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index bfe4073a6ab..83a421a0628 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.nycrc @@ -10,6 +10,7 @@ "**/samples", "**/scripts", "**/src/**/v*/**/*.js", + "**/protos", "**/test", ".jsdoc.js", "**/.jsdoc.js", From 771c97d460a380c4801c18742f031e0dd60937be Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 08:41:35 -0700 Subject: [PATCH 108/370] feat: support apiEndpoint override in client constructor (#171) --- .../src/v1/device_manager_client.js | 14 ++++++++++++- packages/google-cloud-iot/synth.metadata | 10 ++++----- packages/google-cloud-iot/test/gapic-v1.js | 21 +++++++++++++++++++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index bd95c158257..36ecff6c6fd 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -55,14 +55,18 @@ class DeviceManagerClient { * 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 ); @@ -192,6 +196,14 @@ class DeviceManagerClient { return 'cloudiot.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'cloudiot.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 0bb2322e775..4cee9fed72e 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-24T04:05:32.496621Z", + "updateTime": "2019-06-05T14:18:27.902406Z", "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": "0537189470f04f24836d6959821c24197a0ed120", - "internalRef": "249742806" + "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", + "internalRef": "251635729" } }, { diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index b4514a911b7..79c2b033704 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -23,6 +23,27 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('DeviceManagerClient', () => { + it('has servicePath', () => { + const servicePath = iotModule.v1.DeviceManagerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = iotModule.v1.DeviceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = iotModule.v1.DeviceManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new iotModule.v1.DeviceManagerClient(); + assert(client); + }); + describe('createDeviceRegistry', () => { it('invokes createDeviceRegistry without error', done => { const client = new iotModule.v1.DeviceManagerClient({ From 292e760e813601182c62f7e454fe083216f9f856 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 6 Jun 2019 08:10:34 -0700 Subject: [PATCH 109/370] chore: release 1.1.0 (#172) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index ac07d101155..e523b9cad5c 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.0.0...v1.1.0) (2019-06-06) + + +### Features + +* support apiEndpoint override in client constructor ([#171](https://www.github.com/googleapis/nodejs-iot/issues/171)) ([551751e](https://www.github.com/googleapis/nodejs-iot/commit/551751e)) + ## [1.0.0](https://www.github.com/googleapis/nodejs-iot/compare/v0.2.1...v1.0.0) (2019-05-20) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index d9e133c43ca..0890ff58b72 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.0.0", + "version": "1.1.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index e8e98306085..8f4b5dd9320 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.0.0" + "@google-cloud/iot": "^1.1.0" }, "devDependencies": { "chai": "^4.2.0", From a1da98552c826a163e72c9b804f141b77a5a965c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Jun 2019 08:12:02 -0700 Subject: [PATCH 110/370] docs: update return type in jsdoc for Buffers (#173) --- .../google-cloud-iot/src/v1/device_manager_client.js | 8 ++++---- .../v1/doc/google/cloud/iot/v1/doc_device_manager.js | 4 ++-- .../src/v1/doc/google/cloud/iot/v1/doc_resources.js | 4 ++-- .../src/v1/doc/google/iam/v1/doc_policy.js | 2 +- .../src/v1/doc/google/protobuf/doc_any.js | 2 +- packages/google-cloud-iot/synth.metadata | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 36ecff6c6fd..d5c0ba3dd46 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -1079,7 +1079,7 @@ class DeviceManagerClient { * The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {string} request.binaryData + * @param {Buffer} request.binaryData * The configuration data for the device. * @param {number} [request.versionToUpdate] * The version number to update. If this value is zero, it will not check the @@ -1107,7 +1107,7 @@ class DeviceManagerClient { * }); * * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * const binaryData = ''; + * const binaryData = Buffer.from(''); * const request = { * name: formattedName, * binaryData: binaryData, @@ -1476,7 +1476,7 @@ class DeviceManagerClient { * The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {string} request.binaryData + * @param {Buffer} request.binaryData * The command data to send to the device. * @param {string} [request.subfolder] * Optional subfolder for the command. If empty, the command will be delivered @@ -1504,7 +1504,7 @@ class DeviceManagerClient { * }); * * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * const binaryData = ''; + * const binaryData = Buffer.from(''); * const request = { * name: formattedName, * binaryData: binaryData, diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js index 041b61d747f..3c3c0d41ac3 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js @@ -340,7 +340,7 @@ const ListDevicesResponse = { * does not match this version number. This is used to support multiple * simultaneous updates without losing data. * - * @property {string} binaryData + * @property {Buffer} binaryData * The configuration data for the device. * * @typedef ModifyCloudToDeviceConfigRequest @@ -435,7 +435,7 @@ const ListDeviceStatesResponse = { * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * - * @property {string} binaryData + * @property {Buffer} binaryData * The command data to send to the device. * * @property {string} subfolder diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js index 7d371016a20..21914216e4b 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js @@ -478,7 +478,7 @@ const PublicKeyCredential = { * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * - * @property {string} binaryData + * @property {Buffer} binaryData * The device configuration data. * * @typedef DeviceConfig @@ -498,7 +498,7 @@ const DeviceConfig = { * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * - * @property {string} binaryData + * @property {Buffer} binaryData * The device state data. * * @typedef DeviceState diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index 09c3a5bdc56..e58c2122510 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -71,7 +71,7 @@ * * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} * - * @property {string} etag + * @property {Buffer} etag * `etag` is used for optimistic concurrency control as a way to help * prevent simultaneous updates of a policy from overwriting each other. * It is strongly suggested that systems make use of the `etag` in the diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js index 9ff5d007807..cdd2fc80e49 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 4cee9fed72e..64c760eafca 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-05T14:18:27.902406Z", + "updateTime": "2019-06-12T11:16:36.983352Z", "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 dd21e796ad90b4be7683ae2bdcf55600fd60f62e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 12 Jun 2019 22:10:16 -0700 Subject: [PATCH 111/370] fix(docs): move to new client docs URL (#174) --- packages/google-cloud-iot/.repo-metadata.json | 4 ++-- packages/google-cloud-iot/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index 6a39434734a..dc8e57ff327 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -2,11 +2,11 @@ "name": "iot", "name_pretty": "Google Cloud Internet of Things (IoT) Core", "product_documentation": "https://cloud.google.com/iot", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/iot/latest/", + "client_documentation": "https://googleapis.dev/nodejs/iot/latest", "release_level": "alpha", "language": "nodejs", "repo": "googleapis/nodejs-iot", "distribution_name": "@google-cloud/iot", "api_id": "cloudiot.googleapis.com", "requires_billing": true -} +} \ No newline at end of file diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 21ebe3b5c8b..01238e31dae 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -116,7 +116,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest/ +[client-docs]: https://googleapis.dev/nodejs/iot/latest [product-docs]: https://cloud.google.com/iot [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From fe94efa05eba9d34f53927e6d8503716a42a61f4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 14 Jun 2019 07:59:01 -0700 Subject: [PATCH 112/370] chore: release 1.1.1 (#175) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index e523b9cad5c..af28573bfa6 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.1](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.0...v1.1.1) (2019-06-14) + + +### Bug Fixes + +* **docs:** move to new client docs URL ([#174](https://www.github.com/googleapis/nodejs-iot/issues/174)) ([281face](https://www.github.com/googleapis/nodejs-iot/commit/281face)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.0.0...v1.1.0) (2019-06-06) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0890ff58b72..ad92264ddf6 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.1.0", + "version": "1.1.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 8f4b5dd9320..2bfccbd595c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.1.0" + "@google-cloud/iot": "^1.1.1" }, "devDependencies": { "chai": "^4.2.0", From 04ff8f0a4d4e6c1408b7104d70f85f77d4c48198 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 17 Jun 2019 21:43:40 -0700 Subject: [PATCH 113/370] build: switch to GitHub magic proxy (#176) --- packages/google-cloud-iot/synth.metadata | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 64c760eafca..2ad39f66a8b 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-12T11:16:36.983352Z", + "updateTime": "2019-06-18T01:01:28.439613Z", "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 06b8e8f88c241908711fdd7c202d8e47d67c23e1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 25 Jun 2019 16:42:30 -0700 Subject: [PATCH 114/370] fix(docs): link to reference docs section on googleapis.dev (#179) * fix(docs): reference docs should link to section of googleapis.dev with API reference * fix(docs): make anchors work in jsdoc --- packages/google-cloud-iot/.jsdoc.js | 3 +++ packages/google-cloud-iot/README.md | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 67c759c42f6..f815252982b 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.jsdoc.js @@ -41,5 +41,8 @@ module.exports = { sourceFiles: false, systemName: '@google-cloud/iot', theme: 'lumen' + }, + markdown: { + idInHeadings: true } }; diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 01238e31dae..e94f135dfad 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -116,10 +116,12 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/iot/latest +[client-docs]: https://googleapis.dev/nodejs/iot/latest#reference [product-docs]: https://cloud.google.com/iot [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=cloudiot.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 e17e7f44ebc9d5ab043868004c2f7e80dac7ed7f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Jun 2019 09:45:17 -0700 Subject: [PATCH 115/370] chore: release 1.1.2 (#181) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index af28573bfa6..952d840338c 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.2](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.1...v1.1.2) (2019-06-27) + + +### Bug Fixes + +* **docs:** link to reference docs section on googleapis.dev ([#179](https://www.github.com/googleapis/nodejs-iot/issues/179)) ([ce86dba](https://www.github.com/googleapis/nodejs-iot/commit/ce86dba)) + ### [1.1.1](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.0...v1.1.1) (2019-06-14) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index ad92264ddf6..d71f84f3b97 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.1.1", + "version": "1.1.2", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 2bfccbd595c..fc04b67f4f8 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.1.1" + "@google-cloud/iot": "^1.1.2" }, "devDependencies": { "chai": "^4.2.0", From d5d8ef95b3dd39f3c6bc313a0f6514d53135552e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 28 Jun 2019 10:06:21 -0700 Subject: [PATCH 116/370] build: use config file for linkinator (#182) --- packages/google-cloud-iot/linkinator.config.json | 7 +++++++ packages/google-cloud-iot/package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-iot/linkinator.config.json diff --git a/packages/google-cloud-iot/linkinator.config.json b/packages/google-cloud-iot/linkinator.config.json new file mode 100644 index 00000000000..d780d6bfff5 --- /dev/null +++ b/packages/google-cloud-iot/linkinator.config.json @@ -0,0 +1,7 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com" + ] +} diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index d71f84f3b97..bdc25e147d8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -33,7 +33,7 @@ "docs": "jsdoc -c .jsdoc.js", "system-test": "mocha system-test --timeout 600000", "fix": "eslint --fix '**/*.js'", - "docs-test": "linkinator docs -r --skip www.googleapis.com", + "docs-test": "linkinator docs", "predocs-test": "npm run docs" }, "dependencies": { @@ -52,6 +52,6 @@ "nyc": "^14.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.7", - "linkinator": "^1.1.2" + "linkinator": "^1.5.0" } } From e68273071e0c411a7aff7c1ffc36c54d0f66ffc6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 8 Jul 2019 18:58:54 -0700 Subject: [PATCH 117/370] docs: document GetPolicyOptions method --- .../src/v1/device_manager_client.js | 5 +++ .../v1/doc/google/iam/v1/doc_iam_policy.js | 6 ++++ .../src/v1/doc/google/iam/v1/doc_options.js | 33 +++++++++++++++++++ packages/google-cloud-iot/synth.metadata | 10 +++--- 4 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index d5c0ba3dd46..fae06d500da 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -1343,6 +1343,11 @@ class DeviceManagerClient { * @param {string} request.resource * REQUIRED: The resource for which the policy is being requested. * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} * @param {Object} [options] * Optional parameters. You 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-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js index d675b1b0d54..15b6fb823d4 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js @@ -45,6 +45,12 @@ const SetIamPolicyRequest = { * REQUIRED: The resource for which the policy is being requested. * See the operation documentation for the appropriate value for this field. * + * @property {Object} options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * * @typedef GetIamPolicyRequest * @memberof google.iam.v1 * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js new file mode 100644 index 00000000000..e4166f39254 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js @@ -0,0 +1,33 @@ +// 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. + +/** + * Encapsulates settings provided to GetIamPolicy. + * + * @property {number} requestedPolicyVersion + * Optional. The policy format version to be returned. + * Acceptable values are 0 and 1. + * If the value is 0, or the field is omitted, policy format version 1 will be + * returned. + * + * @typedef GetPolicyOptions + * @memberof google.iam.v1 + * @see [google.iam.v1.GetPolicyOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/options.proto} + */ +const GetPolicyOptions = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 2ad39f66a8b..a7df3935829 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-18T01:01:28.439613Z", + "updateTime": "2019-07-02T11:40:25.829388Z", "sources": [ { "generator": { "name": "artman", - "version": "0.26.0", - "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" + "version": "0.29.3", + "dockerImage": "googleapis/artman@sha256:8900f94a81adaab0238965aa8a7b3648791f4f3a95ee65adc6a56cfcc3753101" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "384aa843867c4d17756d14a01f047b6368494d32", - "internalRef": "253675319" + "sha": "5322233f8cbec4d3f8c17feca2507ef27d4a07c9", + "internalRef": "256042411" } }, { From bd47cf95bd3875c2bd4b66cea3f67a0a7cf3c95f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Jul 2019 18:58:25 +0300 Subject: [PATCH 118/370] chore(deps): update linters (#184) --- packages/google-cloud-iot/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index bdc25e147d8..862d95949af 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -41,8 +41,8 @@ }, "devDependencies": { "codecov": "^3.0.2", - "eslint": "^5.0.1", - "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 ea3662f91f1082b035d488291f15761c35f231f0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 08:33:05 -0700 Subject: [PATCH 119/370] docs: use the jsdoc-fresh theme (#185) --- packages/google-cloud-iot/.jsdoc.js | 2 +- packages/google-cloud-iot/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index f815252982b..87e1aeb3d6a 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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-iot/package.json b/packages/google-cloud-iot/package.json index 862d95949af..7f2f1c481f9 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -45,7 +45,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.6.2", "mocha": "^6.0.0", From c0914a4be65699e12fcd8f78c182d458b3a74b8f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 16:07:06 -0700 Subject: [PATCH 120/370] docs: document apiEndpoint over servicePath (#186) --- packages/google-cloud-iot/src/v1/device_manager_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index fae06d500da..3e621ac6742 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -51,7 +51,7 @@ class DeviceManagerClient { * 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 50a0c23bb31999c87311a1cfba8ce3bf03f8c454 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Aug 2019 10:52:55 -0700 Subject: [PATCH 121/370] fix: allow calls with no request, add JSON proto --- packages/google-cloud-iot/protos/protos.json | 2182 +++++++++++++++++ .../src/service_proto_list.json | 1 + .../src/v1/device_manager_client.js | 19 + packages/google-cloud-iot/synth.metadata | 10 +- 4 files changed, 2207 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-iot/protos/protos.json create mode 100644 packages/google-cloud-iot/src/service_proto_list.json diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json new file mode 100644 index 00000000000..b5dd68330cf --- /dev/null +++ b/packages/google-cloud-iot/protos/protos.json @@ -0,0 +1,2182 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "iot": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/cloud/iot/v1;iot", + "java_multiple_files": true, + "java_outer_classname": "DeviceManagerProto", + "java_package": "com.google.cloud.iot.v1" + }, + "nested": { + "Device": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + }, + "numId": { + "type": "uint64", + "id": 3 + }, + "credentials": { + "rule": "repeated", + "type": "DeviceCredential", + "id": 12 + }, + "lastHeartbeatTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "lastEventTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "lastStateTime": { + "type": "google.protobuf.Timestamp", + "id": 20 + }, + "lastConfigAckTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "lastConfigSendTime": { + "type": "google.protobuf.Timestamp", + "id": 18 + }, + "blocked": { + "type": "bool", + "id": 19 + }, + "lastErrorTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "lastErrorStatus": { + "type": "google.rpc.Status", + "id": 11 + }, + "config": { + "type": "DeviceConfig", + "id": 13 + }, + "state": { + "type": "DeviceState", + "id": 16 + }, + "logLevel": { + "type": "LogLevel", + "id": 21 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 17 + }, + "gatewayConfig": { + "type": "GatewayConfig", + "id": 24 + } + } + }, + "GatewayConfig": { + "fields": { + "gatewayType": { + "type": "GatewayType", + "id": 1 + }, + "gatewayAuthMethod": { + "type": "GatewayAuthMethod", + "id": 2 + }, + "lastAccessedGatewayId": { + "type": "string", + "id": 3 + }, + "lastAccessedGatewayTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "DeviceRegistry": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + }, + "eventNotificationConfigs": { + "rule": "repeated", + "type": "EventNotificationConfig", + "id": 10 + }, + "stateNotificationConfig": { + "type": "StateNotificationConfig", + "id": 7 + }, + "mqttConfig": { + "type": "MqttConfig", + "id": 4 + }, + "httpConfig": { + "type": "HttpConfig", + "id": 9 + }, + "logLevel": { + "type": "LogLevel", + "id": 11 + }, + "credentials": { + "rule": "repeated", + "type": "RegistryCredential", + "id": 8 + } + } + }, + "MqttConfig": { + "fields": { + "mqttEnabledState": { + "type": "MqttState", + "id": 1 + } + } + }, + "HttpConfig": { + "fields": { + "httpEnabledState": { + "type": "HttpState", + "id": 1 + } + } + }, + "EventNotificationConfig": { + "fields": { + "subfolderMatches": { + "type": "string", + "id": 2 + }, + "pubsubTopicName": { + "type": "string", + "id": 1 + } + } + }, + "StateNotificationConfig": { + "fields": { + "pubsubTopicName": { + "type": "string", + "id": 1 + } + } + }, + "RegistryCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKeyCertificate" + ] + } + }, + "fields": { + "publicKeyCertificate": { + "type": "PublicKeyCertificate", + "id": 1 + } + } + }, + "X509CertificateDetails": { + "fields": { + "issuer": { + "type": "string", + "id": 1 + }, + "subject": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "expiryTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "signatureAlgorithm": { + "type": "string", + "id": 5 + }, + "publicKeyType": { + "type": "string", + "id": 6 + } + } + }, + "PublicKeyCertificate": { + "fields": { + "format": { + "type": "PublicKeyCertificateFormat", + "id": 1 + }, + "certificate": { + "type": "string", + "id": 2 + }, + "x509Details": { + "type": "X509CertificateDetails", + "id": 3 + } + } + }, + "DeviceCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKey" + ] + } + }, + "fields": { + "publicKey": { + "type": "PublicKeyCredential", + "id": 2 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + }, + "PublicKeyCredential": { + "fields": { + "format": { + "type": "PublicKeyFormat", + "id": 1 + }, + "key": { + "type": "string", + "id": 2 + } + } + }, + "DeviceConfig": { + "fields": { + "version": { + "type": "int64", + "id": 1 + }, + "cloudUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "deviceAckTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "binaryData": { + "type": "bytes", + "id": 4 + } + } + }, + "DeviceState": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "binaryData": { + "type": "bytes", + "id": 2 + } + } + }, + "MqttState": { + "values": { + "MQTT_STATE_UNSPECIFIED": 0, + "MQTT_ENABLED": 1, + "MQTT_DISABLED": 2 + } + }, + "HttpState": { + "values": { + "HTTP_STATE_UNSPECIFIED": 0, + "HTTP_ENABLED": 1, + "HTTP_DISABLED": 2 + } + }, + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "NONE": 10, + "ERROR": 20, + "INFO": 30, + "DEBUG": 40 + } + }, + "GatewayType": { + "values": { + "GATEWAY_TYPE_UNSPECIFIED": 0, + "GATEWAY": 1, + "NON_GATEWAY": 2 + } + }, + "GatewayAuthMethod": { + "values": { + "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, + "ASSOCIATION_ONLY": 1, + "DEVICE_AUTH_TOKEN_ONLY": 2, + "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 + } + }, + "PublicKeyCertificateFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, + "X509_CERTIFICATE_PEM": 1 + } + }, + "PublicKeyFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, + "RSA_PEM": 3, + "RSA_X509_PEM": 1, + "ES256_PEM": 2, + "ES256_X509_PEM": 4 + } + }, + "DeviceManager": { + "methods": { + "CreateDeviceRegistry": { + "requestType": "CreateDeviceRegistryRequest", + "responseType": "DeviceRegistry", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/registries", + "(google.api.http).body": "device_registry" + } + }, + "GetDeviceRegistry": { + "requestType": "GetDeviceRegistryRequest", + "responseType": "DeviceRegistry", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*}" + } + }, + "UpdateDeviceRegistry": { + "requestType": "UpdateDeviceRegistryRequest", + "responseType": "DeviceRegistry", + "options": { + "(google.api.http).patch": "/v1/{device_registry.name=projects/*/locations/*/registries/*}", + "(google.api.http).body": "device_registry" + } + }, + "DeleteDeviceRegistry": { + "requestType": "DeleteDeviceRegistryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*}" + } + }, + "ListDeviceRegistries": { + "requestType": "ListDeviceRegistriesRequest", + "responseType": "ListDeviceRegistriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/registries" + } + }, + "CreateDevice": { + "requestType": "CreateDeviceRequest", + "responseType": "Device", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}/devices", + "(google.api.http).body": "device" + } + }, + "GetDevice": { + "requestType": "GetDeviceRequest", + "responseType": "Device", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" + } + }, + "UpdateDevice": { + "requestType": "UpdateDeviceRequest", + "responseType": "Device", + "options": { + "(google.api.http).patch": "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}", + "(google.api.http).body": "device", + "(google.api.http).additional_bindings.patch": "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}", + "(google.api.http).additional_bindings.body": "device" + } + }, + "DeleteDevice": { + "requestType": "DeleteDeviceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}" + } + }, + "ListDevices": { + "requestType": "ListDevicesRequest", + "responseType": "ListDevicesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/registries/*}/devices", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" + } + }, + "ModifyCloudToDeviceConfig": { + "requestType": "ModifyCloudToDeviceConfigRequest", + "responseType": "DeviceConfig", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig", + "(google.api.http).additional_bindings.body": "*" + } + }, + "ListDeviceConfigVersions": { + "requestType": "ListDeviceConfigVersionsRequest", + "responseType": "ListDeviceConfigVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions" + } + }, + "ListDeviceStates": { + "requestType": "ListDeviceStatesRequest", + "responseType": "ListDeviceStatesResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states" + } + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*" + } + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy", + "(google.api.http).additional_bindings.body": "*" + } + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*" + } + }, + "SendCommandToDevice": { + "requestType": "SendCommandToDeviceRequest", + "responseType": "SendCommandToDeviceResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", + "(google.api.http).additional_bindings.body": "*" + } + }, + "BindDeviceToGateway": { + "requestType": "BindDeviceToGatewayRequest", + "responseType": "BindDeviceToGatewayResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", + "(google.api.http).additional_bindings.body": "*" + } + }, + "UnbindDeviceFromGateway": { + "requestType": "UnbindDeviceFromGatewayRequest", + "responseType": "UnbindDeviceFromGatewayResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", + "(google.api.http).additional_bindings.body": "*" + } + } + } + }, + "CreateDeviceRegistryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 2 + } + } + }, + "GetDeviceRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteDeviceRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateDeviceRegistryRequest": { + "fields": { + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListDeviceRegistriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDeviceRegistriesResponse": { + "fields": { + "deviceRegistries": { + "rule": "repeated", + "type": "DeviceRegistry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDeviceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "device": { + "type": "Device", + "id": 2 + } + } + }, + "GetDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "UpdateDeviceRequest": { + "fields": { + "device": { + "type": "Device", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "DeleteDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListDevicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "deviceNumIds": { + "rule": "repeated", + "type": "uint64", + "id": 2 + }, + "deviceIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 4 + }, + "gatewayListOptions": { + "type": "GatewayListOptions", + "id": 6 + }, + "pageSize": { + "type": "int32", + "id": 100 + }, + "pageToken": { + "type": "string", + "id": 101 + } + } + }, + "GatewayListOptions": { + "oneofs": { + "filter": { + "oneof": [ + "gatewayType", + "associationsGatewayId", + "associationsDeviceId" + ] + } + }, + "fields": { + "gatewayType": { + "type": "GatewayType", + "id": 1 + }, + "associationsGatewayId": { + "type": "string", + "id": 2 + }, + "associationsDeviceId": { + "type": "string", + "id": 3 + } + } + }, + "ListDevicesResponse": { + "fields": { + "devices": { + "rule": "repeated", + "type": "Device", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ModifyCloudToDeviceConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "versionToUpdate": { + "type": "int64", + "id": 2 + }, + "binaryData": { + "type": "bytes", + "id": 3 + } + } + }, + "ListDeviceConfigVersionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "numVersions": { + "type": "int32", + "id": 2 + } + } + }, + "ListDeviceConfigVersionsResponse": { + "fields": { + "deviceConfigs": { + "rule": "repeated", + "type": "DeviceConfig", + "id": 1 + } + } + }, + "ListDeviceStatesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "numStates": { + "type": "int32", + "id": 2 + } + } + }, + "ListDeviceStatesResponse": { + "fields": { + "deviceStates": { + "rule": "repeated", + "type": "DeviceState", + "id": 1 + } + } + }, + "SendCommandToDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "binaryData": { + "type": "bytes", + "id": 2 + }, + "subfolder": { + "type": "string", + "id": 3 + } + } + }, + "SendCommandToDeviceResponse": { + "fields": {} + }, + "BindDeviceToGatewayRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "gatewayId": { + "type": "string", + "id": 2 + }, + "deviceId": { + "type": "string", + "id": 3 + } + } + }, + "BindDeviceToGatewayResponse": { + "fields": {} + }, + "UnbindDeviceFromGatewayRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "gatewayId": { + "type": "string", + "id": 2 + }, + "deviceId": { + "type": "string", + "id": 3 + } + } + }, + "UnbindDeviceFromGatewayResponse": { + "fields": {} + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "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 + } + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "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 + } + }, + "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 + } + } + } + } + }, + "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 + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "google.golang.org/genproto/googleapis/iam/v1;iam", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + } + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + } + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + } + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1 + }, + "policy": { + "type": "Policy", + "id": 2 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1 + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-iot/src/service_proto_list.json b/packages/google-cloud-iot/src/service_proto_list.json new file mode 100644 index 00000000000..8e92de979ba --- /dev/null +++ b/packages/google-cloud-iot/src/service_proto_list.json @@ -0,0 +1 @@ +["../protos/google/cloud/iot/v1/resources.proto", "../protos/google/cloud/iot/v1/device_manager.proto"] \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 3e621ac6742..143ccf792a8 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -288,6 +288,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -342,6 +343,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -412,6 +414,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -458,6 +461,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -560,6 +564,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -689,6 +694,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -749,6 +755,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -819,6 +826,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -866,6 +874,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -984,6 +993,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1126,6 +1136,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1190,6 +1201,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1254,6 +1266,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1321,6 +1334,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1382,6 +1396,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1448,6 +1463,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1528,6 +1544,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1596,6 +1613,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1664,6 +1682,7 @@ class DeviceManagerClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a7df3935829..4b3255fec15 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-07-02T11:40:25.829388Z", + "updateTime": "2019-08-02T11:16:47.821857Z", "sources": [ { "generator": { "name": "artman", - "version": "0.29.3", - "dockerImage": "googleapis/artman@sha256:8900f94a81adaab0238965aa8a7b3648791f4f3a95ee65adc6a56cfcc3753101" + "version": "0.32.0", + "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5322233f8cbec4d3f8c17feca2507ef27d4a07c9", - "internalRef": "256042411" + "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", + "internalRef": "261297518" } }, { From 4e4a14dc1ace951aa4494f9df9acd6aeac3ff099 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Aug 2019 15:39:36 -0700 Subject: [PATCH 122/370] chore: release 1.1.3 (#190) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 952d840338c..9bc006331b2 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.3](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.2...v1.1.3) (2019-08-02) + + +### Bug Fixes + +* allow calls with no request, add JSON proto ([9449e5a](https://www.github.com/googleapis/nodejs-iot/commit/9449e5a)) + ### [1.1.2](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.1...v1.1.2) (2019-06-27) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 7f2f1c481f9..f6e7e623928 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.1.2", + "version": "1.1.3", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index fc04b67f4f8..ddd674a7db3 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.1.2" + "@google-cloud/iot": "^1.1.3" }, "devDependencies": { "chai": "^4.2.0", From 6ac5f2ecc6e20a575a59dba6ad39cf9ab22cf379 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 8 Aug 2019 09:05:53 -0700 Subject: [PATCH 123/370] docs: update jsdoc comments (#191) --- .../src/v1/doc/google/iam/v1/doc_policy.js | 4 ++-- packages/google-cloud-iot/synth.metadata | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index e58c2122510..e1607b08a11 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -81,7 +81,7 @@ * ensure that their change will be applied to the same version of the policy. * * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten blindly. + * policy is overwritten. * * @typedef Policy * @memberof google.iam.v1 @@ -109,7 +109,7 @@ const Policy = { * who is authenticated with a Google account or a service account. * * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@gmail.com` . + * account. For example, `alice@example.com` . * * * * `serviceAccount:{emailid}`: An email address that represents a service diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 4b3255fec15..2535e9fad34 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-02T11:16:47.821857Z", + "updateTime": "2019-08-08T11:15:00.043677Z", "sources": [ { "generator": { "name": "artman", - "version": "0.32.0", - "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" + "version": "0.33.0", + "dockerImage": "googleapis/artman@sha256:c6231efb525569736226b1f7af7565dbc84248efafb3692a5bb1d2d8a7975d53" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", - "internalRef": "261297518" + "sha": "7e56e8d4fec63bb04ab4f79a98f65b29f235a0a0", + "internalRef": "262242585" } }, { From b039dcf18a74d5856863f53e0c8a7b4b5874d8a0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 26 Aug 2019 10:52:42 -0700 Subject: [PATCH 124/370] fix: use correct version # for x-goog-api-client header --- .../google-cloud-iot/src/v1/device_manager_client.js | 2 +- packages/google-cloud-iot/synth.metadata | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 143ccf792a8..19d1da092e5 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -81,7 +81,7 @@ class DeviceManagerClient { // 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 2535e9fad34..817222c4796 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-08T11:15:00.043677Z", + "updateTime": "2019-08-21T11:15:02.209796Z", "sources": [ { "generator": { "name": "artman", - "version": "0.33.0", - "dockerImage": "googleapis/artman@sha256:c6231efb525569736226b1f7af7565dbc84248efafb3692a5bb1d2d8a7975d53" + "version": "0.34.0", + "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7e56e8d4fec63bb04ab4f79a98f65b29f235a0a0", - "internalRef": "262242585" + "sha": "11592a15391951348a64f5c303399733b1c5b3b2", + "internalRef": "264425502" } }, { From 981ca1087766f0c90e7662144672fdd7bef6fc64 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Aug 2019 07:42:09 -0700 Subject: [PATCH 125/370] docs: update function documentation --- .../src/v1/doc/google/iam/v1/doc_options.js | 10 +++++++--- .../src/v1/doc/google/iam/v1/doc_policy.js | 9 ++++++++- .../src/v1/doc/google/protobuf/doc_timestamp.js | 10 ++++++---- packages/google-cloud-iot/synth.metadata | 10 +++++----- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js index e4166f39254..b725d806cce 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js @@ -20,9 +20,13 @@ * * @property {number} requestedPolicyVersion * Optional. The policy format version to be returned. - * Acceptable values are 0 and 1. - * If the value is 0, or the field is omitted, policy format version 1 will be - * returned. + * + * Valid values are 0, 1, and 3. Requests specifying an invalid value will be + * rejected. + * + * Requests for policies with any conditional bindings must specify version 3. + * Policies without any conditional bindings may specify any valid value or + * leave the field unset. * * @typedef GetPolicyOptions * @memberof google.iam.v1 diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index e1607b08a11..2dbe3faa3a6 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -63,7 +63,14 @@ * [IAM developer's guide](https://cloud.google.com/iam/docs). * * @property {number} version - * Deprecated. + * Specifies the format of the policy. + * + * Valid values are 0, 1, and 3. Requests specifying an invalid value will be + * rejected. + * + * Policies with any conditional bindings must specify version 3. Policies + * without any conditional bindings may specify any valid value or leave the + * field unset. * * @property {Object[]} bindings * Associates a list of `members` to a `role`. diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js index 98c19dbf0d3..c457acc0c7d 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 817222c4796..df0a822bfbf 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-21T11:15:02.209796Z", + "updateTime": "2019-08-27T11:13:31.272317Z", "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 0f1179d2caa07de8557d05af30c1fb669192c7b6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Aug 2019 12:23:21 -0700 Subject: [PATCH 126/370] docs: update link to client docs (#196) --- packages/google-cloud-iot/README.md | 4 +--- packages/google-cloud-iot/synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index e94f135dfad..5b942c0aa60 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -116,12 +116,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/iot/latest#reference +[client-docs]: https://googleapis.dev/nodejs/iot/latest [product-docs]: https://cloud.google.com/iot [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=cloudiot.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started - - diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index df0a822bfbf..9dc92b599e5 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-08-27T11:13:31.272317Z", + "updateTime": "2019-08-28T11:14:39.208920Z", "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 28725086316c560911c132e5df7cf7cb2e6a1f89 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 3 Sep 2019 14:05:29 -0700 Subject: [PATCH 127/370] 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 --- packages/google-cloud-iot/protos/protos.json | 1075 ++++++++--------- packages/google-cloud-iot/src/browser.js | 21 + .../src/service_proto_list.json | 1 - .../src/v1/device_manager_client.js | 79 +- .../src/v1/device_manager_proto_list.json | 3 + packages/google-cloud-iot/synth.metadata | 10 +- packages/google-cloud-iot/test/gapic-v1.js | 5 + packages/google-cloud-iot/webpack.config.js | 46 + 8 files changed, 659 insertions(+), 581 deletions(-) create mode 100644 packages/google-cloud-iot/src/browser.js delete mode 100644 packages/google-cloud-iot/src/service_proto_list.json create mode 100644 packages/google-cloud-iot/src/v1/device_manager_proto_list.json create mode 100644 packages/google-cloud-iot/webpack.config.js diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index b5dd68330cf..150b37ea704 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -11,353 +11,10 @@ "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/cloud/iot/v1;iot", "java_multiple_files": true, - "java_outer_classname": "DeviceManagerProto", + "java_outer_classname": "ResourcesProto", "java_package": "com.google.cloud.iot.v1" }, "nested": { - "Device": { - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "numId": { - "type": "uint64", - "id": 3 - }, - "credentials": { - "rule": "repeated", - "type": "DeviceCredential", - "id": 12 - }, - "lastHeartbeatTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "lastEventTime": { - "type": "google.protobuf.Timestamp", - "id": 8 - }, - "lastStateTime": { - "type": "google.protobuf.Timestamp", - "id": 20 - }, - "lastConfigAckTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - }, - "lastConfigSendTime": { - "type": "google.protobuf.Timestamp", - "id": 18 - }, - "blocked": { - "type": "bool", - "id": 19 - }, - "lastErrorTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "lastErrorStatus": { - "type": "google.rpc.Status", - "id": 11 - }, - "config": { - "type": "DeviceConfig", - "id": 13 - }, - "state": { - "type": "DeviceState", - "id": 16 - }, - "logLevel": { - "type": "LogLevel", - "id": 21 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 17 - }, - "gatewayConfig": { - "type": "GatewayConfig", - "id": 24 - } - } - }, - "GatewayConfig": { - "fields": { - "gatewayType": { - "type": "GatewayType", - "id": 1 - }, - "gatewayAuthMethod": { - "type": "GatewayAuthMethod", - "id": 2 - }, - "lastAccessedGatewayId": { - "type": "string", - "id": 3 - }, - "lastAccessedGatewayTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - }, - "DeviceRegistry": { - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "eventNotificationConfigs": { - "rule": "repeated", - "type": "EventNotificationConfig", - "id": 10 - }, - "stateNotificationConfig": { - "type": "StateNotificationConfig", - "id": 7 - }, - "mqttConfig": { - "type": "MqttConfig", - "id": 4 - }, - "httpConfig": { - "type": "HttpConfig", - "id": 9 - }, - "logLevel": { - "type": "LogLevel", - "id": 11 - }, - "credentials": { - "rule": "repeated", - "type": "RegistryCredential", - "id": 8 - } - } - }, - "MqttConfig": { - "fields": { - "mqttEnabledState": { - "type": "MqttState", - "id": 1 - } - } - }, - "HttpConfig": { - "fields": { - "httpEnabledState": { - "type": "HttpState", - "id": 1 - } - } - }, - "EventNotificationConfig": { - "fields": { - "subfolderMatches": { - "type": "string", - "id": 2 - }, - "pubsubTopicName": { - "type": "string", - "id": 1 - } - } - }, - "StateNotificationConfig": { - "fields": { - "pubsubTopicName": { - "type": "string", - "id": 1 - } - } - }, - "RegistryCredential": { - "oneofs": { - "credential": { - "oneof": [ - "publicKeyCertificate" - ] - } - }, - "fields": { - "publicKeyCertificate": { - "type": "PublicKeyCertificate", - "id": 1 - } - } - }, - "X509CertificateDetails": { - "fields": { - "issuer": { - "type": "string", - "id": 1 - }, - "subject": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "expiryTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "signatureAlgorithm": { - "type": "string", - "id": 5 - }, - "publicKeyType": { - "type": "string", - "id": 6 - } - } - }, - "PublicKeyCertificate": { - "fields": { - "format": { - "type": "PublicKeyCertificateFormat", - "id": 1 - }, - "certificate": { - "type": "string", - "id": 2 - }, - "x509Details": { - "type": "X509CertificateDetails", - "id": 3 - } - } - }, - "DeviceCredential": { - "oneofs": { - "credential": { - "oneof": [ - "publicKey" - ] - } - }, - "fields": { - "publicKey": { - "type": "PublicKeyCredential", - "id": 2 - }, - "expirationTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - } - }, - "PublicKeyCredential": { - "fields": { - "format": { - "type": "PublicKeyFormat", - "id": 1 - }, - "key": { - "type": "string", - "id": 2 - } - } - }, - "DeviceConfig": { - "fields": { - "version": { - "type": "int64", - "id": 1 - }, - "cloudUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "deviceAckTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "binaryData": { - "type": "bytes", - "id": 4 - } - } - }, - "DeviceState": { - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "binaryData": { - "type": "bytes", - "id": 2 - } - } - }, - "MqttState": { - "values": { - "MQTT_STATE_UNSPECIFIED": 0, - "MQTT_ENABLED": 1, - "MQTT_DISABLED": 2 - } - }, - "HttpState": { - "values": { - "HTTP_STATE_UNSPECIFIED": 0, - "HTTP_ENABLED": 1, - "HTTP_DISABLED": 2 - } - }, - "LogLevel": { - "values": { - "LOG_LEVEL_UNSPECIFIED": 0, - "NONE": 10, - "ERROR": 20, - "INFO": 30, - "DEBUG": 40 - } - }, - "GatewayType": { - "values": { - "GATEWAY_TYPE_UNSPECIFIED": 0, - "GATEWAY": 1, - "NON_GATEWAY": 2 - } - }, - "GatewayAuthMethod": { - "values": { - "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, - "ASSOCIATION_ONLY": 1, - "DEVICE_AUTH_TOKEN_ONLY": 2, - "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 - } - }, - "PublicKeyCertificateFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, - "X509_CERTIFICATE_PEM": 1 - } - }, - "PublicKeyFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, - "RSA_PEM": 3, - "RSA_X509_PEM": 1, - "ES256_PEM": 2, - "ES256_X509_PEM": 4 - } - }, "DeviceManager": { "methods": { "CreateDeviceRegistry": { @@ -526,305 +183,648 @@ } } }, - "CreateDeviceRegistryRequest": { + "CreateDeviceRegistryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 2 + } + } + }, + "GetDeviceRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteDeviceRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateDeviceRegistryRequest": { + "fields": { + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListDeviceRegistriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDeviceRegistriesResponse": { + "fields": { + "deviceRegistries": { + "rule": "repeated", + "type": "DeviceRegistry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDeviceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "device": { + "type": "Device", + "id": 2 + } + } + }, + "GetDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "UpdateDeviceRequest": { + "fields": { + "device": { + "type": "Device", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "DeleteDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListDevicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "deviceNumIds": { + "rule": "repeated", + "type": "uint64", + "id": 2 + }, + "deviceIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 4 + }, + "gatewayListOptions": { + "type": "GatewayListOptions", + "id": 6 + }, + "pageSize": { + "type": "int32", + "id": 100 + }, + "pageToken": { + "type": "string", + "id": 101 + } + } + }, + "GatewayListOptions": { + "oneofs": { + "filter": { + "oneof": [ + "gatewayType", + "associationsGatewayId", + "associationsDeviceId" + ] + } + }, + "fields": { + "gatewayType": { + "type": "GatewayType", + "id": 1 + }, + "associationsGatewayId": { + "type": "string", + "id": 2 + }, + "associationsDeviceId": { + "type": "string", + "id": 3 + } + } + }, + "ListDevicesResponse": { + "fields": { + "devices": { + "rule": "repeated", + "type": "Device", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ModifyCloudToDeviceConfigRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1 }, - "deviceRegistry": { - "type": "DeviceRegistry", + "versionToUpdate": { + "type": "int64", "id": 2 + }, + "binaryData": { + "type": "bytes", + "id": 3 } } }, - "GetDeviceRegistryRequest": { + "ListDeviceConfigVersionsRequest": { "fields": { "name": { "type": "string", "id": 1 + }, + "numVersions": { + "type": "int32", + "id": 2 } } }, - "DeleteDeviceRegistryRequest": { + "ListDeviceConfigVersionsResponse": { "fields": { - "name": { - "type": "string", + "deviceConfigs": { + "rule": "repeated", + "type": "DeviceConfig", "id": 1 } } }, - "UpdateDeviceRegistryRequest": { + "ListDeviceStatesRequest": { "fields": { - "deviceRegistry": { - "type": "DeviceRegistry", + "name": { + "type": "string", "id": 1 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "numStates": { + "type": "int32", "id": 2 } } }, - "ListDeviceRegistriesRequest": { + "ListDeviceStatesResponse": { "fields": { - "parent": { + "deviceStates": { + "rule": "repeated", + "type": "DeviceState", + "id": 1 + } + } + }, + "SendCommandToDeviceRequest": { + "fields": { + "name": { "type": "string", "id": 1 }, - "pageSize": { - "type": "int32", + "binaryData": { + "type": "bytes", "id": 2 }, - "pageToken": { + "subfolder": { "type": "string", "id": 3 } } }, - "ListDeviceRegistriesResponse": { + "SendCommandToDeviceResponse": { + "fields": {} + }, + "BindDeviceToGatewayRequest": { "fields": { - "deviceRegistries": { - "rule": "repeated", - "type": "DeviceRegistry", + "parent": { + "type": "string", "id": 1 }, - "nextPageToken": { + "gatewayId": { "type": "string", "id": 2 + }, + "deviceId": { + "type": "string", + "id": 3 } } }, - "CreateDeviceRequest": { + "BindDeviceToGatewayResponse": { + "fields": {} + }, + "UnbindDeviceFromGatewayRequest": { "fields": { "parent": { "type": "string", "id": 1 }, - "device": { - "type": "Device", + "gatewayId": { + "type": "string", "id": 2 + }, + "deviceId": { + "type": "string", + "id": 3 } } }, - "GetDeviceRequest": { + "UnbindDeviceFromGatewayResponse": { + "fields": {} + }, + "Device": { "fields": { - "name": { + "id": { "type": "string", "id": 1 }, - "fieldMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "UpdateDeviceRequest": { - "fields": { - "device": { - "type": "Device", + "name": { + "type": "string", "id": 2 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "numId": { + "type": "uint64", "id": 3 + }, + "credentials": { + "rule": "repeated", + "type": "DeviceCredential", + "id": 12 + }, + "lastHeartbeatTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "lastEventTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "lastStateTime": { + "type": "google.protobuf.Timestamp", + "id": 20 + }, + "lastConfigAckTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "lastConfigSendTime": { + "type": "google.protobuf.Timestamp", + "id": 18 + }, + "blocked": { + "type": "bool", + "id": 19 + }, + "lastErrorTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "lastErrorStatus": { + "type": "google.rpc.Status", + "id": 11 + }, + "config": { + "type": "DeviceConfig", + "id": 13 + }, + "state": { + "type": "DeviceState", + "id": 16 + }, + "logLevel": { + "type": "LogLevel", + "id": 21 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 17 + }, + "gatewayConfig": { + "type": "GatewayConfig", + "id": 24 } } }, - "DeleteDeviceRequest": { + "GatewayConfig": { "fields": { - "name": { - "type": "string", + "gatewayType": { + "type": "GatewayType", "id": 1 + }, + "gatewayAuthMethod": { + "type": "GatewayAuthMethod", + "id": 2 + }, + "lastAccessedGatewayId": { + "type": "string", + "id": 3 + }, + "lastAccessedGatewayTime": { + "type": "google.protobuf.Timestamp", + "id": 4 } } }, - "ListDevicesRequest": { + "DeviceRegistry": { "fields": { - "parent": { + "id": { "type": "string", "id": 1 }, - "deviceNumIds": { - "rule": "repeated", - "type": "uint64", + "name": { + "type": "string", "id": 2 }, - "deviceIds": { + "eventNotificationConfigs": { "rule": "repeated", - "type": "string", - "id": 3 + "type": "EventNotificationConfig", + "id": 10 }, - "fieldMask": { - "type": "google.protobuf.FieldMask", + "stateNotificationConfig": { + "type": "StateNotificationConfig", + "id": 7 + }, + "mqttConfig": { + "type": "MqttConfig", "id": 4 }, - "gatewayListOptions": { - "type": "GatewayListOptions", - "id": 6 + "httpConfig": { + "type": "HttpConfig", + "id": 9 }, - "pageSize": { - "type": "int32", - "id": 100 + "logLevel": { + "type": "LogLevel", + "id": 11 }, - "pageToken": { + "credentials": { + "rule": "repeated", + "type": "RegistryCredential", + "id": 8 + } + } + }, + "MqttConfig": { + "fields": { + "mqttEnabledState": { + "type": "MqttState", + "id": 1 + } + } + }, + "HttpConfig": { + "fields": { + "httpEnabledState": { + "type": "HttpState", + "id": 1 + } + } + }, + "EventNotificationConfig": { + "fields": { + "subfolderMatches": { + "type": "string", + "id": 2 + }, + "pubsubTopicName": { + "type": "string", + "id": 1 + } + } + }, + "StateNotificationConfig": { + "fields": { + "pubsubTopicName": { "type": "string", - "id": 101 + "id": 1 } } }, - "GatewayListOptions": { + "RegistryCredential": { "oneofs": { - "filter": { + "credential": { "oneof": [ - "gatewayType", - "associationsGatewayId", - "associationsDeviceId" + "publicKeyCertificate" ] } }, "fields": { - "gatewayType": { - "type": "GatewayType", + "publicKeyCertificate": { + "type": "PublicKeyCertificate", "id": 1 - }, - "associationsGatewayId": { - "type": "string", - "id": 2 - }, - "associationsDeviceId": { - "type": "string", - "id": 3 } } }, - "ListDevicesResponse": { + "X509CertificateDetails": { "fields": { - "devices": { - "rule": "repeated", - "type": "Device", + "issuer": { + "type": "string", "id": 1 }, - "nextPageToken": { + "subject": { "type": "string", "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "expiryTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "signatureAlgorithm": { + "type": "string", + "id": 5 + }, + "publicKeyType": { + "type": "string", + "id": 6 } } }, - "ModifyCloudToDeviceConfigRequest": { + "PublicKeyCertificate": { "fields": { - "name": { - "type": "string", + "format": { + "type": "PublicKeyCertificateFormat", "id": 1 }, - "versionToUpdate": { - "type": "int64", + "certificate": { + "type": "string", "id": 2 }, - "binaryData": { - "type": "bytes", + "x509Details": { + "type": "X509CertificateDetails", "id": 3 } } }, - "ListDeviceConfigVersionsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "numVersions": { - "type": "int32", - "id": 2 + "DeviceCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKey" + ] } - } - }, - "ListDeviceConfigVersionsResponse": { + }, "fields": { - "deviceConfigs": { - "rule": "repeated", - "type": "DeviceConfig", - "id": 1 + "publicKey": { + "type": "PublicKeyCredential", + "id": 2 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 6 } } }, - "ListDeviceStatesRequest": { + "PublicKeyCredential": { "fields": { - "name": { - "type": "string", + "format": { + "type": "PublicKeyFormat", "id": 1 }, - "numStates": { - "type": "int32", + "key": { + "type": "string", "id": 2 } } }, - "ListDeviceStatesResponse": { + "DeviceConfig": { "fields": { - "deviceStates": { - "rule": "repeated", - "type": "DeviceState", + "version": { + "type": "int64", "id": 1 + }, + "cloudUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "deviceAckTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "binaryData": { + "type": "bytes", + "id": 4 } } }, - "SendCommandToDeviceRequest": { + "DeviceState": { "fields": { - "name": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 1 }, "binaryData": { "type": "bytes", "id": 2 - }, - "subfolder": { - "type": "string", - "id": 3 } } }, - "SendCommandToDeviceResponse": { - "fields": {} + "MqttState": { + "values": { + "MQTT_STATE_UNSPECIFIED": 0, + "MQTT_ENABLED": 1, + "MQTT_DISABLED": 2 + } }, - "BindDeviceToGatewayRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "gatewayId": { - "type": "string", - "id": 2 - }, - "deviceId": { - "type": "string", - "id": 3 - } + "HttpState": { + "values": { + "HTTP_STATE_UNSPECIFIED": 0, + "HTTP_ENABLED": 1, + "HTTP_DISABLED": 2 } }, - "BindDeviceToGatewayResponse": { - "fields": {} + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "NONE": 10, + "ERROR": 20, + "INFO": 30, + "DEBUG": 40 + } }, - "UnbindDeviceFromGatewayRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "gatewayId": { - "type": "string", - "id": 2 - }, - "deviceId": { - "type": "string", - "id": 3 - } + "GatewayType": { + "values": { + "GATEWAY_TYPE_UNSPECIFIED": 0, + "GATEWAY": 1, + "NON_GATEWAY": 2 } }, - "UnbindDeviceFromGatewayResponse": { - "fields": {} + "GatewayAuthMethod": { + "values": { + "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, + "ASSOCIATION_ONLY": 1, + "DEVICE_AUTH_TOKEN_ONLY": 2, + "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 + } + }, + "PublicKeyCertificateFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, + "X509_CERTIFICATE_PEM": 1 + } + }, + "PublicKeyFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, + "RSA_PEM": 3, + "RSA_X509_PEM": 1, + "ES256_PEM": 2, + "ES256_X509_PEM": 4 + } } } } @@ -836,7 +836,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "ClientProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -929,57 +929,21 @@ } } }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - } - } + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" } } }, @@ -1966,6 +1930,9 @@ }, "nested": { "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, "methods": { "SetIamPolicy": { "requestType": "SetIamPolicyRequest", @@ -2010,6 +1977,10 @@ "resource": { "type": "string", "id": 1 + }, + "options": { + "type": "google.iam.v1.GetPolicyOptions", + "id": 2 } } }, @@ -2035,6 +2006,14 @@ } } }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, "Policy": { "fields": { "version": { diff --git a/packages/google-cloud-iot/src/browser.js b/packages/google-cloud-iot/src/browser.js new file mode 100644 index 00000000000..ddbcd7ecb9a --- /dev/null +++ b/packages/google-cloud-iot/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-iot/src/service_proto_list.json b/packages/google-cloud-iot/src/service_proto_list.json deleted file mode 100644 index 8e92de979ba..00000000000 --- a/packages/google-cloud-iot/src/service_proto_list.json +++ /dev/null @@ -1 +0,0 @@ -["../protos/google/cloud/iot/v1/resources.proto", "../protos/google/cloud/iot/v1/device_manager.proto"] \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 19d1da092e5..eac27c038cf 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -58,6 +58,16 @@ class DeviceManagerClient { opts = opts || {}; this._descriptors = {}; + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + const servicePath = opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; @@ -74,39 +84,54 @@ class DeviceManagerClient { // 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/cloud/iot/v1/device_manager.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 = { - devicePathTemplate: new gax.PathTemplate( + devicePathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' ), - locationPathTemplate: new gax.PathTemplate( + locationPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), - registryPathTemplate: new gax.PathTemplate( + registryPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}' ), }; @@ -115,12 +140,12 @@ class DeviceManagerClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listDeviceRegistries: new gax.PageDescriptor( + listDeviceRegistries: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'deviceRegistries' ), - listDevices: new gax.PageDescriptor( + listDevices: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'devices' @@ -143,7 +168,9 @@ class DeviceManagerClient { // Put together the "service stub" for // google.cloud.iot.v1.DeviceManager. const deviceManagerStub = gaxGrpc.createStub( - protos.google.cloud.iot.v1.DeviceManager, + opts.fallback + ? protos.lookupService('google.cloud.iot.v1.DeviceManager') + : protos.google.cloud.iot.v1.DeviceManager, opts ); @@ -171,18 +198,16 @@ class DeviceManagerClient { 'unbindDeviceFromGateway', ]; for (const methodName of deviceManagerStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - deviceManagerStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = deviceManagerStub.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-iot/src/v1/device_manager_proto_list.json b/packages/google-cloud-iot/src/v1/device_manager_proto_list.json new file mode 100644 index 00000000000..3fc41c024d4 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/device_manager_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/iot/v1/device_manager.proto" +] diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 9dc92b599e5..8988fe60995 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-28T11:14:39.208920Z", + "updateTime": "2019-08-31T11:12:15.448322Z", "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-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 79c2b033704..936b19cc57b 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -44,6 +44,11 @@ describe('DeviceManagerClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new iotModule.v1.DeviceManagerClient({fallback: true}); + assert(client); + }); + describe('createDeviceRegistry', () => { it('invokes createDeviceRegistry without error', done => { const client = new iotModule.v1.DeviceManagerClient({ diff --git a/packages/google-cloud-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js new file mode 100644 index 00000000000..d61a0c83160 --- /dev/null +++ b/packages/google-cloud-iot/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: 'iot', + filename: './iot.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 66e80424e18424a70484077109df8226648ce62e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 5 Sep 2019 21:43:26 +0300 Subject: [PATCH 128/370] chore(deps): update dependency eslint-plugin-node to v10 (#200) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f6e7e623928..f9f7233ad41 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -43,7 +43,7 @@ "codecov": "^3.0.2", "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 829a6dd60e1d57772f0adcac6dc35d3ee710d72e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Sep 2019 18:11:42 -0400 Subject: [PATCH 129/370] update .nycrc ignore rules (#201) --- packages/google-cloud-iot/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index 83a421a0628..23e322204ec 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.nycrc @@ -6,6 +6,7 @@ "**/.coverage", "**/apis", "**/benchmark", + "**/conformance", "**/docs", "**/samples", "**/scripts", From 67c7ece8a6d265a4747cbc9f7e72cceea80ae5cb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Sep 2019 09:24:42 -0700 Subject: [PATCH 130/370] chore: release 1.2.0 (#198) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-iot/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 9bc006331b2..58ad91fe2f6 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.2.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.3...v1.2.0) (2019-09-16) + + +### Bug Fixes + +* use correct version # for x-goog-api-client header ([09adf73](https://www.github.com/googleapis/nodejs-iot/commit/09adf73)) + + +### Features + +* load protos from JSON, grpc-fallback support ([5028ead](https://www.github.com/googleapis/nodejs-iot/commit/5028ead)) + ### [1.1.3](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.2...v1.1.3) (2019-08-02) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f9f7233ad41..d1dc017729f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.1.3", + "version": "1.2.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index ddd674a7db3..88967ad506e 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.1.3" + "@google-cloud/iot": "^1.2.0" }, "devDependencies": { "chai": "^4.2.0", From a7203687ef6dbc2f91d03692ff52b5026d4b1c0d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Sep 2019 11:07:45 -0700 Subject: [PATCH 131/370] feat: .d.ts for protos --- .../src/v1/doc/google/iam/v1/doc_policy.js | 56 +++++++++++++------ packages/google-cloud-iot/synth.metadata | 10 ++-- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index 2dbe3faa3a6..dd2654a99ba 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -20,27 +20,36 @@ * specify access control policies for Cloud Platform resources. * * - * A `Policy` consists of a list of `bindings`. A `binding` binds a list of - * `members` to a `role`, where the members can be user accounts, Google groups, - * Google domains, and service accounts. A `role` is a named list of permissions - * defined by IAM. + * A `Policy` is a collection of `bindings`. A `binding` binds one or more + * `members` to a single `role`. Members can be user accounts, service accounts, + * Google groups, and domains (such as G Suite). A `role` is a named list of + * permissions (defined by IAM or configured by users). A `binding` can + * optionally specify a `condition`, which is a logic expression that further + * constrains the role binding based on attributes about the request and/or + * target resource. * * **JSON Example** * * { * "bindings": [ * { - * "role": "roles/owner", + * "role": "role/resourcemanager.organizationAdmin", * "members": [ * "user:mike@example.com", * "group:admins@example.com", * "domain:google.com", - * "serviceAccount:my-other-app@appspot.gserviceaccount.com" + * "serviceAccount:my-project-id@appspot.gserviceaccount.com" * ] * }, * { - * "role": "roles/viewer", - * "members": ["user:sean@example.com"] + * "role": "roles/resourcemanager.organizationViewer", + * "members": ["user:eve@example.com"], + * "condition": { + * "title": "expirable access", + * "description": "Does not grant access after Sep 2020", + * "expression": "request.time < + * timestamp('2020-10-01T00:00:00.000Z')", + * } * } * ] * } @@ -52,12 +61,15 @@ * - user:mike@example.com * - group:admins@example.com * - domain:google.com - * - serviceAccount:my-other-app@appspot.gserviceaccount.com - * role: roles/owner + * - serviceAccount:my-project-id@appspot.gserviceaccount.com + * role: roles/resourcemanager.organizationAdmin * - members: - * - user:sean@example.com - * role: roles/viewer - * + * - user:eve@example.com + * role: roles/resourcemanager.organizationViewer + * condition: + * title: expirable access + * description: Does not grant access after Sep 2020 + * expression: request.time < timestamp('2020-10-01T00:00:00.000Z') * * For a description of IAM and its features, see the * [IAM developer's guide](https://cloud.google.com/iam/docs). @@ -68,12 +80,18 @@ * Valid values are 0, 1, and 3. Requests specifying an invalid value will be * rejected. * - * Policies with any conditional bindings must specify version 3. Policies - * without any conditional bindings may specify any valid value or leave the - * field unset. + * Operations affecting conditional bindings must specify version 3. This can + * be either setting a conditional policy, modifying a conditional binding, + * or removing a conditional binding from the stored conditional policy. + * Operations on non-conditional policies may specify any valid value or + * leave the field unset. + * + * If no etag is provided in the call to `setIamPolicy`, any version + * compliance checks on the incoming and/or stored policy is skipped. * * @property {Object[]} bindings - * Associates a list of `members` to a `role`. + * Associates a list of `members` to a `role`. Optionally may specify a + * `condition` that determines when binding is in effect. * `bindings` with no members will result in an error. * * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} @@ -88,7 +106,9 @@ * ensure that their change will be applied to the same version of the policy. * * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten. + * policy is overwritten. Due to blind-set semantics of an etag-less policy, + * 'setIamPolicy' will not fail even if either of incoming or stored policy + * does not meet the version requirements. * * @typedef Policy * @memberof google.iam.v1 diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 8988fe60995..ee4a2218217 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-31T11:12:15.448322Z", + "updateTime": "2019-09-20T11:15:26.311706Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.1", - "dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd" + "version": "0.36.3", + "dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "82809578652607c8ee29d9e199c21f28f81a03e0", - "internalRef": "266247326" + "sha": "44e588d97e7497dff01107d39b6a19062f9a4ffa", + "internalRef": "270200097" } }, { From 33af48208b6e8658af65bed6ae5f6f8ad42fd291 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 27 Sep 2019 02:04:32 -0400 Subject: [PATCH 132/370] chore: add protos/ to .eslintignore --- packages/google-cloud-iot/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore index f0c7aead4bf..09b31fe735a 100644 --- a/packages/google-cloud-iot/.eslintignore +++ b/packages/google-cloud-iot/.eslintignore @@ -2,3 +2,4 @@ src/**/doc/* build/ docs/ +protos/ From 6129f8d6b7375a1659e75aa3730d8c285967ffd1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 27 Sep 2019 10:23:00 -0700 Subject: [PATCH 133/370] feat: .d.ts for protos (#207) --- packages/google-cloud-iot/protos/protos.d.ts | 9539 +++++++ packages/google-cloud-iot/protos/protos.js | 23613 ++++++++++++++++ .../src/v1/doc/google/iam/v1/doc_policy.js | 2 +- packages/google-cloud-iot/synth.metadata | 10 +- 4 files changed, 33158 insertions(+), 6 deletions(-) create mode 100644 packages/google-cloud-iot/protos/protos.d.ts create mode 100644 packages/google-cloud-iot/protos/protos.js diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts new file mode 100644 index 00000000000..39707075104 --- /dev/null +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -0,0 +1,9539 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace iot. */ + namespace iot { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a DeviceManager */ + class DeviceManager extends $protobuf.rpc.Service { + + /** + * Constructs a new DeviceManager 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 DeviceManager 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): DeviceManager; + + /** + * Calls CreateDeviceRegistry. + * @param request CreateDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry + */ + public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback): void; + + /** + * Calls CreateDeviceRegistry. + * @param request CreateDeviceRegistryRequest message or plain object + * @returns Promise + */ + public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest): Promise; + + /** + * Calls GetDeviceRegistry. + * @param request GetDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry + */ + public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback): void; + + /** + * Calls GetDeviceRegistry. + * @param request GetDeviceRegistryRequest message or plain object + * @returns Promise + */ + public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest): Promise; + + /** + * Calls UpdateDeviceRegistry. + * @param request UpdateDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry + */ + public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback): void; + + /** + * Calls UpdateDeviceRegistry. + * @param request UpdateDeviceRegistryRequest message or plain object + * @returns Promise + */ + public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): Promise; + + /** + * Calls DeleteDeviceRegistry. + * @param request DeleteDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback): void; + + /** + * Calls DeleteDeviceRegistry. + * @param request DeleteDeviceRegistryRequest message or plain object + * @returns Promise + */ + public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): Promise; + + /** + * Calls ListDeviceRegistries. + * @param request ListDeviceRegistriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse + */ + public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback): void; + + /** + * Calls ListDeviceRegistries. + * @param request ListDeviceRegistriesRequest message or plain object + * @returns Promise + */ + public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest): Promise; + + /** + * Calls CreateDevice. + * @param request CreateDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device + */ + public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceCallback): void; + + /** + * Calls CreateDevice. + * @param request CreateDeviceRequest message or plain object + * @returns Promise + */ + public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest): Promise; + + /** + * Calls GetDevice. + * @param request GetDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device + */ + public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceCallback): void; + + /** + * Calls GetDevice. + * @param request GetDeviceRequest message or plain object + * @returns Promise + */ + public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest): Promise; + + /** + * Calls UpdateDevice. + * @param request UpdateDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device + */ + public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback): void; + + /** + * Calls UpdateDevice. + * @param request UpdateDeviceRequest message or plain object + * @returns Promise + */ + public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest): Promise; + + /** + * Calls DeleteDevice. + * @param request DeleteDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback): void; + + /** + * Calls DeleteDevice. + * @param request DeleteDeviceRequest message or plain object + * @returns Promise + */ + public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest): Promise; + + /** + * Calls ListDevices. + * @param request ListDevicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDevicesResponse + */ + public listDevices(request: google.cloud.iot.v1.IListDevicesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDevicesCallback): void; + + /** + * Calls ListDevices. + * @param request ListDevicesRequest message or plain object + * @returns Promise + */ + public listDevices(request: google.cloud.iot.v1.IListDevicesRequest): Promise; + + /** + * Calls ModifyCloudToDeviceConfig. + * @param request ModifyCloudToDeviceConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceConfig + */ + public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, callback: google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback): void; + + /** + * Calls ModifyCloudToDeviceConfig. + * @param request ModifyCloudToDeviceConfigRequest message or plain object + * @returns Promise + */ + public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): Promise; + + /** + * Calls ListDeviceConfigVersions. + * @param request ListDeviceConfigVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse + */ + public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback): void; + + /** + * Calls ListDeviceConfigVersions. + * @param request ListDeviceConfigVersionsRequest message or plain object + * @returns Promise + */ + public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): Promise; + + /** + * Calls ListDeviceStates. + * @param request ListDeviceStatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceStatesResponse + */ + public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback): void; + + /** + * Calls ListDeviceStates. + * @param request ListDeviceStatesRequest message or plain object + * @returns Promise + */ + public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls SendCommandToDevice. + * @param request SendCommandToDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse + */ + public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback): void; + + /** + * Calls SendCommandToDevice. + * @param request SendCommandToDeviceRequest message or plain object + * @returns Promise + */ + public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest): Promise; + + /** + * Calls BindDeviceToGateway. + * @param request BindDeviceToGatewayRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse + */ + public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback): void; + + /** + * Calls BindDeviceToGateway. + * @param request BindDeviceToGatewayRequest message or plain object + * @returns Promise + */ + public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest): Promise; + + /** + * Calls UnbindDeviceFromGateway. + * @param request UnbindDeviceFromGatewayRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse + */ + public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback): void; + + /** + * Calls UnbindDeviceFromGateway. + * @param request UnbindDeviceFromGatewayRequest message or plain object + * @returns Promise + */ + public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): Promise; + } + + namespace DeviceManager { + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry + */ + type CreateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry + */ + type GetDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry + */ + type UpdateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDeviceRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * @param error Error, if any + * @param [response] ListDeviceRegistriesResponse + */ + type ListDeviceRegistriesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceRegistriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * @param error Error, if any + * @param [response] Device + */ + type CreateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * @param error Error, if any + * @param [response] Device + */ + type GetDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * @param error Error, if any + * @param [response] Device + */ + type UpdateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDeviceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * @param error Error, if any + * @param [response] ListDevicesResponse + */ + type ListDevicesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDevicesResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * @param error Error, if any + * @param [response] DeviceConfig + */ + type ModifyCloudToDeviceConfigCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceConfig) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * @param error Error, if any + * @param [response] ListDeviceConfigVersionsResponse + */ + type ListDeviceConfigVersionsCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceConfigVersionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * @param error Error, if any + * @param [response] ListDeviceStatesResponse + */ + type ListDeviceStatesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceStatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * @param error Error, if any + * @param [response] SendCommandToDeviceResponse + */ + type SendCommandToDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.SendCommandToDeviceResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * @param error Error, if any + * @param [response] BindDeviceToGatewayResponse + */ + type BindDeviceToGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.BindDeviceToGatewayResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * @param error Error, if any + * @param [response] UnbindDeviceFromGatewayResponse + */ + type UnbindDeviceFromGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) => void; + } + + /** Properties of a CreateDeviceRegistryRequest. */ + interface ICreateDeviceRegistryRequest { + + /** CreateDeviceRegistryRequest parent */ + parent?: (string|null); + + /** CreateDeviceRegistryRequest deviceRegistry */ + deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + } + + /** Represents a CreateDeviceRegistryRequest. */ + class CreateDeviceRegistryRequest implements ICreateDeviceRegistryRequest { + + /** + * Constructs a new CreateDeviceRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest); + + /** CreateDeviceRegistryRequest parent. */ + public parent: string; + + /** CreateDeviceRegistryRequest deviceRegistry. */ + public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + + /** + * Creates a new CreateDeviceRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDeviceRegistryRequest instance + */ + public static create(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest): google.cloud.iot.v1.CreateDeviceRegistryRequest; + + /** + * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @param message CreateDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @param message CreateDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRegistryRequest; + + /** + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRegistryRequest; + + /** + * Verifies a CreateDeviceRegistryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDeviceRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRegistryRequest; + + /** + * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message CreateDeviceRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.CreateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDeviceRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetDeviceRegistryRequest. */ + interface IGetDeviceRegistryRequest { + + /** GetDeviceRegistryRequest name */ + name?: (string|null); + } + + /** Represents a GetDeviceRegistryRequest. */ + class GetDeviceRegistryRequest implements IGetDeviceRegistryRequest { + + /** + * Constructs a new GetDeviceRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest); + + /** GetDeviceRegistryRequest name. */ + public name: string; + + /** + * Creates a new GetDeviceRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeviceRegistryRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest): google.cloud.iot.v1.GetDeviceRegistryRequest; + + /** + * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @param message GetDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @param message GetDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRegistryRequest; + + /** + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRegistryRequest; + + /** + * Verifies a GetDeviceRegistryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeviceRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRegistryRequest; + + /** + * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message GetDeviceRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.GetDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDeviceRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteDeviceRegistryRequest. */ + interface IDeleteDeviceRegistryRequest { + + /** DeleteDeviceRegistryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDeviceRegistryRequest. */ + class DeleteDeviceRegistryRequest implements IDeleteDeviceRegistryRequest { + + /** + * Constructs a new DeleteDeviceRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest); + + /** DeleteDeviceRegistryRequest name. */ + public name: string; + + /** + * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDeviceRegistryRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + + /** + * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @param message DeleteDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @param message DeleteDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + + /** + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + + /** + * Verifies a DeleteDeviceRegistryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDeviceRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + + /** + * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message DeleteDeviceRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeleteDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDeviceRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateDeviceRegistryRequest. */ + interface IUpdateDeviceRegistryRequest { + + /** UpdateDeviceRegistryRequest deviceRegistry */ + deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + + /** UpdateDeviceRegistryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDeviceRegistryRequest. */ + class UpdateDeviceRegistryRequest implements IUpdateDeviceRegistryRequest { + + /** + * Constructs a new UpdateDeviceRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest); + + /** UpdateDeviceRegistryRequest deviceRegistry. */ + public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + + /** UpdateDeviceRegistryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeviceRegistryRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + + /** + * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @param message UpdateDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @param message UpdateDeviceRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + + /** + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + + /** + * Verifies an UpdateDeviceRegistryRequest message. + * @param message Plain 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 UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeviceRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + + /** + * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message UpdateDeviceRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.UpdateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeviceRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceRegistriesRequest. */ + interface IListDeviceRegistriesRequest { + + /** ListDeviceRegistriesRequest parent */ + parent?: (string|null); + + /** ListDeviceRegistriesRequest pageSize */ + pageSize?: (number|null); + + /** ListDeviceRegistriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDeviceRegistriesRequest. */ + class ListDeviceRegistriesRequest implements IListDeviceRegistriesRequest { + + /** + * Constructs a new ListDeviceRegistriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest); + + /** ListDeviceRegistriesRequest parent. */ + public parent: string; + + /** ListDeviceRegistriesRequest pageSize. */ + public pageSize: number; + + /** ListDeviceRegistriesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDeviceRegistriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceRegistriesRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest): google.cloud.iot.v1.ListDeviceRegistriesRequest; + + /** + * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @param message ListDeviceRegistriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @param message ListDeviceRegistriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceRegistriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesRequest; + + /** + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceRegistriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesRequest; + + /** + * Verifies a ListDeviceRegistriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceRegistriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesRequest; + + /** + * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. + * @param message ListDeviceRegistriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeviceRegistriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceRegistriesResponse. */ + interface IListDeviceRegistriesResponse { + + /** ListDeviceRegistriesResponse deviceRegistries */ + deviceRegistries?: (google.cloud.iot.v1.IDeviceRegistry[]|null); + + /** ListDeviceRegistriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDeviceRegistriesResponse. */ + class ListDeviceRegistriesResponse implements IListDeviceRegistriesResponse { + + /** + * Constructs a new ListDeviceRegistriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse); + + /** ListDeviceRegistriesResponse deviceRegistries. */ + public deviceRegistries: google.cloud.iot.v1.IDeviceRegistry[]; + + /** ListDeviceRegistriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDeviceRegistriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceRegistriesResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse): google.cloud.iot.v1.ListDeviceRegistriesResponse; + + /** + * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @param message ListDeviceRegistriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @param message ListDeviceRegistriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceRegistriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesResponse; + + /** + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceRegistriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesResponse; + + /** + * Verifies a ListDeviceRegistriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceRegistriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesResponse; + + /** + * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. + * @param message ListDeviceRegistriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeviceRegistriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateDeviceRequest. */ + interface ICreateDeviceRequest { + + /** CreateDeviceRequest parent */ + parent?: (string|null); + + /** CreateDeviceRequest device */ + device?: (google.cloud.iot.v1.IDevice|null); + } + + /** Represents a CreateDeviceRequest. */ + class CreateDeviceRequest implements ICreateDeviceRequest { + + /** + * Constructs a new CreateDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.ICreateDeviceRequest); + + /** CreateDeviceRequest parent. */ + public parent: string; + + /** CreateDeviceRequest device. */ + public device?: (google.cloud.iot.v1.IDevice|null); + + /** + * Creates a new CreateDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDeviceRequest instance + */ + public static create(properties?: google.cloud.iot.v1.ICreateDeviceRequest): google.cloud.iot.v1.CreateDeviceRequest; + + /** + * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @param message CreateDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @param message CreateDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRequest; + + /** + * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRequest; + + /** + * Verifies a CreateDeviceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRequest; + + /** + * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. + * @param message CreateDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.CreateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetDeviceRequest. */ + interface IGetDeviceRequest { + + /** GetDeviceRequest name */ + name?: (string|null); + + /** GetDeviceRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a GetDeviceRequest. */ + class GetDeviceRequest implements IGetDeviceRequest { + + /** + * Constructs a new GetDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IGetDeviceRequest); + + /** GetDeviceRequest name. */ + public name: string; + + /** GetDeviceRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new GetDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeviceRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IGetDeviceRequest): google.cloud.iot.v1.GetDeviceRequest; + + /** + * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @param message GetDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @param message GetDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRequest; + + /** + * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRequest; + + /** + * Verifies a GetDeviceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRequest; + + /** + * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. + * @param message GetDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.GetDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateDeviceRequest. */ + interface IUpdateDeviceRequest { + + /** UpdateDeviceRequest device */ + device?: (google.cloud.iot.v1.IDevice|null); + + /** UpdateDeviceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDeviceRequest. */ + class UpdateDeviceRequest implements IUpdateDeviceRequest { + + /** + * Constructs a new UpdateDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRequest); + + /** UpdateDeviceRequest device. */ + public device?: (google.cloud.iot.v1.IDevice|null); + + /** UpdateDeviceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeviceRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRequest): google.cloud.iot.v1.UpdateDeviceRequest; + + /** + * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @param message UpdateDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @param message UpdateDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRequest; + + /** + * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRequest; + + /** + * Verifies an UpdateDeviceRequest message. + * @param message Plain 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 UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRequest; + + /** + * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. + * @param message UpdateDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.UpdateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteDeviceRequest. */ + interface IDeleteDeviceRequest { + + /** DeleteDeviceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDeviceRequest. */ + class DeleteDeviceRequest implements IDeleteDeviceRequest { + + /** + * Constructs a new DeleteDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRequest); + + /** DeleteDeviceRequest name. */ + public name: string; + + /** + * Creates a new DeleteDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDeviceRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRequest): google.cloud.iot.v1.DeleteDeviceRequest; + + /** + * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @param message DeleteDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @param message DeleteDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRequest; + + /** + * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRequest; + + /** + * Verifies a DeleteDeviceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRequest; + + /** + * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * @param message DeleteDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeleteDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDevicesRequest. */ + interface IListDevicesRequest { + + /** ListDevicesRequest parent */ + parent?: (string|null); + + /** ListDevicesRequest deviceNumIds */ + deviceNumIds?: ((number|Long)[]|null); + + /** ListDevicesRequest deviceIds */ + deviceIds?: (string[]|null); + + /** ListDevicesRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListDevicesRequest gatewayListOptions */ + gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + + /** ListDevicesRequest pageSize */ + pageSize?: (number|null); + + /** ListDevicesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDevicesRequest. */ + class ListDevicesRequest implements IListDevicesRequest { + + /** + * Constructs a new ListDevicesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDevicesRequest); + + /** ListDevicesRequest parent. */ + public parent: string; + + /** ListDevicesRequest deviceNumIds. */ + public deviceNumIds: (number|Long)[]; + + /** ListDevicesRequest deviceIds. */ + public deviceIds: string[]; + + /** ListDevicesRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListDevicesRequest gatewayListOptions. */ + public gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + + /** ListDevicesRequest pageSize. */ + public pageSize: number; + + /** ListDevicesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDevicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDevicesRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IListDevicesRequest): google.cloud.iot.v1.ListDevicesRequest; + + /** + * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @param message ListDevicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @param message ListDevicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDevicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesRequest; + + /** + * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesRequest; + + /** + * Verifies a ListDevicesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDevicesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesRequest; + + /** + * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. + * @param message ListDevicesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDevicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDevicesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GatewayListOptions. */ + interface IGatewayListOptions { + + /** GatewayListOptions gatewayType */ + gatewayType?: (google.cloud.iot.v1.GatewayType|null); + + /** GatewayListOptions associationsGatewayId */ + associationsGatewayId?: (string|null); + + /** GatewayListOptions associationsDeviceId */ + associationsDeviceId?: (string|null); + } + + /** Represents a GatewayListOptions. */ + class GatewayListOptions implements IGatewayListOptions { + + /** + * Constructs a new GatewayListOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); + + /** GatewayListOptions gatewayType. */ + public gatewayType: google.cloud.iot.v1.GatewayType; + + /** GatewayListOptions associationsGatewayId. */ + public associationsGatewayId: string; + + /** GatewayListOptions associationsDeviceId. */ + public associationsDeviceId: string; + + /** GatewayListOptions filter. */ + public filter?: ("gatewayType"|"associationsGatewayId"|"associationsDeviceId"); + + /** + * Creates a new GatewayListOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GatewayListOptions instance + */ + public static create(properties?: google.cloud.iot.v1.IGatewayListOptions): google.cloud.iot.v1.GatewayListOptions; + + /** + * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @param message GatewayListOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @param message GatewayListOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GatewayListOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayListOptions; + + /** + * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayListOptions; + + /** + * Verifies a GatewayListOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatewayListOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayListOptions; + + /** + * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. + * @param message GatewayListOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.GatewayListOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GatewayListOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDevicesResponse. */ + interface IListDevicesResponse { + + /** ListDevicesResponse devices */ + devices?: (google.cloud.iot.v1.IDevice[]|null); + + /** ListDevicesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDevicesResponse. */ + class ListDevicesResponse implements IListDevicesResponse { + + /** + * Constructs a new ListDevicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDevicesResponse); + + /** ListDevicesResponse devices. */ + public devices: google.cloud.iot.v1.IDevice[]; + + /** ListDevicesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDevicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDevicesResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IListDevicesResponse): google.cloud.iot.v1.ListDevicesResponse; + + /** + * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @param message ListDevicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @param message ListDevicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDevicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesResponse; + + /** + * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesResponse; + + /** + * Verifies a ListDevicesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDevicesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesResponse; + + /** + * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. + * @param message ListDevicesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDevicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDevicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ModifyCloudToDeviceConfigRequest. */ + interface IModifyCloudToDeviceConfigRequest { + + /** ModifyCloudToDeviceConfigRequest name */ + name?: (string|null); + + /** ModifyCloudToDeviceConfigRequest versionToUpdate */ + versionToUpdate?: (number|Long|null); + + /** ModifyCloudToDeviceConfigRequest binaryData */ + binaryData?: (Uint8Array|null); + } + + /** Represents a ModifyCloudToDeviceConfigRequest. */ + class ModifyCloudToDeviceConfigRequest implements IModifyCloudToDeviceConfigRequest { + + /** + * Constructs a new ModifyCloudToDeviceConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest); + + /** ModifyCloudToDeviceConfigRequest name. */ + public name: string; + + /** ModifyCloudToDeviceConfigRequest versionToUpdate. */ + public versionToUpdate: (number|Long); + + /** ModifyCloudToDeviceConfigRequest binaryData. */ + public binaryData: Uint8Array; + + /** + * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ModifyCloudToDeviceConfigRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + + /** + * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + + /** + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + + /** + * Verifies a ModifyCloudToDeviceConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModifyCloudToDeviceConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + + /** + * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. + * @param message ModifyCloudToDeviceConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModifyCloudToDeviceConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceConfigVersionsRequest. */ + interface IListDeviceConfigVersionsRequest { + + /** ListDeviceConfigVersionsRequest name */ + name?: (string|null); + + /** ListDeviceConfigVersionsRequest numVersions */ + numVersions?: (number|null); + } + + /** Represents a ListDeviceConfigVersionsRequest. */ + class ListDeviceConfigVersionsRequest implements IListDeviceConfigVersionsRequest { + + /** + * Constructs a new ListDeviceConfigVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest); + + /** ListDeviceConfigVersionsRequest name. */ + public name: string; + + /** ListDeviceConfigVersionsRequest numVersions. */ + public numVersions: number; + + /** + * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceConfigVersionsRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + + /** + * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @param message ListDeviceConfigVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @param message ListDeviceConfigVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceConfigVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + + /** + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceConfigVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + + /** + * Verifies a ListDeviceConfigVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceConfigVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + + /** + * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. + * @param message ListDeviceConfigVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeviceConfigVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceConfigVersionsResponse. */ + interface IListDeviceConfigVersionsResponse { + + /** ListDeviceConfigVersionsResponse deviceConfigs */ + deviceConfigs?: (google.cloud.iot.v1.IDeviceConfig[]|null); + } + + /** Represents a ListDeviceConfigVersionsResponse. */ + class ListDeviceConfigVersionsResponse implements IListDeviceConfigVersionsResponse { + + /** + * Constructs a new ListDeviceConfigVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse); + + /** ListDeviceConfigVersionsResponse deviceConfigs. */ + public deviceConfigs: google.cloud.iot.v1.IDeviceConfig[]; + + /** + * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceConfigVersionsResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + + /** + * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @param message ListDeviceConfigVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @param message ListDeviceConfigVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceConfigVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + + /** + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceConfigVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + + /** + * Verifies a ListDeviceConfigVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceConfigVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + + /** + * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. + * @param message ListDeviceConfigVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeviceConfigVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceStatesRequest. */ + interface IListDeviceStatesRequest { + + /** ListDeviceStatesRequest name */ + name?: (string|null); + + /** ListDeviceStatesRequest numStates */ + numStates?: (number|null); + } + + /** Represents a ListDeviceStatesRequest. */ + class ListDeviceStatesRequest implements IListDeviceStatesRequest { + + /** + * Constructs a new ListDeviceStatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDeviceStatesRequest); + + /** ListDeviceStatesRequest name. */ + public name: string; + + /** ListDeviceStatesRequest numStates. */ + public numStates: number; + + /** + * Creates a new ListDeviceStatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceStatesRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IListDeviceStatesRequest): google.cloud.iot.v1.ListDeviceStatesRequest; + + /** + * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @param message ListDeviceStatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @param message ListDeviceStatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesRequest; + + /** + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesRequest; + + /** + * Verifies a ListDeviceStatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceStatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesRequest; + + /** + * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. + * @param message ListDeviceStatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDeviceStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeviceStatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceStatesResponse. */ + interface IListDeviceStatesResponse { + + /** ListDeviceStatesResponse deviceStates */ + deviceStates?: (google.cloud.iot.v1.IDeviceState[]|null); + } + + /** Represents a ListDeviceStatesResponse. */ + class ListDeviceStatesResponse implements IListDeviceStatesResponse { + + /** + * Constructs a new ListDeviceStatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IListDeviceStatesResponse); + + /** ListDeviceStatesResponse deviceStates. */ + public deviceStates: google.cloud.iot.v1.IDeviceState[]; + + /** + * Creates a new ListDeviceStatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceStatesResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IListDeviceStatesResponse): google.cloud.iot.v1.ListDeviceStatesResponse; + + /** + * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @param message ListDeviceStatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @param message ListDeviceStatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesResponse; + + /** + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesResponse; + + /** + * Verifies a ListDeviceStatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceStatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesResponse; + + /** + * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. + * @param message ListDeviceStatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.ListDeviceStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeviceStatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SendCommandToDeviceRequest. */ + interface ISendCommandToDeviceRequest { + + /** SendCommandToDeviceRequest name */ + name?: (string|null); + + /** SendCommandToDeviceRequest binaryData */ + binaryData?: (Uint8Array|null); + + /** SendCommandToDeviceRequest subfolder */ + subfolder?: (string|null); + } + + /** Represents a SendCommandToDeviceRequest. */ + class SendCommandToDeviceRequest implements ISendCommandToDeviceRequest { + + /** + * Constructs a new SendCommandToDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest); + + /** SendCommandToDeviceRequest name. */ + public name: string; + + /** SendCommandToDeviceRequest binaryData. */ + public binaryData: Uint8Array; + + /** SendCommandToDeviceRequest subfolder. */ + public subfolder: string; + + /** + * Creates a new SendCommandToDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SendCommandToDeviceRequest instance + */ + public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest): google.cloud.iot.v1.SendCommandToDeviceRequest; + + /** + * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @param message SendCommandToDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @param message SendCommandToDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SendCommandToDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceRequest; + + /** + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SendCommandToDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceRequest; + + /** + * Verifies a SendCommandToDeviceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SendCommandToDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceRequest; + + /** + * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. + * @param message SendCommandToDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SendCommandToDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SendCommandToDeviceResponse. */ + interface ISendCommandToDeviceResponse { + } + + /** Represents a SendCommandToDeviceResponse. */ + class SendCommandToDeviceResponse implements ISendCommandToDeviceResponse { + + /** + * Constructs a new SendCommandToDeviceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse); + + /** + * Creates a new SendCommandToDeviceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SendCommandToDeviceResponse instance + */ + public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse): google.cloud.iot.v1.SendCommandToDeviceResponse; + + /** + * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @param message SendCommandToDeviceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @param message SendCommandToDeviceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SendCommandToDeviceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceResponse; + + /** + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SendCommandToDeviceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceResponse; + + /** + * Verifies a SendCommandToDeviceResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SendCommandToDeviceResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceResponse; + + /** + * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. + * @param message SendCommandToDeviceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SendCommandToDeviceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BindDeviceToGatewayRequest. */ + interface IBindDeviceToGatewayRequest { + + /** BindDeviceToGatewayRequest parent */ + parent?: (string|null); + + /** BindDeviceToGatewayRequest gatewayId */ + gatewayId?: (string|null); + + /** BindDeviceToGatewayRequest deviceId */ + deviceId?: (string|null); + } + + /** Represents a BindDeviceToGatewayRequest. */ + class BindDeviceToGatewayRequest implements IBindDeviceToGatewayRequest { + + /** + * Constructs a new BindDeviceToGatewayRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest); + + /** BindDeviceToGatewayRequest parent. */ + public parent: string; + + /** BindDeviceToGatewayRequest gatewayId. */ + public gatewayId: string; + + /** BindDeviceToGatewayRequest deviceId. */ + public deviceId: string; + + /** + * Creates a new BindDeviceToGatewayRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BindDeviceToGatewayRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest): google.cloud.iot.v1.BindDeviceToGatewayRequest; + + /** + * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @param message BindDeviceToGatewayRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @param message BindDeviceToGatewayRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindDeviceToGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayRequest; + + /** + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindDeviceToGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayRequest; + + /** + * Verifies a BindDeviceToGatewayRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindDeviceToGatewayRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayRequest; + + /** + * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. + * @param message BindDeviceToGatewayRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindDeviceToGatewayRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BindDeviceToGatewayResponse. */ + interface IBindDeviceToGatewayResponse { + } + + /** Represents a BindDeviceToGatewayResponse. */ + class BindDeviceToGatewayResponse implements IBindDeviceToGatewayResponse { + + /** + * Constructs a new BindDeviceToGatewayResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse); + + /** + * Creates a new BindDeviceToGatewayResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BindDeviceToGatewayResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse): google.cloud.iot.v1.BindDeviceToGatewayResponse; + + /** + * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @param message BindDeviceToGatewayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @param message BindDeviceToGatewayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindDeviceToGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayResponse; + + /** + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindDeviceToGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayResponse; + + /** + * Verifies a BindDeviceToGatewayResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindDeviceToGatewayResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayResponse; + + /** + * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. + * @param message BindDeviceToGatewayResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindDeviceToGatewayResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbindDeviceFromGatewayRequest. */ + interface IUnbindDeviceFromGatewayRequest { + + /** UnbindDeviceFromGatewayRequest parent */ + parent?: (string|null); + + /** UnbindDeviceFromGatewayRequest gatewayId */ + gatewayId?: (string|null); + + /** UnbindDeviceFromGatewayRequest deviceId */ + deviceId?: (string|null); + } + + /** Represents an UnbindDeviceFromGatewayRequest. */ + class UnbindDeviceFromGatewayRequest implements IUnbindDeviceFromGatewayRequest { + + /** + * Constructs a new UnbindDeviceFromGatewayRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest); + + /** UnbindDeviceFromGatewayRequest parent. */ + public parent: string; + + /** UnbindDeviceFromGatewayRequest gatewayId. */ + public gatewayId: string; + + /** UnbindDeviceFromGatewayRequest deviceId. */ + public deviceId: string; + + /** + * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbindDeviceFromGatewayRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + + /** + * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @param message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @param message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbindDeviceFromGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + + /** + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbindDeviceFromGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + + /** + * Verifies an UnbindDeviceFromGatewayRequest message. + * @param message Plain 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 UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbindDeviceFromGatewayRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + + /** + * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. + * @param message UnbindDeviceFromGatewayRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnbindDeviceFromGatewayRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbindDeviceFromGatewayResponse. */ + interface IUnbindDeviceFromGatewayResponse { + } + + /** Represents an UnbindDeviceFromGatewayResponse. */ + class UnbindDeviceFromGatewayResponse implements IUnbindDeviceFromGatewayResponse { + + /** + * Constructs a new UnbindDeviceFromGatewayResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse); + + /** + * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbindDeviceFromGatewayResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @param message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @param message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbindDeviceFromGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbindDeviceFromGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Verifies an UnbindDeviceFromGatewayResponse message. + * @param message Plain 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 UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbindDeviceFromGatewayResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. + * @param message UnbindDeviceFromGatewayResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnbindDeviceFromGatewayResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Device. */ + interface IDevice { + + /** Device id */ + id?: (string|null); + + /** Device name */ + name?: (string|null); + + /** Device numId */ + numId?: (number|Long|null); + + /** Device credentials */ + credentials?: (google.cloud.iot.v1.IDeviceCredential[]|null); + + /** Device lastHeartbeatTime */ + lastHeartbeatTime?: (google.protobuf.ITimestamp|null); + + /** Device lastEventTime */ + lastEventTime?: (google.protobuf.ITimestamp|null); + + /** Device lastStateTime */ + lastStateTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigAckTime */ + lastConfigAckTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigSendTime */ + lastConfigSendTime?: (google.protobuf.ITimestamp|null); + + /** Device blocked */ + blocked?: (boolean|null); + + /** Device lastErrorTime */ + lastErrorTime?: (google.protobuf.ITimestamp|null); + + /** Device lastErrorStatus */ + lastErrorStatus?: (google.rpc.IStatus|null); + + /** Device config */ + config?: (google.cloud.iot.v1.IDeviceConfig|null); + + /** Device state */ + state?: (google.cloud.iot.v1.IDeviceState|null); + + /** Device logLevel */ + logLevel?: (google.cloud.iot.v1.LogLevel|null); + + /** Device metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Device gatewayConfig */ + gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + } + + /** Represents a Device. */ + class Device implements IDevice { + + /** + * Constructs a new Device. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDevice); + + /** Device id. */ + public id: string; + + /** Device name. */ + public name: string; + + /** Device numId. */ + public numId: (number|Long); + + /** Device credentials. */ + public credentials: google.cloud.iot.v1.IDeviceCredential[]; + + /** Device lastHeartbeatTime. */ + public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); + + /** Device lastEventTime. */ + public lastEventTime?: (google.protobuf.ITimestamp|null); + + /** Device lastStateTime. */ + public lastStateTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigAckTime. */ + public lastConfigAckTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigSendTime. */ + public lastConfigSendTime?: (google.protobuf.ITimestamp|null); + + /** Device blocked. */ + public blocked: boolean; + + /** Device lastErrorTime. */ + public lastErrorTime?: (google.protobuf.ITimestamp|null); + + /** Device lastErrorStatus. */ + public lastErrorStatus?: (google.rpc.IStatus|null); + + /** Device config. */ + public config?: (google.cloud.iot.v1.IDeviceConfig|null); + + /** Device state. */ + public state?: (google.cloud.iot.v1.IDeviceState|null); + + /** Device logLevel. */ + public logLevel: google.cloud.iot.v1.LogLevel; + + /** Device metadata. */ + public metadata: { [k: string]: string }; + + /** Device gatewayConfig. */ + public gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + + /** + * Creates a new Device instance using the specified properties. + * @param [properties] Properties to set + * @returns Device instance + */ + public static create(properties?: google.cloud.iot.v1.IDevice): google.cloud.iot.v1.Device; + + /** + * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @param message Device message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @param message Device message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Device message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.Device; + + /** + * Decodes a Device message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.Device; + + /** + * Verifies a Device message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Device message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Device + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.Device; + + /** + * Creates a plain object from a Device message. Also converts values to other types if specified. + * @param message Device + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.Device, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Device to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GatewayConfig. */ + interface IGatewayConfig { + + /** GatewayConfig gatewayType */ + gatewayType?: (google.cloud.iot.v1.GatewayType|null); + + /** GatewayConfig gatewayAuthMethod */ + gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|null); + + /** GatewayConfig lastAccessedGatewayId */ + lastAccessedGatewayId?: (string|null); + + /** GatewayConfig lastAccessedGatewayTime */ + lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GatewayConfig. */ + class GatewayConfig implements IGatewayConfig { + + /** + * Constructs a new GatewayConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IGatewayConfig); + + /** GatewayConfig gatewayType. */ + public gatewayType: google.cloud.iot.v1.GatewayType; + + /** GatewayConfig gatewayAuthMethod. */ + public gatewayAuthMethod: google.cloud.iot.v1.GatewayAuthMethod; + + /** GatewayConfig lastAccessedGatewayId. */ + public lastAccessedGatewayId: string; + + /** GatewayConfig lastAccessedGatewayTime. */ + public lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new GatewayConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GatewayConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IGatewayConfig): google.cloud.iot.v1.GatewayConfig; + + /** + * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @param message GatewayConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @param message GatewayConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GatewayConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayConfig; + + /** + * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayConfig; + + /** + * Verifies a GatewayConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatewayConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayConfig; + + /** + * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. + * @param message GatewayConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.GatewayConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GatewayConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceRegistry. */ + interface IDeviceRegistry { + + /** DeviceRegistry id */ + id?: (string|null); + + /** DeviceRegistry name */ + name?: (string|null); + + /** DeviceRegistry eventNotificationConfigs */ + eventNotificationConfigs?: (google.cloud.iot.v1.IEventNotificationConfig[]|null); + + /** DeviceRegistry stateNotificationConfig */ + stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + + /** DeviceRegistry mqttConfig */ + mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + + /** DeviceRegistry httpConfig */ + httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + + /** DeviceRegistry logLevel */ + logLevel?: (google.cloud.iot.v1.LogLevel|null); + + /** DeviceRegistry credentials */ + credentials?: (google.cloud.iot.v1.IRegistryCredential[]|null); + } + + /** Represents a DeviceRegistry. */ + class DeviceRegistry implements IDeviceRegistry { + + /** + * Constructs a new DeviceRegistry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeviceRegistry); + + /** DeviceRegistry id. */ + public id: string; + + /** DeviceRegistry name. */ + public name: string; + + /** DeviceRegistry eventNotificationConfigs. */ + public eventNotificationConfigs: google.cloud.iot.v1.IEventNotificationConfig[]; + + /** DeviceRegistry stateNotificationConfig. */ + public stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + + /** DeviceRegistry mqttConfig. */ + public mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + + /** DeviceRegistry httpConfig. */ + public httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + + /** DeviceRegistry logLevel. */ + public logLevel: google.cloud.iot.v1.LogLevel; + + /** DeviceRegistry credentials. */ + public credentials: google.cloud.iot.v1.IRegistryCredential[]; + + /** + * Creates a new DeviceRegistry instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceRegistry instance + */ + public static create(properties?: google.cloud.iot.v1.IDeviceRegistry): google.cloud.iot.v1.DeviceRegistry; + + /** + * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @param message DeviceRegistry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @param message DeviceRegistry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceRegistry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceRegistry; + + /** + * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceRegistry; + + /** + * Verifies a DeviceRegistry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceRegistry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceRegistry; + + /** + * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. + * @param message DeviceRegistry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeviceRegistry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceRegistry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MqttConfig. */ + interface IMqttConfig { + + /** MqttConfig mqttEnabledState */ + mqttEnabledState?: (google.cloud.iot.v1.MqttState|null); + } + + /** Represents a MqttConfig. */ + class MqttConfig implements IMqttConfig { + + /** + * Constructs a new MqttConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IMqttConfig); + + /** MqttConfig mqttEnabledState. */ + public mqttEnabledState: google.cloud.iot.v1.MqttState; + + /** + * Creates a new MqttConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MqttConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IMqttConfig): google.cloud.iot.v1.MqttConfig; + + /** + * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @param message MqttConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @param message MqttConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MqttConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MqttConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.MqttConfig; + + /** + * Decodes a MqttConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MqttConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.MqttConfig; + + /** + * Verifies a MqttConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MqttConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.MqttConfig; + + /** + * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. + * @param message MqttConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.MqttConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MqttConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpConfig. */ + interface IHttpConfig { + + /** HttpConfig httpEnabledState */ + httpEnabledState?: (google.cloud.iot.v1.HttpState|null); + } + + /** Represents a HttpConfig. */ + class HttpConfig implements IHttpConfig { + + /** + * Constructs a new HttpConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IHttpConfig); + + /** HttpConfig httpEnabledState. */ + public httpEnabledState: google.cloud.iot.v1.HttpState; + + /** + * Creates a new HttpConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IHttpConfig): google.cloud.iot.v1.HttpConfig; + + /** + * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @param message HttpConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @param message HttpConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.HttpConfig; + + /** + * Decodes a HttpConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.HttpConfig; + + /** + * Verifies a HttpConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.HttpConfig; + + /** + * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. + * @param message HttpConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.HttpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EventNotificationConfig. */ + interface IEventNotificationConfig { + + /** EventNotificationConfig subfolderMatches */ + subfolderMatches?: (string|null); + + /** EventNotificationConfig pubsubTopicName */ + pubsubTopicName?: (string|null); + } + + /** Represents an EventNotificationConfig. */ + class EventNotificationConfig implements IEventNotificationConfig { + + /** + * Constructs a new EventNotificationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IEventNotificationConfig); + + /** EventNotificationConfig subfolderMatches. */ + public subfolderMatches: string; + + /** EventNotificationConfig pubsubTopicName. */ + public pubsubTopicName: string; + + /** + * Creates a new EventNotificationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EventNotificationConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IEventNotificationConfig): google.cloud.iot.v1.EventNotificationConfig; + + /** + * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @param message EventNotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @param message EventNotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventNotificationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.EventNotificationConfig; + + /** + * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.EventNotificationConfig; + + /** + * Verifies an EventNotificationConfig message. + * @param message Plain 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 EventNotificationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventNotificationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.EventNotificationConfig; + + /** + * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. + * @param message EventNotificationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.EventNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventNotificationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StateNotificationConfig. */ + interface IStateNotificationConfig { + + /** StateNotificationConfig pubsubTopicName */ + pubsubTopicName?: (string|null); + } + + /** Represents a StateNotificationConfig. */ + class StateNotificationConfig implements IStateNotificationConfig { + + /** + * Constructs a new StateNotificationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IStateNotificationConfig); + + /** StateNotificationConfig pubsubTopicName. */ + public pubsubTopicName: string; + + /** + * Creates a new StateNotificationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StateNotificationConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IStateNotificationConfig): google.cloud.iot.v1.StateNotificationConfig; + + /** + * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @param message StateNotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @param message StateNotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StateNotificationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StateNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.StateNotificationConfig; + + /** + * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StateNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.StateNotificationConfig; + + /** + * Verifies a StateNotificationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StateNotificationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.StateNotificationConfig; + + /** + * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. + * @param message StateNotificationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.StateNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StateNotificationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RegistryCredential. */ + interface IRegistryCredential { + + /** RegistryCredential publicKeyCertificate */ + publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); + } + + /** Represents a RegistryCredential. */ + class RegistryCredential implements IRegistryCredential { + + /** + * Constructs a new RegistryCredential. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IRegistryCredential); + + /** RegistryCredential publicKeyCertificate. */ + public publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); + + /** RegistryCredential credential. */ + public credential?: "publicKeyCertificate"; + + /** + * Creates a new RegistryCredential instance using the specified properties. + * @param [properties] Properties to set + * @returns RegistryCredential instance + */ + public static create(properties?: google.cloud.iot.v1.IRegistryCredential): google.cloud.iot.v1.RegistryCredential; + + /** + * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @param message RegistryCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @param message RegistryCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegistryCredential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegistryCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.RegistryCredential; + + /** + * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegistryCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.RegistryCredential; + + /** + * Verifies a RegistryCredential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegistryCredential + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.RegistryCredential; + + /** + * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. + * @param message RegistryCredential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.RegistryCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegistryCredential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a X509CertificateDetails. */ + interface IX509CertificateDetails { + + /** X509CertificateDetails issuer */ + issuer?: (string|null); + + /** X509CertificateDetails subject */ + subject?: (string|null); + + /** X509CertificateDetails startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails expiryTime */ + expiryTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails signatureAlgorithm */ + signatureAlgorithm?: (string|null); + + /** X509CertificateDetails publicKeyType */ + publicKeyType?: (string|null); + } + + /** Represents a X509CertificateDetails. */ + class X509CertificateDetails implements IX509CertificateDetails { + + /** + * Constructs a new X509CertificateDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IX509CertificateDetails); + + /** X509CertificateDetails issuer. */ + public issuer: string; + + /** X509CertificateDetails subject. */ + public subject: string; + + /** X509CertificateDetails startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails expiryTime. */ + public expiryTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails signatureAlgorithm. */ + public signatureAlgorithm: string; + + /** X509CertificateDetails publicKeyType. */ + public publicKeyType: string; + + /** + * Creates a new X509CertificateDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns X509CertificateDetails instance + */ + public static create(properties?: google.cloud.iot.v1.IX509CertificateDetails): google.cloud.iot.v1.X509CertificateDetails; + + /** + * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @param message X509CertificateDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @param message X509CertificateDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a X509CertificateDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns X509CertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.X509CertificateDetails; + + /** + * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns X509CertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.X509CertificateDetails; + + /** + * Verifies a X509CertificateDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns X509CertificateDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.X509CertificateDetails; + + /** + * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. + * @param message X509CertificateDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.X509CertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this X509CertificateDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PublicKeyCertificate. */ + interface IPublicKeyCertificate { + + /** PublicKeyCertificate format */ + format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|null); + + /** PublicKeyCertificate certificate */ + certificate?: (string|null); + + /** PublicKeyCertificate x509Details */ + x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); + } + + /** Represents a PublicKeyCertificate. */ + class PublicKeyCertificate implements IPublicKeyCertificate { + + /** + * Constructs a new PublicKeyCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IPublicKeyCertificate); + + /** PublicKeyCertificate format. */ + public format: google.cloud.iot.v1.PublicKeyCertificateFormat; + + /** PublicKeyCertificate certificate. */ + public certificate: string; + + /** PublicKeyCertificate x509Details. */ + public x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); + + /** + * Creates a new PublicKeyCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKeyCertificate instance + */ + public static create(properties?: google.cloud.iot.v1.IPublicKeyCertificate): google.cloud.iot.v1.PublicKeyCertificate; + + /** + * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @param message PublicKeyCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @param message PublicKeyCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKeyCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicKeyCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCertificate; + + /** + * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicKeyCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCertificate; + + /** + * Verifies a PublicKeyCertificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKeyCertificate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCertificate; + + /** + * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. + * @param message PublicKeyCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.PublicKeyCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicKeyCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceCredential. */ + interface IDeviceCredential { + + /** DeviceCredential publicKey */ + publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + + /** DeviceCredential expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeviceCredential. */ + class DeviceCredential implements IDeviceCredential { + + /** + * Constructs a new DeviceCredential. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeviceCredential); + + /** DeviceCredential publicKey. */ + public publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + + /** DeviceCredential expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** DeviceCredential credential. */ + public credential?: "publicKey"; + + /** + * Creates a new DeviceCredential instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceCredential instance + */ + public static create(properties?: google.cloud.iot.v1.IDeviceCredential): google.cloud.iot.v1.DeviceCredential; + + /** + * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @param message DeviceCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @param message DeviceCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceCredential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceCredential; + + /** + * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceCredential; + + /** + * Verifies a DeviceCredential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceCredential + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceCredential; + + /** + * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. + * @param message DeviceCredential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeviceCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceCredential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PublicKeyCredential. */ + interface IPublicKeyCredential { + + /** PublicKeyCredential format */ + format?: (google.cloud.iot.v1.PublicKeyFormat|null); + + /** PublicKeyCredential key */ + key?: (string|null); + } + + /** Represents a PublicKeyCredential. */ + class PublicKeyCredential implements IPublicKeyCredential { + + /** + * Constructs a new PublicKeyCredential. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IPublicKeyCredential); + + /** PublicKeyCredential format. */ + public format: google.cloud.iot.v1.PublicKeyFormat; + + /** PublicKeyCredential key. */ + public key: string; + + /** + * Creates a new PublicKeyCredential instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKeyCredential instance + */ + public static create(properties?: google.cloud.iot.v1.IPublicKeyCredential): google.cloud.iot.v1.PublicKeyCredential; + + /** + * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @param message PublicKeyCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @param message PublicKeyCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKeyCredential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicKeyCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCredential; + + /** + * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicKeyCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCredential; + + /** + * Verifies a PublicKeyCredential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKeyCredential + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCredential; + + /** + * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. + * @param message PublicKeyCredential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.PublicKeyCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicKeyCredential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceConfig. */ + interface IDeviceConfig { + + /** DeviceConfig version */ + version?: (number|Long|null); + + /** DeviceConfig cloudUpdateTime */ + cloudUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig deviceAckTime */ + deviceAckTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig binaryData */ + binaryData?: (Uint8Array|null); + } + + /** Represents a DeviceConfig. */ + class DeviceConfig implements IDeviceConfig { + + /** + * Constructs a new DeviceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeviceConfig); + + /** DeviceConfig version. */ + public version: (number|Long); + + /** DeviceConfig cloudUpdateTime. */ + public cloudUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig deviceAckTime. */ + public deviceAckTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig binaryData. */ + public binaryData: Uint8Array; + + /** + * Creates a new DeviceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IDeviceConfig): google.cloud.iot.v1.DeviceConfig; + + /** + * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @param message DeviceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @param message DeviceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceConfig; + + /** + * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceConfig; + + /** + * Verifies a DeviceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceConfig; + + /** + * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. + * @param message DeviceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeviceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceState. */ + interface IDeviceState { + + /** DeviceState updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceState binaryData */ + binaryData?: (Uint8Array|null); + } + + /** Represents a DeviceState. */ + class DeviceState implements IDeviceState { + + /** + * Constructs a new DeviceState. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeviceState); + + /** DeviceState updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceState binaryData. */ + public binaryData: Uint8Array; + + /** + * Creates a new DeviceState instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceState instance + */ + public static create(properties?: google.cloud.iot.v1.IDeviceState): google.cloud.iot.v1.DeviceState; + + /** + * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @param message DeviceState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @param message DeviceState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceState; + + /** + * Decodes a DeviceState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceState; + + /** + * Verifies a DeviceState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceState + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceState; + + /** + * Creates a plain object from a DeviceState message. Also converts values to other types if specified. + * @param message DeviceState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeviceState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** MqttState enum. */ + enum MqttState { + MQTT_STATE_UNSPECIFIED = 0, + MQTT_ENABLED = 1, + MQTT_DISABLED = 2 + } + + /** HttpState enum. */ + enum HttpState { + HTTP_STATE_UNSPECIFIED = 0, + HTTP_ENABLED = 1, + HTTP_DISABLED = 2 + } + + /** LogLevel enum. */ + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0, + NONE = 10, + ERROR = 20, + INFO = 30, + DEBUG = 40 + } + + /** GatewayType enum. */ + enum GatewayType { + GATEWAY_TYPE_UNSPECIFIED = 0, + GATEWAY = 1, + NON_GATEWAY = 2 + } + + /** GatewayAuthMethod enum. */ + enum GatewayAuthMethod { + GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, + ASSOCIATION_ONLY = 1, + DEVICE_AUTH_TOKEN_ONLY = 2, + ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 + } + + /** PublicKeyCertificateFormat enum. */ + enum PublicKeyCertificateFormat { + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, + X509_CERTIFICATE_PEM = 1 + } + + /** PublicKeyFormat enum. */ + enum PublicKeyFormat { + UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, + RSA_PEM = 3, + RSA_X509_PEM = 1, + ES256_PEM = 2, + ES256_X509_PEM = 4 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an 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 Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { + + /** + * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { + + /** SetIamPolicyRequest resource */ + resource?: (string|null); + + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + } + + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { + + /** + * Constructs a new SetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + + /** SetIamPolicyRequest resource. */ + public resource: string; + + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; + + /** + * Verifies a SetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { + + /** GetIamPolicyRequest resource */ + resource?: (string|null); + + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } + + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { + + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + + /** GetIamPolicyRequest resource. */ + public resource: string; + + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { + + /** TestIamPermissionsRequest resource */ + resource?: (string|null); + + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + + /** TestIamPermissionsRequest resource. */ + public resource: string; + + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { + + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { + + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } + + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { + + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy etag */ + etag?: (Uint8Array|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy etag. */ + public etag: Uint8Array; + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: google.iam.v1.BindingDelta.Action; + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: google.iam.v1.AuditConfigDelta.Action; + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain 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 Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js new file mode 100644 index 00000000000..d9614c6887f --- /dev/null +++ b/packages/google-cloud-iot/protos/protos.js @@ -0,0 +1,23613 @@ +/*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.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.iot = (function() { + + /** + * Namespace iot. + * @memberof google.cloud + * @namespace + */ + var iot = {}; + + iot.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.iot + * @namespace + */ + var v1 = {}; + + v1.DeviceManager = (function() { + + /** + * Constructs a new DeviceManager service. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceManager + * @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 DeviceManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DeviceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceManager; + + /** + * Creates new DeviceManager service using the specified rpc implementation. + * @function create + * @memberof google.cloud.iot.v1.DeviceManager + * @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 {DeviceManager} RPC service. Useful where requests and/or responses are streamed. + */ + DeviceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef CreateDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + */ + + /** + * Calls CreateDeviceRegistry. + * @function createDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.createDeviceRegistry = function createDeviceRegistry(request, callback) { + return this.rpcCall(createDeviceRegistry, $root.google.cloud.iot.v1.CreateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "CreateDeviceRegistry" }); + + /** + * Calls CreateDeviceRegistry. + * @function createDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + */ + + /** + * Calls GetDeviceRegistry. + * @function getDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.getDeviceRegistry = function getDeviceRegistry(request, callback) { + return this.rpcCall(getDeviceRegistry, $root.google.cloud.iot.v1.GetDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "GetDeviceRegistry" }); + + /** + * Calls GetDeviceRegistry. + * @function getDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UpdateDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + */ + + /** + * Calls UpdateDeviceRegistry. + * @function updateDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.updateDeviceRegistry = function updateDeviceRegistry(request, callback) { + return this.rpcCall(updateDeviceRegistry, $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "UpdateDeviceRegistry" }); + + /** + * Calls UpdateDeviceRegistry. + * @function updateDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef DeleteDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDeviceRegistry. + * @function deleteDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.deleteDeviceRegistry = function deleteDeviceRegistry(request, callback) { + return this.rpcCall(deleteDeviceRegistry, $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDeviceRegistry" }); + + /** + * Calls DeleteDeviceRegistry. + * @function deleteDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceRegistriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} [response] ListDeviceRegistriesResponse + */ + + /** + * Calls ListDeviceRegistries. + * @function listDeviceRegistries + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback} callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.listDeviceRegistries = function listDeviceRegistries(request, callback) { + return this.rpcCall(listDeviceRegistries, $root.google.cloud.iot.v1.ListDeviceRegistriesRequest, $root.google.cloud.iot.v1.ListDeviceRegistriesResponse, request, callback); + }, "name", { value: "ListDeviceRegistries" }); + + /** + * Calls ListDeviceRegistries. + * @function listDeviceRegistries + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef CreateDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device + */ + + /** + * Calls CreateDevice. + * @function createDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.createDevice = function createDevice(request, callback) { + return this.rpcCall(createDevice, $root.google.cloud.iot.v1.CreateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "CreateDevice" }); + + /** + * Calls CreateDevice. + * @function createDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device + */ + + /** + * Calls GetDevice. + * @function getDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.getDevice = function getDevice(request, callback) { + return this.rpcCall(getDevice, $root.google.cloud.iot.v1.GetDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "GetDevice" }); + + /** + * Calls GetDevice. + * @function getDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UpdateDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device + */ + + /** + * Calls UpdateDevice. + * @function updateDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.updateDevice = function updateDevice(request, callback) { + return this.rpcCall(updateDevice, $root.google.cloud.iot.v1.UpdateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "UpdateDevice" }); + + /** + * Calls UpdateDevice. + * @function updateDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef DeleteDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDevice. + * @function deleteDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.deleteDevice = function deleteDevice(request, callback) { + return this.rpcCall(deleteDevice, $root.google.cloud.iot.v1.DeleteDeviceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDevice" }); + + /** + * Calls DeleteDevice. + * @function deleteDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDevicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDevicesResponse} [response] ListDevicesResponse + */ + + /** + * Calls ListDevices. + * @function listDevices + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDevicesCallback} callback Node-style callback called with the error, if any, and ListDevicesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.listDevices = function listDevices(request, callback) { + return this.rpcCall(listDevices, $root.google.cloud.iot.v1.ListDevicesRequest, $root.google.cloud.iot.v1.ListDevicesResponse, request, callback); + }, "name", { value: "ListDevices" }); + + /** + * Calls ListDevices. + * @function listDevices + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ModifyCloudToDeviceConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceConfig} [response] DeviceConfig + */ + + /** + * Calls ModifyCloudToDeviceConfig. + * @function modifyCloudToDeviceConfig + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback} callback Node-style callback called with the error, if any, and DeviceConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.modifyCloudToDeviceConfig = function modifyCloudToDeviceConfig(request, callback) { + return this.rpcCall(modifyCloudToDeviceConfig, $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, $root.google.cloud.iot.v1.DeviceConfig, request, callback); + }, "name", { value: "ModifyCloudToDeviceConfig" }); + + /** + * Calls ModifyCloudToDeviceConfig. + * @function modifyCloudToDeviceConfig + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceConfigVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} [response] ListDeviceConfigVersionsResponse + */ + + /** + * Calls ListDeviceConfigVersions. + * @function listDeviceConfigVersions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback} callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.listDeviceConfigVersions = function listDeviceConfigVersions(request, callback) { + return this.rpcCall(listDeviceConfigVersions, $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest, $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse, request, callback); + }, "name", { value: "ListDeviceConfigVersions" }); + + /** + * Calls ListDeviceConfigVersions. + * @function listDeviceConfigVersions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceStatesResponse} [response] ListDeviceStatesResponse + */ + + /** + * Calls ListDeviceStates. + * @function listDeviceStates + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback} callback Node-style callback called with the error, if any, and ListDeviceStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.listDeviceStates = function listDeviceStates(request, callback) { + return this.rpcCall(listDeviceStates, $root.google.cloud.iot.v1.ListDeviceStatesRequest, $root.google.cloud.iot.v1.ListDeviceStatesResponse, request, callback); + }, "name", { value: "ListDeviceStates" }); + + /** + * Calls ListDeviceStates. + * @function listDeviceStates + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef SendCommandToDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} [response] SendCommandToDeviceResponse + */ + + /** + * Calls SendCommandToDevice. + * @function sendCommandToDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback} callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.sendCommandToDevice = function sendCommandToDevice(request, callback) { + return this.rpcCall(sendCommandToDevice, $root.google.cloud.iot.v1.SendCommandToDeviceRequest, $root.google.cloud.iot.v1.SendCommandToDeviceResponse, request, callback); + }, "name", { value: "SendCommandToDevice" }); + + /** + * Calls SendCommandToDevice. + * @function sendCommandToDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef BindDeviceToGatewayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} [response] BindDeviceToGatewayResponse + */ + + /** + * Calls BindDeviceToGateway. + * @function bindDeviceToGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback} callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.bindDeviceToGateway = function bindDeviceToGateway(request, callback) { + return this.rpcCall(bindDeviceToGateway, $root.google.cloud.iot.v1.BindDeviceToGatewayRequest, $root.google.cloud.iot.v1.BindDeviceToGatewayResponse, request, callback); + }, "name", { value: "BindDeviceToGateway" }); + + /** + * Calls BindDeviceToGateway. + * @function bindDeviceToGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UnbindDeviceFromGatewayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} [response] UnbindDeviceFromGatewayResponse + */ + + /** + * Calls UnbindDeviceFromGateway. + * @function unbindDeviceFromGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback} callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.unbindDeviceFromGateway = function unbindDeviceFromGateway(request, callback) { + return this.rpcCall(unbindDeviceFromGateway, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, request, callback); + }, "name", { value: "UnbindDeviceFromGateway" }); + + /** + * Calls UnbindDeviceFromGateway. + * @function unbindDeviceFromGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DeviceManager; + })(); + + v1.CreateDeviceRegistryRequest = (function() { + + /** + * Properties of a CreateDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @interface ICreateDeviceRegistryRequest + * @property {string|null} [parent] CreateDeviceRegistryRequest parent + * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] CreateDeviceRegistryRequest deviceRegistry + */ + + /** + * Constructs a new CreateDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a CreateDeviceRegistryRequest. + * @implements ICreateDeviceRegistryRequest + * @constructor + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set + */ + function CreateDeviceRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDeviceRegistryRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @instance + */ + CreateDeviceRegistryRequest.prototype.parent = ""; + + /** + * CreateDeviceRegistryRequest deviceRegistry. + * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @instance + */ + CreateDeviceRegistryRequest.prototype.deviceRegistry = null; + + /** + * Creates a new CreateDeviceRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest instance + */ + CreateDeviceRegistryRequest.create = function create(properties) { + return new CreateDeviceRegistryRequest(properties); + }; + + /** + * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeviceRegistryRequest.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeviceRegistryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDeviceRegistryRequest message. + * @function verify + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDeviceRegistryRequest.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); + if (error) + return "deviceRegistry." + error; + } + return null; + }; + + /** + * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + */ + CreateDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRegistryRequest) + return object; + var message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deviceRegistry != null) { + if (typeof object.deviceRegistry !== "object") + throw TypeError(".google.cloud.iot.v1.CreateDeviceRegistryRequest.deviceRegistry: object expected"); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); + } + return message; + }; + + /** + * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.CreateDeviceRegistryRequest} message CreateDeviceRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDeviceRegistryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.deviceRegistry = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); + return object; + }; + + /** + * Converts this CreateDeviceRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDeviceRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateDeviceRegistryRequest; + })(); + + v1.GetDeviceRegistryRequest = (function() { + + /** + * Properties of a GetDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @interface IGetDeviceRegistryRequest + * @property {string|null} [name] GetDeviceRegistryRequest name + */ + + /** + * Constructs a new GetDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a GetDeviceRegistryRequest. + * @implements IGetDeviceRegistryRequest + * @constructor + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set + */ + function GetDeviceRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDeviceRegistryRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @instance + */ + GetDeviceRegistryRequest.prototype.name = ""; + + /** + * Creates a new GetDeviceRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest instance + */ + GetDeviceRegistryRequest.create = function create(properties) { + return new GetDeviceRegistryRequest(properties); + }; + + /** + * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceRegistryRequest.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 GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceRegistryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); + 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 GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDeviceRegistryRequest message. + * @function verify + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeviceRegistryRequest.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 GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + */ + GetDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GetDeviceRegistryRequest) + return object; + var message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.GetDeviceRegistryRequest} message GetDeviceRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeviceRegistryRequest.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 GetDeviceRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeviceRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDeviceRegistryRequest; + })(); + + v1.DeleteDeviceRegistryRequest = (function() { + + /** + * Properties of a DeleteDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @interface IDeleteDeviceRegistryRequest + * @property {string|null} [name] DeleteDeviceRegistryRequest name + */ + + /** + * Constructs a new DeleteDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeleteDeviceRegistryRequest. + * @implements IDeleteDeviceRegistryRequest + * @constructor + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set + */ + function DeleteDeviceRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDeviceRegistryRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @instance + */ + DeleteDeviceRegistryRequest.prototype.name = ""; + + /** + * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest instance + */ + DeleteDeviceRegistryRequest.create = function create(properties) { + return new DeleteDeviceRegistryRequest(properties); + }; + + /** + * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeviceRegistryRequest.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 DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeviceRegistryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); + 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 DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDeviceRegistryRequest message. + * @function verify + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDeviceRegistryRequest.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 DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + */ + DeleteDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest) + return object; + var message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.DeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDeviceRegistryRequest.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 DeleteDeviceRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDeviceRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteDeviceRegistryRequest; + })(); + + v1.UpdateDeviceRegistryRequest = (function() { + + /** + * Properties of an UpdateDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @interface IUpdateDeviceRegistryRequest + * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] UpdateDeviceRegistryRequest deviceRegistry + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRegistryRequest updateMask + */ + + /** + * Constructs a new UpdateDeviceRegistryRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents an UpdateDeviceRegistryRequest. + * @implements IUpdateDeviceRegistryRequest + * @constructor + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set + */ + function UpdateDeviceRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDeviceRegistryRequest deviceRegistry. + * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @instance + */ + UpdateDeviceRegistryRequest.prototype.deviceRegistry = null; + + /** + * UpdateDeviceRegistryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @instance + */ + UpdateDeviceRegistryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest instance + */ + UpdateDeviceRegistryRequest.create = function create(properties) { + return new UpdateDeviceRegistryRequest(properties); + }; + + /** + * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeviceRegistryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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 UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeviceRegistryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.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 UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeviceRegistryRequest message. + * @function verify + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeviceRegistryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); + if (error) + return "deviceRegistry." + 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 UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + */ + UpdateDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest) + return object; + var message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); + if (object.deviceRegistry != null) { + if (typeof object.deviceRegistry !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.deviceRegistry: object expected"); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {google.cloud.iot.v1.UpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeviceRegistryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deviceRegistry = null; + object.updateMask = null; + } + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDeviceRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeviceRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateDeviceRegistryRequest; + })(); + + v1.ListDeviceRegistriesRequest = (function() { + + /** + * Properties of a ListDeviceRegistriesRequest. + * @memberof google.cloud.iot.v1 + * @interface IListDeviceRegistriesRequest + * @property {string|null} [parent] ListDeviceRegistriesRequest parent + * @property {number|null} [pageSize] ListDeviceRegistriesRequest pageSize + * @property {string|null} [pageToken] ListDeviceRegistriesRequest pageToken + */ + + /** + * Constructs a new ListDeviceRegistriesRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDeviceRegistriesRequest. + * @implements IListDeviceRegistriesRequest + * @constructor + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set + */ + function ListDeviceRegistriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeviceRegistriesRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @instance + */ + ListDeviceRegistriesRequest.prototype.parent = ""; + + /** + * ListDeviceRegistriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @instance + */ + ListDeviceRegistriesRequest.prototype.pageSize = 0; + + /** + * ListDeviceRegistriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @instance + */ + ListDeviceRegistriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDeviceRegistriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest instance + */ + ListDeviceRegistriesRequest.create = function create(properties) { + return new ListDeviceRegistriesRequest(properties); + }; + + /** + * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceRegistriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceRegistriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceRegistriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceRegistriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeviceRegistriesRequest message. + * @function verify + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceRegistriesRequest.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 ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + */ + ListDeviceRegistriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesRequest) + return object; + var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); + 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 ListDeviceRegistriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {google.cloud.iot.v1.ListDeviceRegistriesRequest} message ListDeviceRegistriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceRegistriesRequest.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 ListDeviceRegistriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeviceRegistriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeviceRegistriesRequest; + })(); + + v1.ListDeviceRegistriesResponse = (function() { + + /** + * Properties of a ListDeviceRegistriesResponse. + * @memberof google.cloud.iot.v1 + * @interface IListDeviceRegistriesResponse + * @property {Array.|null} [deviceRegistries] ListDeviceRegistriesResponse deviceRegistries + * @property {string|null} [nextPageToken] ListDeviceRegistriesResponse nextPageToken + */ + + /** + * Constructs a new ListDeviceRegistriesResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDeviceRegistriesResponse. + * @implements IListDeviceRegistriesResponse + * @constructor + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set + */ + function ListDeviceRegistriesResponse(properties) { + this.deviceRegistries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeviceRegistriesResponse deviceRegistries. + * @member {Array.} deviceRegistries + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @instance + */ + ListDeviceRegistriesResponse.prototype.deviceRegistries = $util.emptyArray; + + /** + * ListDeviceRegistriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @instance + */ + ListDeviceRegistriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDeviceRegistriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse instance + */ + ListDeviceRegistriesResponse.create = function create(properties) { + return new ListDeviceRegistriesResponse(properties); + }; + + /** + * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceRegistriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceRegistries != null && message.deviceRegistries.length) + for (var i = 0; i < message.deviceRegistries.length; ++i) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistries[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 ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceRegistriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceRegistriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.deviceRegistries && message.deviceRegistries.length)) + message.deviceRegistries = []; + message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceRegistriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeviceRegistriesResponse message. + * @function verify + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceRegistriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceRegistries != null && message.hasOwnProperty("deviceRegistries")) { + if (!Array.isArray(message.deviceRegistries)) + return "deviceRegistries: array expected"; + for (var i = 0; i < message.deviceRegistries.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistries[i]); + if (error) + return "deviceRegistries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + */ + ListDeviceRegistriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesResponse) + return object; + var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); + if (object.deviceRegistries) { + if (!Array.isArray(object.deviceRegistries)) + throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: array expected"); + message.deviceRegistries = []; + for (var i = 0; i < object.deviceRegistries.length; ++i) { + if (typeof object.deviceRegistries[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: object expected"); + message.deviceRegistries[i] = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} message ListDeviceRegistriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceRegistriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceRegistries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.deviceRegistries && message.deviceRegistries.length) { + object.deviceRegistries = []; + for (var j = 0; j < message.deviceRegistries.length; ++j) + object.deviceRegistries[j] = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDeviceRegistriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeviceRegistriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeviceRegistriesResponse; + })(); + + v1.CreateDeviceRequest = (function() { + + /** + * Properties of a CreateDeviceRequest. + * @memberof google.cloud.iot.v1 + * @interface ICreateDeviceRequest + * @property {string|null} [parent] CreateDeviceRequest parent + * @property {google.cloud.iot.v1.IDevice|null} [device] CreateDeviceRequest device + */ + + /** + * Constructs a new CreateDeviceRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a CreateDeviceRequest. + * @implements ICreateDeviceRequest + * @constructor + * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set + */ + function CreateDeviceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDeviceRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @instance + */ + CreateDeviceRequest.prototype.parent = ""; + + /** + * CreateDeviceRequest device. + * @member {google.cloud.iot.v1.IDevice|null|undefined} device + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @instance + */ + CreateDeviceRequest.prototype.device = null; + + /** + * Creates a new CreateDeviceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest instance + */ + CreateDeviceRequest.create = function create(properties) { + return new CreateDeviceRequest(properties); + }; + + /** + * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeviceRequest.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.device != null && message.hasOwnProperty("device")) + $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDeviceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeviceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDeviceRequest message. + * @function verify + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDeviceRequest.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.device != null && message.hasOwnProperty("device")) { + var error = $root.google.cloud.iot.v1.Device.verify(message.device); + if (error) + return "device." + error; + } + return null; + }; + + /** + * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + */ + CreateDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRequest) + return object; + var message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.device != null) { + if (typeof object.device !== "object") + throw TypeError(".google.cloud.iot.v1.CreateDeviceRequest.device: object expected"); + message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); + } + return message; + }; + + /** + * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {google.cloud.iot.v1.CreateDeviceRequest} message CreateDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDeviceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.device = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.device != null && message.hasOwnProperty("device")) + object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); + return object; + }; + + /** + * Converts this CreateDeviceRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDeviceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateDeviceRequest; + })(); + + v1.GetDeviceRequest = (function() { + + /** + * Properties of a GetDeviceRequest. + * @memberof google.cloud.iot.v1 + * @interface IGetDeviceRequest + * @property {string|null} [name] GetDeviceRequest name + * @property {google.protobuf.IFieldMask|null} [fieldMask] GetDeviceRequest fieldMask + */ + + /** + * Constructs a new GetDeviceRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a GetDeviceRequest. + * @implements IGetDeviceRequest + * @constructor + * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set + */ + function GetDeviceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @instance + */ + GetDeviceRequest.prototype.name = ""; + + /** + * GetDeviceRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @instance + */ + GetDeviceRequest.prototype.fieldMask = null; + + /** + * Creates a new GetDeviceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest instance + */ + GetDeviceRequest.create = function create(properties) { + return new GetDeviceRequest(properties); + }; + + /** + * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDeviceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDeviceRequest message. + * @function verify + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeviceRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } + return null; + }; + + /** + * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + */ + GetDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GetDeviceRequest) + return object; + var message = new $root.google.cloud.iot.v1.GetDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.iot.v1.GetDeviceRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + return message; + }; + + /** + * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {google.cloud.iot.v1.GetDeviceRequest} message GetDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeviceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.fieldMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + return object; + }; + + /** + * Converts this GetDeviceRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeviceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDeviceRequest; + })(); + + v1.UpdateDeviceRequest = (function() { + + /** + * Properties of an UpdateDeviceRequest. + * @memberof google.cloud.iot.v1 + * @interface IUpdateDeviceRequest + * @property {google.cloud.iot.v1.IDevice|null} [device] UpdateDeviceRequest device + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRequest updateMask + */ + + /** + * Constructs a new UpdateDeviceRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents an UpdateDeviceRequest. + * @implements IUpdateDeviceRequest + * @constructor + * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set + */ + function UpdateDeviceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDeviceRequest device. + * @member {google.cloud.iot.v1.IDevice|null|undefined} device + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @instance + */ + UpdateDeviceRequest.prototype.device = null; + + /** + * UpdateDeviceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @instance + */ + UpdateDeviceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeviceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest instance + */ + UpdateDeviceRequest.create = function create(properties) { + return new UpdateDeviceRequest(properties); + }; + + /** + * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeviceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.device != null && message.hasOwnProperty("device")) + $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeviceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeviceRequest message. + * @function verify + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeviceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.device != null && message.hasOwnProperty("device")) { + var error = $root.google.cloud.iot.v1.Device.verify(message.device); + if (error) + return "device." + 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 UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + */ + UpdateDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRequest) + return object; + var message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); + if (object.device != null) { + if (typeof object.device !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.device: object expected"); + message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {google.cloud.iot.v1.UpdateDeviceRequest} message UpdateDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeviceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.device = null; + object.updateMask = null; + } + if (message.device != null && message.hasOwnProperty("device")) + object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDeviceRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeviceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateDeviceRequest; + })(); + + v1.DeleteDeviceRequest = (function() { + + /** + * Properties of a DeleteDeviceRequest. + * @memberof google.cloud.iot.v1 + * @interface IDeleteDeviceRequest + * @property {string|null} [name] DeleteDeviceRequest name + */ + + /** + * Constructs a new DeleteDeviceRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeleteDeviceRequest. + * @implements IDeleteDeviceRequest + * @constructor + * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set + */ + function DeleteDeviceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @instance + */ + DeleteDeviceRequest.prototype.name = ""; + + /** + * Creates a new DeleteDeviceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest instance + */ + DeleteDeviceRequest.create = function create(properties) { + return new DeleteDeviceRequest(properties); + }; + + /** + * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeviceRequest.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 DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDeviceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeviceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); + 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 DeleteDeviceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDeviceRequest message. + * @function verify + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDeviceRequest.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 DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + */ + DeleteDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRequest) + return object; + var message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {google.cloud.iot.v1.DeleteDeviceRequest} message DeleteDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDeviceRequest.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 DeleteDeviceRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDeviceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteDeviceRequest; + })(); + + v1.ListDevicesRequest = (function() { + + /** + * Properties of a ListDevicesRequest. + * @memberof google.cloud.iot.v1 + * @interface IListDevicesRequest + * @property {string|null} [parent] ListDevicesRequest parent + * @property {Array.|null} [deviceNumIds] ListDevicesRequest deviceNumIds + * @property {Array.|null} [deviceIds] ListDevicesRequest deviceIds + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListDevicesRequest fieldMask + * @property {google.cloud.iot.v1.IGatewayListOptions|null} [gatewayListOptions] ListDevicesRequest gatewayListOptions + * @property {number|null} [pageSize] ListDevicesRequest pageSize + * @property {string|null} [pageToken] ListDevicesRequest pageToken + */ + + /** + * Constructs a new ListDevicesRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDevicesRequest. + * @implements IListDevicesRequest + * @constructor + * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set + */ + function ListDevicesRequest(properties) { + this.deviceNumIds = []; + this.deviceIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDevicesRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.parent = ""; + + /** + * ListDevicesRequest deviceNumIds. + * @member {Array.} deviceNumIds + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.deviceNumIds = $util.emptyArray; + + /** + * ListDevicesRequest deviceIds. + * @member {Array.} deviceIds + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.deviceIds = $util.emptyArray; + + /** + * ListDevicesRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.fieldMask = null; + + /** + * ListDevicesRequest gatewayListOptions. + * @member {google.cloud.iot.v1.IGatewayListOptions|null|undefined} gatewayListOptions + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.gatewayListOptions = null; + + /** + * ListDevicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.pageSize = 0; + + /** + * ListDevicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDevicesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest instance + */ + ListDevicesRequest.create = function create(properties) { + return new ListDevicesRequest(properties); + }; + + /** + * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDevicesRequest.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.deviceNumIds != null && message.deviceNumIds.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.deviceNumIds.length; ++i) + writer.uint64(message.deviceNumIds[i]); + writer.ldelim(); + } + if (message.deviceIds != null && message.deviceIds.length) + for (var i = 0; i < message.deviceIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceIds[i]); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + $root.google.cloud.iot.v1.GatewayListOptions.encode(message.gatewayListOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 100, wireType 0 =*/800).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDevicesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDevicesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + if (!(message.deviceNumIds && message.deviceNumIds.length)) + message.deviceNumIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.deviceNumIds.push(reader.uint64()); + } else + message.deviceNumIds.push(reader.uint64()); + break; + case 3: + if (!(message.deviceIds && message.deviceIds.length)) + message.deviceIds = []; + message.deviceIds.push(reader.string()); + break; + case 4: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 6: + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); + break; + case 100: + message.pageSize = reader.int32(); + break; + case 101: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDevicesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDevicesRequest message. + * @function verify + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDevicesRequest.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.deviceNumIds != null && message.hasOwnProperty("deviceNumIds")) { + if (!Array.isArray(message.deviceNumIds)) + return "deviceNumIds: array expected"; + for (var i = 0; i < message.deviceNumIds.length; ++i) + if (!$util.isInteger(message.deviceNumIds[i]) && !(message.deviceNumIds[i] && $util.isInteger(message.deviceNumIds[i].low) && $util.isInteger(message.deviceNumIds[i].high))) + return "deviceNumIds: integer|Long[] expected"; + } + if (message.deviceIds != null && message.hasOwnProperty("deviceIds")) { + if (!Array.isArray(message.deviceIds)) + return "deviceIds: array expected"; + for (var i = 0; i < message.deviceIds.length; ++i) + if (!$util.isString(message.deviceIds[i])) + return "deviceIds: string[] expected"; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) { + var error = $root.google.cloud.iot.v1.GatewayListOptions.verify(message.gatewayListOptions); + if (error) + return "gatewayListOptions." + 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 ListDevicesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + */ + ListDevicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDevicesRequest) + return object; + var message = new $root.google.cloud.iot.v1.ListDevicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deviceNumIds) { + if (!Array.isArray(object.deviceNumIds)) + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceNumIds: array expected"); + message.deviceNumIds = []; + for (var i = 0; i < object.deviceNumIds.length; ++i) + if ($util.Long) + (message.deviceNumIds[i] = $util.Long.fromValue(object.deviceNumIds[i])).unsigned = true; + else if (typeof object.deviceNumIds[i] === "string") + message.deviceNumIds[i] = parseInt(object.deviceNumIds[i], 10); + else if (typeof object.deviceNumIds[i] === "number") + message.deviceNumIds[i] = object.deviceNumIds[i]; + else if (typeof object.deviceNumIds[i] === "object") + message.deviceNumIds[i] = new $util.LongBits(object.deviceNumIds[i].low >>> 0, object.deviceNumIds[i].high >>> 0).toNumber(true); + } + if (object.deviceIds) { + if (!Array.isArray(object.deviceIds)) + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceIds: array expected"); + message.deviceIds = []; + for (var i = 0; i < object.deviceIds.length; ++i) + message.deviceIds[i] = String(object.deviceIds[i]); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + if (object.gatewayListOptions != null) { + if (typeof object.gatewayListOptions !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.gatewayListOptions: object expected"); + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.fromObject(object.gatewayListOptions); + } + 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 ListDevicesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {google.cloud.iot.v1.ListDevicesRequest} message ListDevicesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDevicesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deviceNumIds = []; + object.deviceIds = []; + } + if (options.defaults) { + object.parent = ""; + object.fieldMask = null; + object.gatewayListOptions = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deviceNumIds && message.deviceNumIds.length) { + object.deviceNumIds = []; + for (var j = 0; j < message.deviceNumIds.length; ++j) + if (typeof message.deviceNumIds[j] === "number") + object.deviceNumIds[j] = options.longs === String ? String(message.deviceNumIds[j]) : message.deviceNumIds[j]; + else + object.deviceNumIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.deviceNumIds[j]) : options.longs === Number ? new $util.LongBits(message.deviceNumIds[j].low >>> 0, message.deviceNumIds[j].high >>> 0).toNumber(true) : message.deviceNumIds[j]; + } + if (message.deviceIds && message.deviceIds.length) { + object.deviceIds = []; + for (var j = 0; j < message.deviceIds.length; ++j) + object.deviceIds[j] = message.deviceIds[j]; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + object.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.toObject(message.gatewayListOptions, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDevicesRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDevicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDevicesRequest; + })(); + + v1.GatewayListOptions = (function() { + + /** + * Properties of a GatewayListOptions. + * @memberof google.cloud.iot.v1 + * @interface IGatewayListOptions + * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayListOptions gatewayType + * @property {string|null} [associationsGatewayId] GatewayListOptions associationsGatewayId + * @property {string|null} [associationsDeviceId] GatewayListOptions associationsDeviceId + */ + + /** + * Constructs a new GatewayListOptions. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a GatewayListOptions. + * @implements IGatewayListOptions + * @constructor + * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set + */ + function GatewayListOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GatewayListOptions gatewayType. + * @member {google.cloud.iot.v1.GatewayType} gatewayType + * @memberof google.cloud.iot.v1.GatewayListOptions + * @instance + */ + GatewayListOptions.prototype.gatewayType = 0; + + /** + * GatewayListOptions associationsGatewayId. + * @member {string} associationsGatewayId + * @memberof google.cloud.iot.v1.GatewayListOptions + * @instance + */ + GatewayListOptions.prototype.associationsGatewayId = ""; + + /** + * GatewayListOptions associationsDeviceId. + * @member {string} associationsDeviceId + * @memberof google.cloud.iot.v1.GatewayListOptions + * @instance + */ + GatewayListOptions.prototype.associationsDeviceId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GatewayListOptions filter. + * @member {"gatewayType"|"associationsGatewayId"|"associationsDeviceId"|undefined} filter + * @memberof google.cloud.iot.v1.GatewayListOptions + * @instance + */ + Object.defineProperty(GatewayListOptions.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["gatewayType", "associationsGatewayId", "associationsDeviceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GatewayListOptions instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions instance + */ + GatewayListOptions.create = function create(properties) { + return new GatewayListOptions(properties); + }; + + /** + * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayListOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.associationsGatewayId); + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.associationsDeviceId); + return writer; + }; + + /** + * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayListOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GatewayListOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayListOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayListOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gatewayType = reader.int32(); + break; + case 2: + message.associationsGatewayId = reader.string(); + break; + case 3: + message.associationsDeviceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayListOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GatewayListOptions message. + * @function verify + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GatewayListOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { + properties.filter = 1; + switch (message.gatewayType) { + default: + return "gatewayType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.associationsGatewayId)) + return "associationsGatewayId: string expected"; + } + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.associationsDeviceId)) + return "associationsDeviceId: string expected"; + } + return null; + }; + + /** + * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + */ + GatewayListOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GatewayListOptions) + return object; + var message = new $root.google.cloud.iot.v1.GatewayListOptions(); + switch (object.gatewayType) { + case "GATEWAY_TYPE_UNSPECIFIED": + case 0: + message.gatewayType = 0; + break; + case "GATEWAY": + case 1: + message.gatewayType = 1; + break; + case "NON_GATEWAY": + case 2: + message.gatewayType = 2; + break; + } + if (object.associationsGatewayId != null) + message.associationsGatewayId = String(object.associationsGatewayId); + if (object.associationsDeviceId != null) + message.associationsDeviceId = String(object.associationsDeviceId); + return message; + }; + + /** + * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.GatewayListOptions} message GatewayListOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GatewayListOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + if (options.oneofs) + object.filter = "gatewayType"; + } + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { + object.associationsGatewayId = message.associationsGatewayId; + if (options.oneofs) + object.filter = "associationsGatewayId"; + } + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { + object.associationsDeviceId = message.associationsDeviceId; + if (options.oneofs) + object.filter = "associationsDeviceId"; + } + return object; + }; + + /** + * Converts this GatewayListOptions to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.GatewayListOptions + * @instance + * @returns {Object.} JSON object + */ + GatewayListOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GatewayListOptions; + })(); + + v1.ListDevicesResponse = (function() { + + /** + * Properties of a ListDevicesResponse. + * @memberof google.cloud.iot.v1 + * @interface IListDevicesResponse + * @property {Array.|null} [devices] ListDevicesResponse devices + * @property {string|null} [nextPageToken] ListDevicesResponse nextPageToken + */ + + /** + * Constructs a new ListDevicesResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDevicesResponse. + * @implements IListDevicesResponse + * @constructor + * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set + */ + function ListDevicesResponse(properties) { + this.devices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDevicesResponse devices. + * @member {Array.} devices + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @instance + */ + ListDevicesResponse.prototype.devices = $util.emptyArray; + + /** + * ListDevicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @instance + */ + ListDevicesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDevicesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse instance + */ + ListDevicesResponse.create = function create(properties) { + return new ListDevicesResponse(properties); + }; + + /** + * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDevicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.devices != null && message.devices.length) + for (var i = 0; i < message.devices.length; ++i) + $root.google.cloud.iot.v1.Device.encode(message.devices[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 ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDevicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDevicesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.devices && message.devices.length)) + message.devices = []; + message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDevicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDevicesResponse message. + * @function verify + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDevicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.devices != null && message.hasOwnProperty("devices")) { + if (!Array.isArray(message.devices)) + return "devices: array expected"; + for (var i = 0; i < message.devices.length; ++i) { + var error = $root.google.cloud.iot.v1.Device.verify(message.devices[i]); + if (error) + return "devices." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + */ + ListDevicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDevicesResponse) + return object; + var message = new $root.google.cloud.iot.v1.ListDevicesResponse(); + if (object.devices) { + if (!Array.isArray(object.devices)) + throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: array expected"); + message.devices = []; + for (var i = 0; i < object.devices.length; ++i) { + if (typeof object.devices[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: object expected"); + message.devices[i] = $root.google.cloud.iot.v1.Device.fromObject(object.devices[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.ListDevicesResponse} message ListDevicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDevicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.devices = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.devices && message.devices.length) { + object.devices = []; + for (var j = 0; j < message.devices.length; ++j) + object.devices[j] = $root.google.cloud.iot.v1.Device.toObject(message.devices[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDevicesResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDevicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDevicesResponse; + })(); + + v1.ModifyCloudToDeviceConfigRequest = (function() { + + /** + * Properties of a ModifyCloudToDeviceConfigRequest. + * @memberof google.cloud.iot.v1 + * @interface IModifyCloudToDeviceConfigRequest + * @property {string|null} [name] ModifyCloudToDeviceConfigRequest name + * @property {number|Long|null} [versionToUpdate] ModifyCloudToDeviceConfigRequest versionToUpdate + * @property {Uint8Array|null} [binaryData] ModifyCloudToDeviceConfigRequest binaryData + */ + + /** + * Constructs a new ModifyCloudToDeviceConfigRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ModifyCloudToDeviceConfigRequest. + * @implements IModifyCloudToDeviceConfigRequest + * @constructor + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set + */ + function ModifyCloudToDeviceConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModifyCloudToDeviceConfigRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance + */ + ModifyCloudToDeviceConfigRequest.prototype.name = ""; + + /** + * ModifyCloudToDeviceConfigRequest versionToUpdate. + * @member {number|Long} versionToUpdate + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance + */ + ModifyCloudToDeviceConfigRequest.prototype.versionToUpdate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ModifyCloudToDeviceConfigRequest binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance + */ + ModifyCloudToDeviceConfigRequest.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest instance + */ + ModifyCloudToDeviceConfigRequest.create = function create(properties) { + return new ModifyCloudToDeviceConfigRequest(properties); + }; + + /** + * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.versionToUpdate); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.binaryData); + return writer; + }; + + /** + * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyCloudToDeviceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyCloudToDeviceConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.versionToUpdate = reader.int64(); + break; + case 3: + message.binaryData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyCloudToDeviceConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModifyCloudToDeviceConfigRequest message. + * @function verify + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (!$util.isInteger(message.versionToUpdate) && !(message.versionToUpdate && $util.isInteger(message.versionToUpdate.low) && $util.isInteger(message.versionToUpdate.high))) + return "versionToUpdate: integer|Long expected"; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + return null; + }; + + /** + * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + */ + ModifyCloudToDeviceConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest) + return object; + var message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.versionToUpdate != null) + if ($util.Long) + (message.versionToUpdate = $util.Long.fromValue(object.versionToUpdate)).unsigned = false; + else if (typeof object.versionToUpdate === "string") + message.versionToUpdate = parseInt(object.versionToUpdate, 10); + else if (typeof object.versionToUpdate === "number") + message.versionToUpdate = object.versionToUpdate; + else if (typeof object.versionToUpdate === "object") + message.versionToUpdate = new $util.LongBits(object.versionToUpdate.low >>> 0, object.versionToUpdate.high >>> 0).toNumber(); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + return message; + }; + + /** + * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModifyCloudToDeviceConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionToUpdate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionToUpdate = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (typeof message.versionToUpdate === "number") + object.versionToUpdate = options.longs === String ? String(message.versionToUpdate) : message.versionToUpdate; + else + object.versionToUpdate = options.longs === String ? $util.Long.prototype.toString.call(message.versionToUpdate) : options.longs === Number ? new $util.LongBits(message.versionToUpdate.low >>> 0, message.versionToUpdate.high >>> 0).toNumber() : message.versionToUpdate; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + return object; + }; + + /** + * Converts this ModifyCloudToDeviceConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance + * @returns {Object.} JSON object + */ + ModifyCloudToDeviceConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ModifyCloudToDeviceConfigRequest; + })(); + + v1.ListDeviceConfigVersionsRequest = (function() { + + /** + * Properties of a ListDeviceConfigVersionsRequest. + * @memberof google.cloud.iot.v1 + * @interface IListDeviceConfigVersionsRequest + * @property {string|null} [name] ListDeviceConfigVersionsRequest name + * @property {number|null} [numVersions] ListDeviceConfigVersionsRequest numVersions + */ + + /** + * Constructs a new ListDeviceConfigVersionsRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDeviceConfigVersionsRequest. + * @implements IListDeviceConfigVersionsRequest + * @constructor + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set + */ + function ListDeviceConfigVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeviceConfigVersionsRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @instance + */ + ListDeviceConfigVersionsRequest.prototype.name = ""; + + /** + * ListDeviceConfigVersionsRequest numVersions. + * @member {number} numVersions + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @instance + */ + ListDeviceConfigVersionsRequest.prototype.numVersions = 0; + + /** + * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest instance + */ + ListDeviceConfigVersionsRequest.create = function create(properties) { + return new ListDeviceConfigVersionsRequest(properties); + }; + + /** + * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceConfigVersionsRequest.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.numVersions != null && message.hasOwnProperty("numVersions")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numVersions); + return writer; + }; + + /** + * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceConfigVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceConfigVersionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.numVersions = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceConfigVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeviceConfigVersionsRequest message. + * @function verify + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceConfigVersionsRequest.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.numVersions != null && message.hasOwnProperty("numVersions")) + if (!$util.isInteger(message.numVersions)) + return "numVersions: integer expected"; + return null; + }; + + /** + * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + */ + ListDeviceConfigVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest) + return object; + var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.numVersions != null) + message.numVersions = object.numVersions | 0; + return message; + }; + + /** + * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceConfigVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.numVersions = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numVersions != null && message.hasOwnProperty("numVersions")) + object.numVersions = message.numVersions; + return object; + }; + + /** + * Converts this ListDeviceConfigVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeviceConfigVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeviceConfigVersionsRequest; + })(); + + v1.ListDeviceConfigVersionsResponse = (function() { + + /** + * Properties of a ListDeviceConfigVersionsResponse. + * @memberof google.cloud.iot.v1 + * @interface IListDeviceConfigVersionsResponse + * @property {Array.|null} [deviceConfigs] ListDeviceConfigVersionsResponse deviceConfigs + */ + + /** + * Constructs a new ListDeviceConfigVersionsResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDeviceConfigVersionsResponse. + * @implements IListDeviceConfigVersionsResponse + * @constructor + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set + */ + function ListDeviceConfigVersionsResponse(properties) { + this.deviceConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeviceConfigVersionsResponse deviceConfigs. + * @member {Array.} deviceConfigs + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @instance + */ + ListDeviceConfigVersionsResponse.prototype.deviceConfigs = $util.emptyArray; + + /** + * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse instance + */ + ListDeviceConfigVersionsResponse.create = function create(properties) { + return new ListDeviceConfigVersionsResponse(properties); + }; + + /** + * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceConfigVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceConfigs != null && message.deviceConfigs.length) + for (var i = 0; i < message.deviceConfigs.length; ++i) + $root.google.cloud.iot.v1.DeviceConfig.encode(message.deviceConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceConfigVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceConfigVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.deviceConfigs && message.deviceConfigs.length)) + message.deviceConfigs = []; + message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceConfigVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeviceConfigVersionsResponse message. + * @function verify + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceConfigVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceConfigs != null && message.hasOwnProperty("deviceConfigs")) { + if (!Array.isArray(message.deviceConfigs)) + return "deviceConfigs: array expected"; + for (var i = 0; i < message.deviceConfigs.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.deviceConfigs[i]); + if (error) + return "deviceConfigs." + error; + } + } + return null; + }; + + /** + * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + */ + ListDeviceConfigVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse) + return object; + var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); + if (object.deviceConfigs) { + if (!Array.isArray(object.deviceConfigs)) + throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: array expected"); + message.deviceConfigs = []; + for (var i = 0; i < object.deviceConfigs.length; ++i) { + if (typeof object.deviceConfigs[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: object expected"); + message.deviceConfigs[i] = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.deviceConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceConfigVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceConfigs = []; + if (message.deviceConfigs && message.deviceConfigs.length) { + object.deviceConfigs = []; + for (var j = 0; j < message.deviceConfigs.length; ++j) + object.deviceConfigs[j] = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.deviceConfigs[j], options); + } + return object; + }; + + /** + * Converts this ListDeviceConfigVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeviceConfigVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeviceConfigVersionsResponse; + })(); + + v1.ListDeviceStatesRequest = (function() { + + /** + * Properties of a ListDeviceStatesRequest. + * @memberof google.cloud.iot.v1 + * @interface IListDeviceStatesRequest + * @property {string|null} [name] ListDeviceStatesRequest name + * @property {number|null} [numStates] ListDeviceStatesRequest numStates + */ + + /** + * Constructs a new ListDeviceStatesRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDeviceStatesRequest. + * @implements IListDeviceStatesRequest + * @constructor + * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set + */ + function ListDeviceStatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeviceStatesRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @instance + */ + ListDeviceStatesRequest.prototype.name = ""; + + /** + * ListDeviceStatesRequest numStates. + * @member {number} numStates + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @instance + */ + ListDeviceStatesRequest.prototype.numStates = 0; + + /** + * Creates a new ListDeviceStatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest instance + */ + ListDeviceStatesRequest.create = function create(properties) { + return new ListDeviceStatesRequest(properties); + }; + + /** + * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceStatesRequest.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.numStates != null && message.hasOwnProperty("numStates")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numStates); + return writer; + }; + + /** + * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.numStates = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeviceStatesRequest message. + * @function verify + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceStatesRequest.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.numStates != null && message.hasOwnProperty("numStates")) + if (!$util.isInteger(message.numStates)) + return "numStates: integer expected"; + return null; + }; + + /** + * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + */ + ListDeviceStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesRequest) + return object; + var message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.numStates != null) + message.numStates = object.numStates | 0; + return message; + }; + + /** + * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {google.cloud.iot.v1.ListDeviceStatesRequest} message ListDeviceStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.numStates = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numStates != null && message.hasOwnProperty("numStates")) + object.numStates = message.numStates; + return object; + }; + + /** + * Converts this ListDeviceStatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeviceStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeviceStatesRequest; + })(); + + v1.ListDeviceStatesResponse = (function() { + + /** + * Properties of a ListDeviceStatesResponse. + * @memberof google.cloud.iot.v1 + * @interface IListDeviceStatesResponse + * @property {Array.|null} [deviceStates] ListDeviceStatesResponse deviceStates + */ + + /** + * Constructs a new ListDeviceStatesResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDeviceStatesResponse. + * @implements IListDeviceStatesResponse + * @constructor + * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set + */ + function ListDeviceStatesResponse(properties) { + this.deviceStates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeviceStatesResponse deviceStates. + * @member {Array.} deviceStates + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @instance + */ + ListDeviceStatesResponse.prototype.deviceStates = $util.emptyArray; + + /** + * Creates a new ListDeviceStatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse instance + */ + ListDeviceStatesResponse.create = function create(properties) { + return new ListDeviceStatesResponse(properties); + }; + + /** + * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceStates != null && message.deviceStates.length) + for (var i = 0; i < message.deviceStates.length; ++i) + $root.google.cloud.iot.v1.DeviceState.encode(message.deviceStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.deviceStates && message.deviceStates.length)) + message.deviceStates = []; + message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeviceStatesResponse message. + * @function verify + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceStates != null && message.hasOwnProperty("deviceStates")) { + if (!Array.isArray(message.deviceStates)) + return "deviceStates: array expected"; + for (var i = 0; i < message.deviceStates.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceState.verify(message.deviceStates[i]); + if (error) + return "deviceStates." + error; + } + } + return null; + }; + + /** + * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + */ + ListDeviceStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesResponse) + return object; + var message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); + if (object.deviceStates) { + if (!Array.isArray(object.deviceStates)) + throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: array expected"); + message.deviceStates = []; + for (var i = 0; i < object.deviceStates.length; ++i) { + if (typeof object.deviceStates[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: object expected"); + message.deviceStates[i] = $root.google.cloud.iot.v1.DeviceState.fromObject(object.deviceStates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {google.cloud.iot.v1.ListDeviceStatesResponse} message ListDeviceStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceStates = []; + if (message.deviceStates && message.deviceStates.length) { + object.deviceStates = []; + for (var j = 0; j < message.deviceStates.length; ++j) + object.deviceStates[j] = $root.google.cloud.iot.v1.DeviceState.toObject(message.deviceStates[j], options); + } + return object; + }; + + /** + * Converts this ListDeviceStatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeviceStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeviceStatesResponse; + })(); + + v1.SendCommandToDeviceRequest = (function() { + + /** + * Properties of a SendCommandToDeviceRequest. + * @memberof google.cloud.iot.v1 + * @interface ISendCommandToDeviceRequest + * @property {string|null} [name] SendCommandToDeviceRequest name + * @property {Uint8Array|null} [binaryData] SendCommandToDeviceRequest binaryData + * @property {string|null} [subfolder] SendCommandToDeviceRequest subfolder + */ + + /** + * Constructs a new SendCommandToDeviceRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a SendCommandToDeviceRequest. + * @implements ISendCommandToDeviceRequest + * @constructor + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set + */ + function SendCommandToDeviceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SendCommandToDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @instance + */ + SendCommandToDeviceRequest.prototype.name = ""; + + /** + * SendCommandToDeviceRequest binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @instance + */ + SendCommandToDeviceRequest.prototype.binaryData = $util.newBuffer([]); + + /** + * SendCommandToDeviceRequest subfolder. + * @member {string} subfolder + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @instance + */ + SendCommandToDeviceRequest.prototype.subfolder = ""; + + /** + * Creates a new SendCommandToDeviceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest instance + */ + SendCommandToDeviceRequest.create = function create(properties) { + return new SendCommandToDeviceRequest(properties); + }; + + /** + * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendCommandToDeviceRequest.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.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subfolder); + return writer; + }; + + /** + * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendCommandToDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendCommandToDeviceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.binaryData = reader.bytes(); + break; + case 3: + message.subfolder = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendCommandToDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendCommandToDeviceRequest message. + * @function verify + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendCommandToDeviceRequest.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.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + if (!$util.isString(message.subfolder)) + return "subfolder: string expected"; + return null; + }; + + /** + * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + */ + SendCommandToDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceRequest) + return object; + var message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + if (object.subfolder != null) + message.subfolder = String(object.subfolder); + return message; + }; + + /** + * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {google.cloud.iot.v1.SendCommandToDeviceRequest} message SendCommandToDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendCommandToDeviceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + object.subfolder = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + object.subfolder = message.subfolder; + return object; + }; + + /** + * Converts this SendCommandToDeviceRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @instance + * @returns {Object.} JSON object + */ + SendCommandToDeviceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendCommandToDeviceRequest; + })(); + + v1.SendCommandToDeviceResponse = (function() { + + /** + * Properties of a SendCommandToDeviceResponse. + * @memberof google.cloud.iot.v1 + * @interface ISendCommandToDeviceResponse + */ + + /** + * Constructs a new SendCommandToDeviceResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a SendCommandToDeviceResponse. + * @implements ISendCommandToDeviceResponse + * @constructor + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set + */ + function SendCommandToDeviceResponse(properties) { + if (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 SendCommandToDeviceResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse instance + */ + SendCommandToDeviceResponse.create = function create(properties) { + return new SendCommandToDeviceResponse(properties); + }; + + /** + * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendCommandToDeviceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendCommandToDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendCommandToDeviceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendCommandToDeviceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendCommandToDeviceResponse message. + * @function verify + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendCommandToDeviceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + */ + SendCommandToDeviceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceResponse) + return object; + return new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); + }; + + /** + * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} message SendCommandToDeviceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendCommandToDeviceResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SendCommandToDeviceResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @instance + * @returns {Object.} JSON object + */ + SendCommandToDeviceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendCommandToDeviceResponse; + })(); + + v1.BindDeviceToGatewayRequest = (function() { + + /** + * Properties of a BindDeviceToGatewayRequest. + * @memberof google.cloud.iot.v1 + * @interface IBindDeviceToGatewayRequest + * @property {string|null} [parent] BindDeviceToGatewayRequest parent + * @property {string|null} [gatewayId] BindDeviceToGatewayRequest gatewayId + * @property {string|null} [deviceId] BindDeviceToGatewayRequest deviceId + */ + + /** + * Constructs a new BindDeviceToGatewayRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a BindDeviceToGatewayRequest. + * @implements IBindDeviceToGatewayRequest + * @constructor + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set + */ + function BindDeviceToGatewayRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindDeviceToGatewayRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @instance + */ + BindDeviceToGatewayRequest.prototype.parent = ""; + + /** + * BindDeviceToGatewayRequest gatewayId. + * @member {string} gatewayId + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @instance + */ + BindDeviceToGatewayRequest.prototype.gatewayId = ""; + + /** + * BindDeviceToGatewayRequest deviceId. + * @member {string} deviceId + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @instance + */ + BindDeviceToGatewayRequest.prototype.deviceId = ""; + + /** + * Creates a new BindDeviceToGatewayRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest instance + */ + BindDeviceToGatewayRequest.create = function create(properties) { + return new BindDeviceToGatewayRequest(properties); + }; + + /** + * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindDeviceToGatewayRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); + return writer; + }; + + /** + * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindDeviceToGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindDeviceToGatewayRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.gatewayId = reader.string(); + break; + case 3: + message.deviceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindDeviceToGatewayRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindDeviceToGatewayRequest message. + * @function verify + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindDeviceToGatewayRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (!$util.isString(message.gatewayId)) + return "gatewayId: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; + return null; + }; + + /** + * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + */ + BindDeviceToGatewayRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayRequest) + return object; + var message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gatewayId != null) + message.gatewayId = String(object.gatewayId); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); + return message; + }; + + /** + * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {google.cloud.iot.v1.BindDeviceToGatewayRequest} message BindDeviceToGatewayRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindDeviceToGatewayRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.gatewayId = ""; + object.deviceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + object.gatewayId = message.gatewayId; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; + return object; + }; + + /** + * Converts this BindDeviceToGatewayRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @instance + * @returns {Object.} JSON object + */ + BindDeviceToGatewayRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BindDeviceToGatewayRequest; + })(); + + v1.BindDeviceToGatewayResponse = (function() { + + /** + * Properties of a BindDeviceToGatewayResponse. + * @memberof google.cloud.iot.v1 + * @interface IBindDeviceToGatewayResponse + */ + + /** + * Constructs a new BindDeviceToGatewayResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a BindDeviceToGatewayResponse. + * @implements IBindDeviceToGatewayResponse + * @constructor + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set + */ + function BindDeviceToGatewayResponse(properties) { + if (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 BindDeviceToGatewayResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse instance + */ + BindDeviceToGatewayResponse.create = function create(properties) { + return new BindDeviceToGatewayResponse(properties); + }; + + /** + * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindDeviceToGatewayResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindDeviceToGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindDeviceToGatewayResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindDeviceToGatewayResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindDeviceToGatewayResponse message. + * @function verify + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindDeviceToGatewayResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + */ + BindDeviceToGatewayResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayResponse) + return object; + return new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); + }; + + /** + * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} message BindDeviceToGatewayResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindDeviceToGatewayResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BindDeviceToGatewayResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @instance + * @returns {Object.} JSON object + */ + BindDeviceToGatewayResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BindDeviceToGatewayResponse; + })(); + + v1.UnbindDeviceFromGatewayRequest = (function() { + + /** + * Properties of an UnbindDeviceFromGatewayRequest. + * @memberof google.cloud.iot.v1 + * @interface IUnbindDeviceFromGatewayRequest + * @property {string|null} [parent] UnbindDeviceFromGatewayRequest parent + * @property {string|null} [gatewayId] UnbindDeviceFromGatewayRequest gatewayId + * @property {string|null} [deviceId] UnbindDeviceFromGatewayRequest deviceId + */ + + /** + * Constructs a new UnbindDeviceFromGatewayRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents an UnbindDeviceFromGatewayRequest. + * @implements IUnbindDeviceFromGatewayRequest + * @constructor + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set + */ + function UnbindDeviceFromGatewayRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbindDeviceFromGatewayRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @instance + */ + UnbindDeviceFromGatewayRequest.prototype.parent = ""; + + /** + * UnbindDeviceFromGatewayRequest gatewayId. + * @member {string} gatewayId + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @instance + */ + UnbindDeviceFromGatewayRequest.prototype.gatewayId = ""; + + /** + * UnbindDeviceFromGatewayRequest deviceId. + * @member {string} deviceId + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @instance + */ + UnbindDeviceFromGatewayRequest.prototype.deviceId = ""; + + /** + * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest instance + */ + UnbindDeviceFromGatewayRequest.create = function create(properties) { + return new UnbindDeviceFromGatewayRequest(properties); + }; + + /** + * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbindDeviceFromGatewayRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); + return writer; + }; + + /** + * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbindDeviceFromGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbindDeviceFromGatewayRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.gatewayId = reader.string(); + break; + case 3: + message.deviceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbindDeviceFromGatewayRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbindDeviceFromGatewayRequest message. + * @function verify + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbindDeviceFromGatewayRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (!$util.isString(message.gatewayId)) + return "gatewayId: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; + return null; + }; + + /** + * Creates an UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + */ + UnbindDeviceFromGatewayRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) + return object; + var message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gatewayId != null) + message.gatewayId = String(object.gatewayId); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); + return message; + }; + + /** + * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbindDeviceFromGatewayRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.gatewayId = ""; + object.deviceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + object.gatewayId = message.gatewayId; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; + return object; + }; + + /** + * Converts this UnbindDeviceFromGatewayRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @instance + * @returns {Object.} JSON object + */ + UnbindDeviceFromGatewayRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbindDeviceFromGatewayRequest; + })(); + + v1.UnbindDeviceFromGatewayResponse = (function() { + + /** + * Properties of an UnbindDeviceFromGatewayResponse. + * @memberof google.cloud.iot.v1 + * @interface IUnbindDeviceFromGatewayResponse + */ + + /** + * Constructs a new UnbindDeviceFromGatewayResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents an UnbindDeviceFromGatewayResponse. + * @implements IUnbindDeviceFromGatewayResponse + * @constructor + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set + */ + function UnbindDeviceFromGatewayResponse(properties) { + if (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 UnbindDeviceFromGatewayResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse instance + */ + UnbindDeviceFromGatewayResponse.create = function create(properties) { + return new UnbindDeviceFromGatewayResponse(properties); + }; + + /** + * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbindDeviceFromGatewayResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbindDeviceFromGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbindDeviceFromGatewayResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbindDeviceFromGatewayResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbindDeviceFromGatewayResponse message. + * @function verify + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbindDeviceFromGatewayResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + */ + UnbindDeviceFromGatewayResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) + return object; + return new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); + }; + + /** + * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbindDeviceFromGatewayResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UnbindDeviceFromGatewayResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @instance + * @returns {Object.} JSON object + */ + UnbindDeviceFromGatewayResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbindDeviceFromGatewayResponse; + })(); + + v1.Device = (function() { + + /** + * Properties of a Device. + * @memberof google.cloud.iot.v1 + * @interface IDevice + * @property {string|null} [id] Device id + * @property {string|null} [name] Device name + * @property {number|Long|null} [numId] Device numId + * @property {Array.|null} [credentials] Device credentials + * @property {google.protobuf.ITimestamp|null} [lastHeartbeatTime] Device lastHeartbeatTime + * @property {google.protobuf.ITimestamp|null} [lastEventTime] Device lastEventTime + * @property {google.protobuf.ITimestamp|null} [lastStateTime] Device lastStateTime + * @property {google.protobuf.ITimestamp|null} [lastConfigAckTime] Device lastConfigAckTime + * @property {google.protobuf.ITimestamp|null} [lastConfigSendTime] Device lastConfigSendTime + * @property {boolean|null} [blocked] Device blocked + * @property {google.protobuf.ITimestamp|null} [lastErrorTime] Device lastErrorTime + * @property {google.rpc.IStatus|null} [lastErrorStatus] Device lastErrorStatus + * @property {google.cloud.iot.v1.IDeviceConfig|null} [config] Device config + * @property {google.cloud.iot.v1.IDeviceState|null} [state] Device state + * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] Device logLevel + * @property {Object.|null} [metadata] Device metadata + * @property {google.cloud.iot.v1.IGatewayConfig|null} [gatewayConfig] Device gatewayConfig + */ + + /** + * Constructs a new Device. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a Device. + * @implements IDevice + * @constructor + * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set + */ + function Device(properties) { + this.credentials = []; + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Device id. + * @member {string} id + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.id = ""; + + /** + * Device name. + * @member {string} name + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.name = ""; + + /** + * Device numId. + * @member {number|Long} numId + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.numId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Device credentials. + * @member {Array.} credentials + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.credentials = $util.emptyArray; + + /** + * Device lastHeartbeatTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastHeartbeatTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastHeartbeatTime = null; + + /** + * Device lastEventTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastEventTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastEventTime = null; + + /** + * Device lastStateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastStateTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastStateTime = null; + + /** + * Device lastConfigAckTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConfigAckTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastConfigAckTime = null; + + /** + * Device lastConfigSendTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConfigSendTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastConfigSendTime = null; + + /** + * Device blocked. + * @member {boolean} blocked + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.blocked = false; + + /** + * Device lastErrorTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastErrorTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastErrorTime = null; + + /** + * Device lastErrorStatus. + * @member {google.rpc.IStatus|null|undefined} lastErrorStatus + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastErrorStatus = null; + + /** + * Device config. + * @member {google.cloud.iot.v1.IDeviceConfig|null|undefined} config + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.config = null; + + /** + * Device state. + * @member {google.cloud.iot.v1.IDeviceState|null|undefined} state + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.state = null; + + /** + * Device logLevel. + * @member {google.cloud.iot.v1.LogLevel} logLevel + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.logLevel = 0; + + /** + * Device metadata. + * @member {Object.} metadata + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.metadata = $util.emptyObject; + + /** + * Device gatewayConfig. + * @member {google.cloud.iot.v1.IGatewayConfig|null|undefined} gatewayConfig + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.gatewayConfig = null; + + /** + * Creates a new Device instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set + * @returns {google.cloud.iot.v1.Device} Device instance + */ + Device.create = function create(properties) { + return new Device(properties); + }; + + /** + * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Device.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.numId != null && message.hasOwnProperty("numId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.numId); + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + $root.google.protobuf.Timestamp.encode(message.lastHeartbeatTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + $root.google.protobuf.Timestamp.encode(message.lastEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + $root.google.protobuf.Timestamp.encode(message.lastErrorTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + $root.google.rpc.Status.encode(message.lastErrorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.credentials != null && message.credentials.length) + for (var i = 0; i < message.credentials.length; ++i) + $root.google.cloud.iot.v1.DeviceCredential.encode(message.credentials[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.config != null && message.hasOwnProperty("config")) + $root.google.cloud.iot.v1.DeviceConfig.encode(message.config, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + $root.google.protobuf.Timestamp.encode(message.lastConfigAckTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + $root.google.cloud.iot.v1.DeviceState.encode(message.state, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + $root.google.protobuf.Timestamp.encode(message.lastConfigSendTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.blocked != null && message.hasOwnProperty("blocked")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.blocked); + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + $root.google.protobuf.Timestamp.encode(message.lastStateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.logLevel); + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + $root.google.cloud.iot.v1.GatewayConfig.encode(message.gatewayConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Device.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Device message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.Device + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.Device} Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Device.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.numId = reader.uint64(); + break; + case 12: + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); + break; + case 7: + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 20: + message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 18: + message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 19: + message.blocked = reader.bool(); + break; + case 10: + message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 13: + message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); + break; + case 16: + message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); + break; + case 21: + message.logLevel = reader.int32(); + break; + case 17: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); + break; + case 24: + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Device message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.Device + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.Device} Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Device.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Device message. + * @function verify + * @memberof google.cloud.iot.v1.Device + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Device.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.numId != null && message.hasOwnProperty("numId")) + if (!$util.isInteger(message.numId) && !(message.numId && $util.isInteger(message.numId.low) && $util.isInteger(message.numId.high))) + return "numId: integer|Long expected"; + if (message.credentials != null && message.hasOwnProperty("credentials")) { + if (!Array.isArray(message.credentials)) + return "credentials: array expected"; + for (var i = 0; i < message.credentials.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceCredential.verify(message.credentials[i]); + if (error) + return "credentials." + error; + } + } + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastHeartbeatTime); + if (error) + return "lastHeartbeatTime." + error; + } + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastEventTime); + if (error) + return "lastEventTime." + error; + } + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastStateTime); + if (error) + return "lastStateTime." + error; + } + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConfigAckTime); + if (error) + return "lastConfigAckTime." + error; + } + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConfigSendTime); + if (error) + return "lastConfigSendTime." + error; + } + if (message.blocked != null && message.hasOwnProperty("blocked")) + if (typeof message.blocked !== "boolean") + return "blocked: boolean expected"; + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastErrorTime); + if (error) + return "lastErrorTime." + error; + } + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) { + var error = $root.google.rpc.Status.verify(message.lastErrorStatus); + if (error) + return "lastErrorStatus." + error; + } + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.iot.v1.DeviceState.verify(message.state); + if (error) + return "state." + error; + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 10: + case 20: + case 30: + case 40: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) { + var error = $root.google.cloud.iot.v1.GatewayConfig.verify(message.gatewayConfig); + if (error) + return "gatewayConfig." + error; + } + return null; + }; + + /** + * Creates a Device message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.Device + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.Device} Device + */ + Device.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.Device) + return object; + var message = new $root.google.cloud.iot.v1.Device(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.numId != null) + if ($util.Long) + (message.numId = $util.Long.fromValue(object.numId)).unsigned = true; + else if (typeof object.numId === "string") + message.numId = parseInt(object.numId, 10); + else if (typeof object.numId === "number") + message.numId = object.numId; + else if (typeof object.numId === "object") + message.numId = new $util.LongBits(object.numId.low >>> 0, object.numId.high >>> 0).toNumber(true); + if (object.credentials) { + if (!Array.isArray(object.credentials)) + throw TypeError(".google.cloud.iot.v1.Device.credentials: array expected"); + message.credentials = []; + for (var i = 0; i < object.credentials.length; ++i) { + if (typeof object.credentials[i] !== "object") + throw TypeError(".google.cloud.iot.v1.Device.credentials: object expected"); + message.credentials[i] = $root.google.cloud.iot.v1.DeviceCredential.fromObject(object.credentials[i]); + } + } + if (object.lastHeartbeatTime != null) { + if (typeof object.lastHeartbeatTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastHeartbeatTime: object expected"); + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.fromObject(object.lastHeartbeatTime); + } + if (object.lastEventTime != null) { + if (typeof object.lastEventTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastEventTime: object expected"); + message.lastEventTime = $root.google.protobuf.Timestamp.fromObject(object.lastEventTime); + } + if (object.lastStateTime != null) { + if (typeof object.lastStateTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastStateTime: object expected"); + message.lastStateTime = $root.google.protobuf.Timestamp.fromObject(object.lastStateTime); + } + if (object.lastConfigAckTime != null) { + if (typeof object.lastConfigAckTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastConfigAckTime: object expected"); + message.lastConfigAckTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigAckTime); + } + if (object.lastConfigSendTime != null) { + if (typeof object.lastConfigSendTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastConfigSendTime: object expected"); + message.lastConfigSendTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigSendTime); + } + if (object.blocked != null) + message.blocked = Boolean(object.blocked); + if (object.lastErrorTime != null) { + if (typeof object.lastErrorTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastErrorTime: object expected"); + message.lastErrorTime = $root.google.protobuf.Timestamp.fromObject(object.lastErrorTime); + } + if (object.lastErrorStatus != null) { + if (typeof object.lastErrorStatus !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastErrorStatus: object expected"); + message.lastErrorStatus = $root.google.rpc.Status.fromObject(object.lastErrorStatus); + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.iot.v1.Device.config: object expected"); + message.config = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.config); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.iot.v1.Device.state: object expected"); + message.state = $root.google.cloud.iot.v1.DeviceState.fromObject(object.state); + } + switch (object.logLevel) { + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "NONE": + case 10: + message.logLevel = 10; + break; + case "ERROR": + case 20: + message.logLevel = 20; + break; + case "INFO": + case 30: + message.logLevel = 30; + break; + case "DEBUG": + case 40: + message.logLevel = 40; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.iot.v1.Device.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.gatewayConfig != null) { + if (typeof object.gatewayConfig !== "object") + throw TypeError(".google.cloud.iot.v1.Device.gatewayConfig: object expected"); + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.fromObject(object.gatewayConfig); + } + return message; + }; + + /** + * Creates a plain object from a Device message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.Device} message Device + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Device.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.credentials = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.numId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numId = options.longs === String ? "0" : 0; + object.lastHeartbeatTime = null; + object.lastEventTime = null; + object.lastErrorTime = null; + object.lastErrorStatus = null; + object.config = null; + object.lastConfigAckTime = null; + object.state = null; + object.lastConfigSendTime = null; + object.blocked = false; + object.lastStateTime = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + object.gatewayConfig = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numId != null && message.hasOwnProperty("numId")) + if (typeof message.numId === "number") + object.numId = options.longs === String ? String(message.numId) : message.numId; + else + object.numId = options.longs === String ? $util.Long.prototype.toString.call(message.numId) : options.longs === Number ? new $util.LongBits(message.numId.low >>> 0, message.numId.high >>> 0).toNumber(true) : message.numId; + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + object.lastHeartbeatTime = $root.google.protobuf.Timestamp.toObject(message.lastHeartbeatTime, options); + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + object.lastEventTime = $root.google.protobuf.Timestamp.toObject(message.lastEventTime, options); + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + object.lastErrorTime = $root.google.protobuf.Timestamp.toObject(message.lastErrorTime, options); + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + object.lastErrorStatus = $root.google.rpc.Status.toObject(message.lastErrorStatus, options); + if (message.credentials && message.credentials.length) { + object.credentials = []; + for (var j = 0; j < message.credentials.length; ++j) + object.credentials[j] = $root.google.cloud.iot.v1.DeviceCredential.toObject(message.credentials[j], options); + } + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.config, options); + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + object.lastConfigAckTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigAckTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.iot.v1.DeviceState.toObject(message.state, options); + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + object.lastConfigSendTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigSendTime, options); + if (message.blocked != null && message.hasOwnProperty("blocked")) + object.blocked = message.blocked; + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + object.lastStateTime = $root.google.protobuf.Timestamp.toObject(message.lastStateTime, options); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + object.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.toObject(message.gatewayConfig, options); + return object; + }; + + /** + * Converts this Device to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.Device + * @instance + * @returns {Object.} JSON object + */ + Device.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Device; + })(); + + v1.GatewayConfig = (function() { + + /** + * Properties of a GatewayConfig. + * @memberof google.cloud.iot.v1 + * @interface IGatewayConfig + * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayConfig gatewayType + * @property {google.cloud.iot.v1.GatewayAuthMethod|null} [gatewayAuthMethod] GatewayConfig gatewayAuthMethod + * @property {string|null} [lastAccessedGatewayId] GatewayConfig lastAccessedGatewayId + * @property {google.protobuf.ITimestamp|null} [lastAccessedGatewayTime] GatewayConfig lastAccessedGatewayTime + */ + + /** + * Constructs a new GatewayConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a GatewayConfig. + * @implements IGatewayConfig + * @constructor + * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set + */ + function GatewayConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GatewayConfig gatewayType. + * @member {google.cloud.iot.v1.GatewayType} gatewayType + * @memberof google.cloud.iot.v1.GatewayConfig + * @instance + */ + GatewayConfig.prototype.gatewayType = 0; + + /** + * GatewayConfig gatewayAuthMethod. + * @member {google.cloud.iot.v1.GatewayAuthMethod} gatewayAuthMethod + * @memberof google.cloud.iot.v1.GatewayConfig + * @instance + */ + GatewayConfig.prototype.gatewayAuthMethod = 0; + + /** + * GatewayConfig lastAccessedGatewayId. + * @member {string} lastAccessedGatewayId + * @memberof google.cloud.iot.v1.GatewayConfig + * @instance + */ + GatewayConfig.prototype.lastAccessedGatewayId = ""; + + /** + * GatewayConfig lastAccessedGatewayTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastAccessedGatewayTime + * @memberof google.cloud.iot.v1.GatewayConfig + * @instance + */ + GatewayConfig.prototype.lastAccessedGatewayTime = null; + + /** + * Creates a new GatewayConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig instance + */ + GatewayConfig.create = function create(properties) { + return new GatewayConfig(properties); + }; + + /** + * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gatewayAuthMethod); + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAccessedGatewayId); + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + $root.google.protobuf.Timestamp.encode(message.lastAccessedGatewayTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GatewayConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gatewayType = reader.int32(); + break; + case 2: + message.gatewayAuthMethod = reader.int32(); + break; + case 3: + message.lastAccessedGatewayId = reader.string(); + break; + case 4: + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GatewayConfig message. + * @function verify + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GatewayConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + switch (message.gatewayType) { + default: + return "gatewayType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + switch (message.gatewayAuthMethod) { + default: + return "gatewayAuthMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + if (!$util.isString(message.lastAccessedGatewayId)) + return "lastAccessedGatewayId: string expected"; + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastAccessedGatewayTime); + if (error) + return "lastAccessedGatewayTime." + error; + } + return null; + }; + + /** + * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + */ + GatewayConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GatewayConfig) + return object; + var message = new $root.google.cloud.iot.v1.GatewayConfig(); + switch (object.gatewayType) { + case "GATEWAY_TYPE_UNSPECIFIED": + case 0: + message.gatewayType = 0; + break; + case "GATEWAY": + case 1: + message.gatewayType = 1; + break; + case "NON_GATEWAY": + case 2: + message.gatewayType = 2; + break; + } + switch (object.gatewayAuthMethod) { + case "GATEWAY_AUTH_METHOD_UNSPECIFIED": + case 0: + message.gatewayAuthMethod = 0; + break; + case "ASSOCIATION_ONLY": + case 1: + message.gatewayAuthMethod = 1; + break; + case "DEVICE_AUTH_TOKEN_ONLY": + case 2: + message.gatewayAuthMethod = 2; + break; + case "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": + case 3: + message.gatewayAuthMethod = 3; + break; + } + if (object.lastAccessedGatewayId != null) + message.lastAccessedGatewayId = String(object.lastAccessedGatewayId); + if (object.lastAccessedGatewayTime != null) { + if (typeof object.lastAccessedGatewayTime !== "object") + throw TypeError(".google.cloud.iot.v1.GatewayConfig.lastAccessedGatewayTime: object expected"); + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.fromObject(object.lastAccessedGatewayTime); + } + return message; + }; + + /** + * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.GatewayConfig} message GatewayConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GatewayConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gatewayType = options.enums === String ? "GATEWAY_TYPE_UNSPECIFIED" : 0; + object.gatewayAuthMethod = options.enums === String ? "GATEWAY_AUTH_METHOD_UNSPECIFIED" : 0; + object.lastAccessedGatewayId = ""; + object.lastAccessedGatewayTime = null; + } + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + object.lastAccessedGatewayId = message.lastAccessedGatewayId; + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + object.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.toObject(message.lastAccessedGatewayTime, options); + return object; + }; + + /** + * Converts this GatewayConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.GatewayConfig + * @instance + * @returns {Object.} JSON object + */ + GatewayConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GatewayConfig; + })(); + + v1.DeviceRegistry = (function() { + + /** + * Properties of a DeviceRegistry. + * @memberof google.cloud.iot.v1 + * @interface IDeviceRegistry + * @property {string|null} [id] DeviceRegistry id + * @property {string|null} [name] DeviceRegistry name + * @property {Array.|null} [eventNotificationConfigs] DeviceRegistry eventNotificationConfigs + * @property {google.cloud.iot.v1.IStateNotificationConfig|null} [stateNotificationConfig] DeviceRegistry stateNotificationConfig + * @property {google.cloud.iot.v1.IMqttConfig|null} [mqttConfig] DeviceRegistry mqttConfig + * @property {google.cloud.iot.v1.IHttpConfig|null} [httpConfig] DeviceRegistry httpConfig + * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] DeviceRegistry logLevel + * @property {Array.|null} [credentials] DeviceRegistry credentials + */ + + /** + * Constructs a new DeviceRegistry. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceRegistry. + * @implements IDeviceRegistry + * @constructor + * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set + */ + function DeviceRegistry(properties) { + this.eventNotificationConfigs = []; + this.credentials = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeviceRegistry id. + * @member {string} id + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.id = ""; + + /** + * DeviceRegistry name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.name = ""; + + /** + * DeviceRegistry eventNotificationConfigs. + * @member {Array.} eventNotificationConfigs + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.eventNotificationConfigs = $util.emptyArray; + + /** + * DeviceRegistry stateNotificationConfig. + * @member {google.cloud.iot.v1.IStateNotificationConfig|null|undefined} stateNotificationConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.stateNotificationConfig = null; + + /** + * DeviceRegistry mqttConfig. + * @member {google.cloud.iot.v1.IMqttConfig|null|undefined} mqttConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.mqttConfig = null; + + /** + * DeviceRegistry httpConfig. + * @member {google.cloud.iot.v1.IHttpConfig|null|undefined} httpConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.httpConfig = null; + + /** + * DeviceRegistry logLevel. + * @member {google.cloud.iot.v1.LogLevel} logLevel + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.logLevel = 0; + + /** + * DeviceRegistry credentials. + * @member {Array.} credentials + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.credentials = $util.emptyArray; + + /** + * Creates a new DeviceRegistry instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry instance + */ + DeviceRegistry.create = function create(properties) { + return new DeviceRegistry(properties); + }; + + /** + * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceRegistry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + $root.google.cloud.iot.v1.MqttConfig.encode(message.mqttConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + $root.google.cloud.iot.v1.StateNotificationConfig.encode(message.stateNotificationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.credentials != null && message.credentials.length) + for (var i = 0; i < message.credentials.length; ++i) + $root.google.cloud.iot.v1.RegistryCredential.encode(message.credentials[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + $root.google.cloud.iot.v1.HttpConfig.encode(message.httpConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventNotificationConfigs != null && message.eventNotificationConfigs.length) + for (var i = 0; i < message.eventNotificationConfigs.length; ++i) + $root.google.cloud.iot.v1.EventNotificationConfig.encode(message.eventNotificationConfigs[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logLevel); + return writer; + }; + + /** + * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceRegistry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceRegistry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceRegistry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceRegistry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 10: + if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) + message.eventNotificationConfigs = []; + message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); + break; + case 7: + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); + break; + case 4: + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); + break; + case 9: + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); + break; + case 11: + message.logLevel = reader.int32(); + break; + case 8: + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceRegistry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceRegistry message. + * @function verify + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceRegistry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.eventNotificationConfigs != null && message.hasOwnProperty("eventNotificationConfigs")) { + if (!Array.isArray(message.eventNotificationConfigs)) + return "eventNotificationConfigs: array expected"; + for (var i = 0; i < message.eventNotificationConfigs.length; ++i) { + var error = $root.google.cloud.iot.v1.EventNotificationConfig.verify(message.eventNotificationConfigs[i]); + if (error) + return "eventNotificationConfigs." + error; + } + } + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) { + var error = $root.google.cloud.iot.v1.StateNotificationConfig.verify(message.stateNotificationConfig); + if (error) + return "stateNotificationConfig." + error; + } + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) { + var error = $root.google.cloud.iot.v1.MqttConfig.verify(message.mqttConfig); + if (error) + return "mqttConfig." + error; + } + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) { + var error = $root.google.cloud.iot.v1.HttpConfig.verify(message.httpConfig); + if (error) + return "httpConfig." + error; + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 10: + case 20: + case 30: + case 40: + break; + } + if (message.credentials != null && message.hasOwnProperty("credentials")) { + if (!Array.isArray(message.credentials)) + return "credentials: array expected"; + for (var i = 0; i < message.credentials.length; ++i) { + var error = $root.google.cloud.iot.v1.RegistryCredential.verify(message.credentials[i]); + if (error) + return "credentials." + error; + } + } + return null; + }; + + /** + * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + */ + DeviceRegistry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceRegistry) + return object; + var message = new $root.google.cloud.iot.v1.DeviceRegistry(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.eventNotificationConfigs) { + if (!Array.isArray(object.eventNotificationConfigs)) + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: array expected"); + message.eventNotificationConfigs = []; + for (var i = 0; i < object.eventNotificationConfigs.length; ++i) { + if (typeof object.eventNotificationConfigs[i] !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: object expected"); + message.eventNotificationConfigs[i] = $root.google.cloud.iot.v1.EventNotificationConfig.fromObject(object.eventNotificationConfigs[i]); + } + } + if (object.stateNotificationConfig != null) { + if (typeof object.stateNotificationConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.stateNotificationConfig: object expected"); + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.fromObject(object.stateNotificationConfig); + } + if (object.mqttConfig != null) { + if (typeof object.mqttConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.mqttConfig: object expected"); + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.fromObject(object.mqttConfig); + } + if (object.httpConfig != null) { + if (typeof object.httpConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.httpConfig: object expected"); + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.fromObject(object.httpConfig); + } + switch (object.logLevel) { + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "NONE": + case 10: + message.logLevel = 10; + break; + case "ERROR": + case 20: + message.logLevel = 20; + break; + case "INFO": + case 30: + message.logLevel = 30; + break; + case "DEBUG": + case 40: + message.logLevel = 40; + break; + } + if (object.credentials) { + if (!Array.isArray(object.credentials)) + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: array expected"); + message.credentials = []; + for (var i = 0; i < object.credentials.length; ++i) { + if (typeof object.credentials[i] !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: object expected"); + message.credentials[i] = $root.google.cloud.iot.v1.RegistryCredential.fromObject(object.credentials[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.DeviceRegistry} message DeviceRegistry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceRegistry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.credentials = []; + object.eventNotificationConfigs = []; + } + if (options.defaults) { + object.id = ""; + object.name = ""; + object.mqttConfig = null; + object.stateNotificationConfig = null; + object.httpConfig = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + object.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.toObject(message.mqttConfig, options); + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + object.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.toObject(message.stateNotificationConfig, options); + if (message.credentials && message.credentials.length) { + object.credentials = []; + for (var j = 0; j < message.credentials.length; ++j) + object.credentials[j] = $root.google.cloud.iot.v1.RegistryCredential.toObject(message.credentials[j], options); + } + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + object.httpConfig = $root.google.cloud.iot.v1.HttpConfig.toObject(message.httpConfig, options); + if (message.eventNotificationConfigs && message.eventNotificationConfigs.length) { + object.eventNotificationConfigs = []; + for (var j = 0; j < message.eventNotificationConfigs.length; ++j) + object.eventNotificationConfigs[j] = $root.google.cloud.iot.v1.EventNotificationConfig.toObject(message.eventNotificationConfigs[j], options); + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + return object; + }; + + /** + * Converts this DeviceRegistry to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + * @returns {Object.} JSON object + */ + DeviceRegistry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeviceRegistry; + })(); + + v1.MqttConfig = (function() { + + /** + * Properties of a MqttConfig. + * @memberof google.cloud.iot.v1 + * @interface IMqttConfig + * @property {google.cloud.iot.v1.MqttState|null} [mqttEnabledState] MqttConfig mqttEnabledState + */ + + /** + * Constructs a new MqttConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a MqttConfig. + * @implements IMqttConfig + * @constructor + * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set + */ + function MqttConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MqttConfig mqttEnabledState. + * @member {google.cloud.iot.v1.MqttState} mqttEnabledState + * @memberof google.cloud.iot.v1.MqttConfig + * @instance + */ + MqttConfig.prototype.mqttEnabledState = 0; + + /** + * Creates a new MqttConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig instance + */ + MqttConfig.create = function create(properties) { + return new MqttConfig(properties); + }; + + /** + * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MqttConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mqttEnabledState); + return writer; + }; + + /** + * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MqttConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MqttConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MqttConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.MqttConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mqttEnabledState = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MqttConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MqttConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MqttConfig message. + * @function verify + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MqttConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + switch (message.mqttEnabledState) { + default: + return "mqttEnabledState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + */ + MqttConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.MqttConfig) + return object; + var message = new $root.google.cloud.iot.v1.MqttConfig(); + switch (object.mqttEnabledState) { + case "MQTT_STATE_UNSPECIFIED": + case 0: + message.mqttEnabledState = 0; + break; + case "MQTT_ENABLED": + case 1: + message.mqttEnabledState = 1; + break; + case "MQTT_DISABLED": + case 2: + message.mqttEnabledState = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {google.cloud.iot.v1.MqttConfig} message MqttConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MqttConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mqttEnabledState = options.enums === String ? "MQTT_STATE_UNSPECIFIED" : 0; + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; + return object; + }; + + /** + * Converts this MqttConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.MqttConfig + * @instance + * @returns {Object.} JSON object + */ + MqttConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MqttConfig; + })(); + + v1.HttpConfig = (function() { + + /** + * Properties of a HttpConfig. + * @memberof google.cloud.iot.v1 + * @interface IHttpConfig + * @property {google.cloud.iot.v1.HttpState|null} [httpEnabledState] HttpConfig httpEnabledState + */ + + /** + * Constructs a new HttpConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a HttpConfig. + * @implements IHttpConfig + * @constructor + * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set + */ + function HttpConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpConfig httpEnabledState. + * @member {google.cloud.iot.v1.HttpState} httpEnabledState + * @memberof google.cloud.iot.v1.HttpConfig + * @instance + */ + HttpConfig.prototype.httpEnabledState = 0; + + /** + * Creates a new HttpConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig instance + */ + HttpConfig.create = function create(properties) { + return new HttpConfig(properties); + }; + + /** + * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.httpEnabledState); + return writer; + }; + + /** + * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.HttpConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.httpEnabledState = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpConfig message. + * @function verify + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + switch (message.httpEnabledState) { + default: + return "httpEnabledState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + */ + HttpConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.HttpConfig) + return object; + var message = new $root.google.cloud.iot.v1.HttpConfig(); + switch (object.httpEnabledState) { + case "HTTP_STATE_UNSPECIFIED": + case 0: + message.httpEnabledState = 0; + break; + case "HTTP_ENABLED": + case 1: + message.httpEnabledState = 1; + break; + case "HTTP_DISABLED": + case 2: + message.httpEnabledState = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {google.cloud.iot.v1.HttpConfig} message HttpConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.httpEnabledState = options.enums === String ? "HTTP_STATE_UNSPECIFIED" : 0; + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; + return object; + }; + + /** + * Converts this HttpConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.HttpConfig + * @instance + * @returns {Object.} JSON object + */ + HttpConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpConfig; + })(); + + v1.EventNotificationConfig = (function() { + + /** + * Properties of an EventNotificationConfig. + * @memberof google.cloud.iot.v1 + * @interface IEventNotificationConfig + * @property {string|null} [subfolderMatches] EventNotificationConfig subfolderMatches + * @property {string|null} [pubsubTopicName] EventNotificationConfig pubsubTopicName + */ + + /** + * Constructs a new EventNotificationConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents an EventNotificationConfig. + * @implements IEventNotificationConfig + * @constructor + * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set + */ + function EventNotificationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventNotificationConfig subfolderMatches. + * @member {string} subfolderMatches + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @instance + */ + EventNotificationConfig.prototype.subfolderMatches = ""; + + /** + * EventNotificationConfig pubsubTopicName. + * @member {string} pubsubTopicName + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @instance + */ + EventNotificationConfig.prototype.pubsubTopicName = ""; + + /** + * Creates a new EventNotificationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig instance + */ + EventNotificationConfig.create = function create(properties) { + return new EventNotificationConfig(properties); + }; + + /** + * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventNotificationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subfolderMatches); + return writer; + }; + + /** + * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventNotificationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventNotificationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.EventNotificationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.subfolderMatches = reader.string(); + break; + case 1: + message.pubsubTopicName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventNotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventNotificationConfig message. + * @function verify + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventNotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + if (!$util.isString(message.subfolderMatches)) + return "subfolderMatches: string expected"; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (!$util.isString(message.pubsubTopicName)) + return "pubsubTopicName: string expected"; + return null; + }; + + /** + * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + */ + EventNotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.EventNotificationConfig) + return object; + var message = new $root.google.cloud.iot.v1.EventNotificationConfig(); + if (object.subfolderMatches != null) + message.subfolderMatches = String(object.subfolderMatches); + if (object.pubsubTopicName != null) + message.pubsubTopicName = String(object.pubsubTopicName); + return message; + }; + + /** + * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {google.cloud.iot.v1.EventNotificationConfig} message EventNotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventNotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pubsubTopicName = ""; + object.subfolderMatches = ""; + } + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + object.pubsubTopicName = message.pubsubTopicName; + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + object.subfolderMatches = message.subfolderMatches; + return object; + }; + + /** + * Converts this EventNotificationConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @instance + * @returns {Object.} JSON object + */ + EventNotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventNotificationConfig; + })(); + + v1.StateNotificationConfig = (function() { + + /** + * Properties of a StateNotificationConfig. + * @memberof google.cloud.iot.v1 + * @interface IStateNotificationConfig + * @property {string|null} [pubsubTopicName] StateNotificationConfig pubsubTopicName + */ + + /** + * Constructs a new StateNotificationConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a StateNotificationConfig. + * @implements IStateNotificationConfig + * @constructor + * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set + */ + function StateNotificationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StateNotificationConfig pubsubTopicName. + * @member {string} pubsubTopicName + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @instance + */ + StateNotificationConfig.prototype.pubsubTopicName = ""; + + /** + * Creates a new StateNotificationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig instance + */ + StateNotificationConfig.create = function create(properties) { + return new StateNotificationConfig(properties); + }; + + /** + * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StateNotificationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); + return writer; + }; + + /** + * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StateNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StateNotificationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StateNotificationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.StateNotificationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubsubTopicName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StateNotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StateNotificationConfig message. + * @function verify + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StateNotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (!$util.isString(message.pubsubTopicName)) + return "pubsubTopicName: string expected"; + return null; + }; + + /** + * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + */ + StateNotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.StateNotificationConfig) + return object; + var message = new $root.google.cloud.iot.v1.StateNotificationConfig(); + if (object.pubsubTopicName != null) + message.pubsubTopicName = String(object.pubsubTopicName); + return message; + }; + + /** + * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {google.cloud.iot.v1.StateNotificationConfig} message StateNotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StateNotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pubsubTopicName = ""; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + object.pubsubTopicName = message.pubsubTopicName; + return object; + }; + + /** + * Converts this StateNotificationConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @instance + * @returns {Object.} JSON object + */ + StateNotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StateNotificationConfig; + })(); + + v1.RegistryCredential = (function() { + + /** + * Properties of a RegistryCredential. + * @memberof google.cloud.iot.v1 + * @interface IRegistryCredential + * @property {google.cloud.iot.v1.IPublicKeyCertificate|null} [publicKeyCertificate] RegistryCredential publicKeyCertificate + */ + + /** + * Constructs a new RegistryCredential. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a RegistryCredential. + * @implements IRegistryCredential + * @constructor + * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set + */ + function RegistryCredential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegistryCredential publicKeyCertificate. + * @member {google.cloud.iot.v1.IPublicKeyCertificate|null|undefined} publicKeyCertificate + * @memberof google.cloud.iot.v1.RegistryCredential + * @instance + */ + RegistryCredential.prototype.publicKeyCertificate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RegistryCredential credential. + * @member {"publicKeyCertificate"|undefined} credential + * @memberof google.cloud.iot.v1.RegistryCredential + * @instance + */ + Object.defineProperty(RegistryCredential.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["publicKeyCertificate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RegistryCredential instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential instance + */ + RegistryCredential.create = function create(properties) { + return new RegistryCredential(properties); + }; + + /** + * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegistryCredential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) + $root.google.cloud.iot.v1.PublicKeyCertificate.encode(message.publicKeyCertificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegistryCredential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegistryCredential message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegistryCredential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.RegistryCredential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegistryCredential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegistryCredential message. + * @function verify + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegistryCredential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { + properties.credential = 1; + { + var error = $root.google.cloud.iot.v1.PublicKeyCertificate.verify(message.publicKeyCertificate); + if (error) + return "publicKeyCertificate." + error; + } + } + return null; + }; + + /** + * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + */ + RegistryCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.RegistryCredential) + return object; + var message = new $root.google.cloud.iot.v1.RegistryCredential(); + if (object.publicKeyCertificate != null) { + if (typeof object.publicKeyCertificate !== "object") + throw TypeError(".google.cloud.iot.v1.RegistryCredential.publicKeyCertificate: object expected"); + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.fromObject(object.publicKeyCertificate); + } + return message; + }; + + /** + * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {google.cloud.iot.v1.RegistryCredential} message RegistryCredential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegistryCredential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { + object.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.toObject(message.publicKeyCertificate, options); + if (options.oneofs) + object.credential = "publicKeyCertificate"; + } + return object; + }; + + /** + * Converts this RegistryCredential to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.RegistryCredential + * @instance + * @returns {Object.} JSON object + */ + RegistryCredential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RegistryCredential; + })(); + + v1.X509CertificateDetails = (function() { + + /** + * Properties of a X509CertificateDetails. + * @memberof google.cloud.iot.v1 + * @interface IX509CertificateDetails + * @property {string|null} [issuer] X509CertificateDetails issuer + * @property {string|null} [subject] X509CertificateDetails subject + * @property {google.protobuf.ITimestamp|null} [startTime] X509CertificateDetails startTime + * @property {google.protobuf.ITimestamp|null} [expiryTime] X509CertificateDetails expiryTime + * @property {string|null} [signatureAlgorithm] X509CertificateDetails signatureAlgorithm + * @property {string|null} [publicKeyType] X509CertificateDetails publicKeyType + */ + + /** + * Constructs a new X509CertificateDetails. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a X509CertificateDetails. + * @implements IX509CertificateDetails + * @constructor + * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set + */ + function X509CertificateDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * X509CertificateDetails issuer. + * @member {string} issuer + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.issuer = ""; + + /** + * X509CertificateDetails subject. + * @member {string} subject + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.subject = ""; + + /** + * X509CertificateDetails startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.startTime = null; + + /** + * X509CertificateDetails expiryTime. + * @member {google.protobuf.ITimestamp|null|undefined} expiryTime + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.expiryTime = null; + + /** + * X509CertificateDetails signatureAlgorithm. + * @member {string} signatureAlgorithm + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.signatureAlgorithm = ""; + + /** + * X509CertificateDetails publicKeyType. + * @member {string} publicKeyType + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.publicKeyType = ""; + + /** + * Creates a new X509CertificateDetails instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails instance + */ + X509CertificateDetails.create = function create(properties) { + return new X509CertificateDetails(properties); + }; + + /** + * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509CertificateDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issuer != null && message.hasOwnProperty("issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.subject != null && message.hasOwnProperty("subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + $root.google.protobuf.Timestamp.encode(message.expiryTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signatureAlgorithm); + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.publicKeyType); + return writer; + }; + + /** + * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509CertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a X509CertificateDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509CertificateDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.X509CertificateDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.issuer = reader.string(); + break; + case 2: + message.subject = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.signatureAlgorithm = reader.string(); + break; + case 6: + message.publicKeyType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509CertificateDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a X509CertificateDetails message. + * @function verify + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + X509CertificateDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expiryTime); + if (error) + return "expiryTime." + error; + } + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + if (!$util.isString(message.signatureAlgorithm)) + return "signatureAlgorithm: string expected"; + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + if (!$util.isString(message.publicKeyType)) + return "publicKeyType: string expected"; + return null; + }; + + /** + * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + */ + X509CertificateDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.X509CertificateDetails) + return object; + var message = new $root.google.cloud.iot.v1.X509CertificateDetails(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.subject != null) + message.subject = String(object.subject); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Timestamp.fromObject(object.expiryTime); + } + if (object.signatureAlgorithm != null) + message.signatureAlgorithm = String(object.signatureAlgorithm); + if (object.publicKeyType != null) + message.publicKeyType = String(object.publicKeyType); + return message; + }; + + /** + * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {google.cloud.iot.v1.X509CertificateDetails} message X509CertificateDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + X509CertificateDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issuer = ""; + object.subject = ""; + object.startTime = null; + object.expiryTime = null; + object.signatureAlgorithm = ""; + object.publicKeyType = ""; + } + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + object.expiryTime = $root.google.protobuf.Timestamp.toObject(message.expiryTime, options); + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + object.signatureAlgorithm = message.signatureAlgorithm; + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + object.publicKeyType = message.publicKeyType; + return object; + }; + + /** + * Converts this X509CertificateDetails to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + * @returns {Object.} JSON object + */ + X509CertificateDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return X509CertificateDetails; + })(); + + v1.PublicKeyCertificate = (function() { + + /** + * Properties of a PublicKeyCertificate. + * @memberof google.cloud.iot.v1 + * @interface IPublicKeyCertificate + * @property {google.cloud.iot.v1.PublicKeyCertificateFormat|null} [format] PublicKeyCertificate format + * @property {string|null} [certificate] PublicKeyCertificate certificate + * @property {google.cloud.iot.v1.IX509CertificateDetails|null} [x509Details] PublicKeyCertificate x509Details + */ + + /** + * Constructs a new PublicKeyCertificate. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a PublicKeyCertificate. + * @implements IPublicKeyCertificate + * @constructor + * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set + */ + function PublicKeyCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKeyCertificate format. + * @member {google.cloud.iot.v1.PublicKeyCertificateFormat} format + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.format = 0; + + /** + * PublicKeyCertificate certificate. + * @member {string} certificate + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.certificate = ""; + + /** + * PublicKeyCertificate x509Details. + * @member {google.cloud.iot.v1.IX509CertificateDetails|null|undefined} x509Details + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.x509Details = null; + + /** + * Creates a new PublicKeyCertificate instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate instance + */ + PublicKeyCertificate.create = function create(properties) { + return new PublicKeyCertificate(properties); + }; + + /** + * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKeyCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.certificate != null && message.hasOwnProperty("certificate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificate); + if (message.x509Details != null && message.hasOwnProperty("x509Details")) + $root.google.cloud.iot.v1.X509CertificateDetails.encode(message.x509Details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKeyCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKeyCertificate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKeyCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.format = reader.int32(); + break; + case 2: + message.certificate = reader.string(); + break; + case 3: + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKeyCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKeyCertificate message. + * @function verify + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKeyCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + break; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + if (!$util.isString(message.certificate)) + return "certificate: string expected"; + if (message.x509Details != null && message.hasOwnProperty("x509Details")) { + var error = $root.google.cloud.iot.v1.X509CertificateDetails.verify(message.x509Details); + if (error) + return "x509Details." + error; + } + return null; + }; + + /** + * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + */ + PublicKeyCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.PublicKeyCertificate) + return object; + var message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); + switch (object.format) { + case "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": + case 0: + message.format = 0; + break; + case "X509_CERTIFICATE_PEM": + case 1: + message.format = 1; + break; + } + if (object.certificate != null) + message.certificate = String(object.certificate); + if (object.x509Details != null) { + if (typeof object.x509Details !== "object") + throw TypeError(".google.cloud.iot.v1.PublicKeyCertificate.x509Details: object expected"); + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.fromObject(object.x509Details); + } + return message; + }; + + /** + * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {google.cloud.iot.v1.PublicKeyCertificate} message PublicKeyCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKeyCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT" : 0; + object.certificate = ""; + object.x509Details = null; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = message.certificate; + if (message.x509Details != null && message.hasOwnProperty("x509Details")) + object.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.toObject(message.x509Details, options); + return object; + }; + + /** + * Converts this PublicKeyCertificate to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + * @returns {Object.} JSON object + */ + PublicKeyCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKeyCertificate; + })(); + + v1.DeviceCredential = (function() { + + /** + * Properties of a DeviceCredential. + * @memberof google.cloud.iot.v1 + * @interface IDeviceCredential + * @property {google.cloud.iot.v1.IPublicKeyCredential|null} [publicKey] DeviceCredential publicKey + * @property {google.protobuf.ITimestamp|null} [expirationTime] DeviceCredential expirationTime + */ + + /** + * Constructs a new DeviceCredential. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceCredential. + * @implements IDeviceCredential + * @constructor + * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set + */ + function DeviceCredential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeviceCredential publicKey. + * @member {google.cloud.iot.v1.IPublicKeyCredential|null|undefined} publicKey + * @memberof google.cloud.iot.v1.DeviceCredential + * @instance + */ + DeviceCredential.prototype.publicKey = null; + + /** + * DeviceCredential expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.cloud.iot.v1.DeviceCredential + * @instance + */ + DeviceCredential.prototype.expirationTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeviceCredential credential. + * @member {"publicKey"|undefined} credential + * @memberof google.cloud.iot.v1.DeviceCredential + * @instance + */ + Object.defineProperty(DeviceCredential.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeviceCredential instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential instance + */ + DeviceCredential.create = function create(properties) { + return new DeviceCredential(properties); + }; + + /** + * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCredential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + $root.google.cloud.iot.v1.PublicKeyCredential.encode(message.publicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCredential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceCredential message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCredential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceCredential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); + break; + case 6: + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCredential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceCredential message. + * @function verify + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceCredential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties.credential = 1; + { + var error = $root.google.cloud.iot.v1.PublicKeyCredential.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + if (error) + return "expirationTime." + error; + } + return null; + }; + + /** + * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + */ + DeviceCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceCredential) + return object; + var message = new $root.google.cloud.iot.v1.DeviceCredential(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceCredential.publicKey: object expected"); + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.fromObject(object.publicKey); + } + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceCredential.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + } + return message; + }; + + /** + * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {google.cloud.iot.v1.DeviceCredential} message DeviceCredential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceCredential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expirationTime = null; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + object.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.toObject(message.publicKey, options); + if (options.oneofs) + object.credential = "publicKey"; + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + return object; + }; + + /** + * Converts this DeviceCredential to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeviceCredential + * @instance + * @returns {Object.} JSON object + */ + DeviceCredential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeviceCredential; + })(); + + v1.PublicKeyCredential = (function() { + + /** + * Properties of a PublicKeyCredential. + * @memberof google.cloud.iot.v1 + * @interface IPublicKeyCredential + * @property {google.cloud.iot.v1.PublicKeyFormat|null} [format] PublicKeyCredential format + * @property {string|null} [key] PublicKeyCredential key + */ + + /** + * Constructs a new PublicKeyCredential. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a PublicKeyCredential. + * @implements IPublicKeyCredential + * @constructor + * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set + */ + function PublicKeyCredential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKeyCredential format. + * @member {google.cloud.iot.v1.PublicKeyFormat} format + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @instance + */ + PublicKeyCredential.prototype.format = 0; + + /** + * PublicKeyCredential key. + * @member {string} key + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @instance + */ + PublicKeyCredential.prototype.key = ""; + + /** + * Creates a new PublicKeyCredential instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential instance + */ + PublicKeyCredential.create = function create(properties) { + return new PublicKeyCredential(properties); + }; + + /** + * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKeyCredential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + return writer; + }; + + /** + * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKeyCredential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKeyCredential message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKeyCredential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCredential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.format = reader.int32(); + break; + case 2: + message.key = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKeyCredential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKeyCredential message. + * @function verify + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKeyCredential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 3: + case 1: + case 2: + case 4: + break; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + */ + PublicKeyCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.PublicKeyCredential) + return object; + var message = new $root.google.cloud.iot.v1.PublicKeyCredential(); + switch (object.format) { + case "UNSPECIFIED_PUBLIC_KEY_FORMAT": + case 0: + message.format = 0; + break; + case "RSA_PEM": + case 3: + message.format = 3; + break; + case "RSA_X509_PEM": + case 1: + message.format = 1; + break; + case "ES256_PEM": + case 2: + message.format = 2; + break; + case "ES256_X509_PEM": + case 4: + message.format = 4; + break; + } + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {google.cloud.iot.v1.PublicKeyCredential} message PublicKeyCredential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKeyCredential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_FORMAT" : 0; + object.key = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this PublicKeyCredential to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @instance + * @returns {Object.} JSON object + */ + PublicKeyCredential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKeyCredential; + })(); + + v1.DeviceConfig = (function() { + + /** + * Properties of a DeviceConfig. + * @memberof google.cloud.iot.v1 + * @interface IDeviceConfig + * @property {number|Long|null} [version] DeviceConfig version + * @property {google.protobuf.ITimestamp|null} [cloudUpdateTime] DeviceConfig cloudUpdateTime + * @property {google.protobuf.ITimestamp|null} [deviceAckTime] DeviceConfig deviceAckTime + * @property {Uint8Array|null} [binaryData] DeviceConfig binaryData + */ + + /** + * Constructs a new DeviceConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceConfig. + * @implements IDeviceConfig + * @constructor + * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set + */ + function DeviceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeviceConfig version. + * @member {number|Long} version + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DeviceConfig cloudUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} cloudUpdateTime + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.cloudUpdateTime = null; + + /** + * DeviceConfig deviceAckTime. + * @member {google.protobuf.ITimestamp|null|undefined} deviceAckTime + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.deviceAckTime = null; + + /** + * DeviceConfig binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new DeviceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig instance + */ + DeviceConfig.create = function create(properties) { + return new DeviceConfig(properties); + }; + + /** + * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.cloudUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + $root.google.protobuf.Timestamp.encode(message.deviceAckTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.binaryData); + return writer; + }; + + /** + * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.int64(); + break; + case 2: + message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.binaryData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceConfig message. + * @function verify + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.cloudUpdateTime); + if (error) + return "cloudUpdateTime." + error; + } + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deviceAckTime); + if (error) + return "deviceAckTime." + error; + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + return null; + }; + + /** + * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + */ + DeviceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceConfig) + return object; + var message = new $root.google.cloud.iot.v1.DeviceConfig(); + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = false; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + if (object.cloudUpdateTime != null) { + if (typeof object.cloudUpdateTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceConfig.cloudUpdateTime: object expected"); + message.cloudUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.cloudUpdateTime); + } + if (object.deviceAckTime != null) { + if (typeof object.deviceAckTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceConfig.deviceAckTime: object expected"); + message.deviceAckTime = $root.google.protobuf.Timestamp.fromObject(object.deviceAckTime); + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + return message; + }; + + /** + * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {google.cloud.iot.v1.DeviceConfig} message DeviceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceConfig.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.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + object.cloudUpdateTime = null; + object.deviceAckTime = null; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + object.cloudUpdateTime = $root.google.protobuf.Timestamp.toObject(message.cloudUpdateTime, options); + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + object.deviceAckTime = $root.google.protobuf.Timestamp.toObject(message.deviceAckTime, options); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + return object; + }; + + /** + * Converts this DeviceConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + * @returns {Object.} JSON object + */ + DeviceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeviceConfig; + })(); + + v1.DeviceState = (function() { + + /** + * Properties of a DeviceState. + * @memberof google.cloud.iot.v1 + * @interface IDeviceState + * @property {google.protobuf.ITimestamp|null} [updateTime] DeviceState updateTime + * @property {Uint8Array|null} [binaryData] DeviceState binaryData + */ + + /** + * Constructs a new DeviceState. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceState. + * @implements IDeviceState + * @constructor + * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set + */ + function DeviceState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeviceState updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.iot.v1.DeviceState + * @instance + */ + DeviceState.prototype.updateTime = null; + + /** + * DeviceState binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.DeviceState + * @instance + */ + DeviceState.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new DeviceState instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceState} DeviceState instance + */ + DeviceState.create = function create(properties) { + return new DeviceState(properties); + }; + + /** + * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); + return writer; + }; + + /** + * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceState message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.binaryData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceState message. + * @function verify + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + return null; + }; + + /** + * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeviceState} DeviceState + */ + DeviceState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceState) + return object; + var message = new $root.google.cloud.iot.v1.DeviceState(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceState.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + return message; + }; + + /** + * Creates a plain object from a DeviceState message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {google.cloud.iot.v1.DeviceState} message DeviceState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + return object; + }; + + /** + * Converts this DeviceState to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeviceState + * @instance + * @returns {Object.} JSON object + */ + DeviceState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeviceState; + })(); + + /** + * MqttState enum. + * @name google.cloud.iot.v1.MqttState + * @enum {string} + * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value + * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value + * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value + */ + v1.MqttState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MQTT_ENABLED"] = 1; + values[valuesById[2] = "MQTT_DISABLED"] = 2; + return values; + })(); + + /** + * HttpState enum. + * @name google.cloud.iot.v1.HttpState + * @enum {string} + * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value + * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value + * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value + */ + v1.HttpState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTP_ENABLED"] = 1; + values[valuesById[2] = "HTTP_DISABLED"] = 2; + return values; + })(); + + /** + * LogLevel enum. + * @name google.cloud.iot.v1.LogLevel + * @enum {string} + * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value + * @property {number} NONE=10 NONE value + * @property {number} ERROR=20 ERROR value + * @property {number} INFO=30 INFO value + * @property {number} DEBUG=40 DEBUG value + */ + v1.LogLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[10] = "NONE"] = 10; + values[valuesById[20] = "ERROR"] = 20; + values[valuesById[30] = "INFO"] = 30; + values[valuesById[40] = "DEBUG"] = 40; + return values; + })(); + + /** + * GatewayType enum. + * @name google.cloud.iot.v1.GatewayType + * @enum {string} + * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value + * @property {number} GATEWAY=1 GATEWAY value + * @property {number} NON_GATEWAY=2 NON_GATEWAY value + */ + v1.GatewayType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GATEWAY"] = 1; + values[valuesById[2] = "NON_GATEWAY"] = 2; + return values; + })(); + + /** + * GatewayAuthMethod enum. + * @name google.cloud.iot.v1.GatewayAuthMethod + * @enum {string} + * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value + * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value + * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value + * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value + */ + v1.GatewayAuthMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; + values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; + values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; + return values; + })(); + + /** + * PublicKeyCertificateFormat enum. + * @name google.cloud.iot.v1.PublicKeyCertificateFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value + * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value + */ + v1.PublicKeyCertificateFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; + values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; + return values; + })(); + + /** + * PublicKeyFormat enum. + * @name google.cloud.iot.v1.PublicKeyFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value + * @property {number} RSA_PEM=3 RSA_PEM value + * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value + * @property {number} ES256_PEM=2 ES256_PEM value + * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value + */ + v1.PublicKeyFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; + values[valuesById[3] = "RSA_PEM"] = 3; + values[valuesById[1] = "RSA_X509_PEM"] = 1; + values[valuesById[2] = "ES256_PEM"] = 2; + values[valuesById[4] = "ES256_X509_PEM"] = 4; + return values; + })(); + + return v1; + })(); + + return iot; + })(); + + return cloud; + })(); + + 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; + })(); + + 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.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.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.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + 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; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && message.hasOwnProperty("resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && message.hasOwnProperty("policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resource = reader.string(); + break; + case 2: + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; + + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && message.hasOwnProperty("resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resource = reader.string(); + break; + case 2: + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetIamPolicyRequest; + })(); + + v1.TestIamPermissionsRequest = (function() { + + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ + + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; + + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); + }; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && message.hasOwnProperty("resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resource = reader.string(); + break; + case 2: + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestIamPermissionsRequest; + })(); + + v1.TestIamPermissionsResponse = (function() { + + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ + + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestIamPermissionsResponse; + })(); + + v1.GetPolicyOptions = (function() { + + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ + + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.requestedPolicyVersion = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; + return object; + }; + + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPolicyOptions; + })(); + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.int32(); + break; + case 4: + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + case 3: + message.etag = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bindings = []; + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(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]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && message.hasOwnProperty("role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && message.hasOwnProperty("condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.role = reader.string(); + break; + case 2: + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + case 3: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string 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) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Binding; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && message.hasOwnProperty("action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && message.hasOwnProperty("role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && message.hasOwnProperty("member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && message.hasOwnProperty("condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.action = reader.int32(); + break; + case 2: + message.role = reader.string(); + break; + case 3: + message.member = reader.string(); + break; + case 4: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {string} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && message.hasOwnProperty("action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && message.hasOwnProperty("service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && message.hasOwnProperty("logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.action = reader.int32(); + break; + case 2: + message.service = reader.string(); + break; + case 3: + message.exemptedMember = reader.string(); + break; + case 4: + message.logType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {string} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && message.hasOwnProperty("expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && message.hasOwnProperty("title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && message.hasOwnProperty("location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.expression = reader.string(); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.location = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Expr; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index dd2654a99ba..57db8df60b1 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -33,7 +33,7 @@ * { * "bindings": [ * { - * "role": "role/resourcemanager.organizationAdmin", + * "role": "roles/resourcemanager.organizationAdmin", * "members": [ * "user:mike@example.com", * "group:admins@example.com", diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index ee4a2218217..a0e2e1a989e 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-09-20T11:15:26.311706Z", + "updateTime": "2019-09-27T11:17:36.293156Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.3", - "dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4" + "version": "0.37.1", + "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "44e588d97e7497dff01107d39b6a19062f9a4ffa", - "internalRef": "270200097" + "sha": "cd112d8d255e0099df053643d4bd12c228ef7b1b", + "internalRef": "271468707" } }, { From bd923657f69271a0646b5c96e1f02362df2e562b Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 1 Oct 2019 20:15:00 -0700 Subject: [PATCH 134/370] fix: use compatible version of google-gax * fix: use compatible version of google-gax * fix: use gax v1.6.3 --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index d1dc017729f..771223752f6 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -37,7 +37,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.0.0" + "google-gax": "^1.6.3" }, "devDependencies": { "codecov": "^3.0.2", From 24bfd6f496d2c1b73a35f432b799d4901bcc87fa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 7 Oct 2019 17:03:32 -0700 Subject: [PATCH 135/370] chore: update pull request template --- packages/google-cloud-iot/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a0e2e1a989e..fcfeeef3b9b 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-27T11:17:36.293156Z", + "updateTime": "2019-10-01T11:20:14.378224Z", "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 7a0d9d651a7452af28a8ff5796c635c65229a843 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 8 Oct 2019 17:24:16 -0700 Subject: [PATCH 136/370] chore: update CONTRIBUTING.md and make releaseType node (#214) --- packages/google-cloud-iot/CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/google-cloud-iot/CONTRIBUTING.md b/packages/google-cloud-iot/CONTRIBUTING.md index 78aaa61b269..f6c4cf010e3 100644 --- a/packages/google-cloud-iot/CONTRIBUTING.md +++ b/packages/google-cloud-iot/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 f0690e53445c4602390724b372dcc64439bfa454 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 15 Oct 2019 10:42:41 -0700 Subject: [PATCH 137/370] fix: changes to retry logic --- .../google/cloud/iot/v1/device_manager.proto | 265 ++-- .../google/cloud/iot/v1/resources.proto | 266 ++-- packages/google-cloud-iot/protos/protos.d.ts | 435 ++++-- packages/google-cloud-iot/protos/protos.js | 1199 +++++++++++------ packages/google-cloud-iot/protos/protos.json | 401 ++++-- .../src/v1/device_manager_client.js | 179 ++- .../src/v1/device_manager_client_config.json | 30 +- .../google/cloud/iot/v1/doc_device_manager.js | 52 +- packages/google-cloud-iot/synth.metadata | 10 +- packages/google-cloud-iot/test/gapic-v1.js | 76 +- 10 files changed, 1867 insertions(+), 1046 deletions(-) diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto index 27ec0f0301d..7f0132d851c 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.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. @@ -18,13 +18,14 @@ syntax = "proto3"; package google.cloud.iot.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/iot/v1/resources.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; @@ -35,13 +36,18 @@ option java_package = "com.google.cloud.iot.v1"; // Internet of Things (IoT) service. Securely connect and manage IoT devices. service DeviceManager { + option (google.api.default_host) = "cloudiot.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloudiot"; + // Creates a device registry that contains devices. - rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) - returns (DeviceRegistry) { + rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/registries" body: "device_registry" }; + option (google.api.method_signature) = "parent,device_registry"; } // Gets a device registry configuration. @@ -49,31 +55,32 @@ service DeviceManager { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/registries/*}" }; + option (google.api.method_signature) = "name"; } // Updates a device registry configuration. - rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) - returns (DeviceRegistry) { + rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) returns (DeviceRegistry) { option (google.api.http) = { patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}" body: "device_registry" }; + option (google.api.method_signature) = "device_registry,update_mask"; } // Deletes a device registry configuration. - rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) - returns (google.protobuf.Empty) { + rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/registries/*}" }; + option (google.api.method_signature) = "name"; } // Lists device registries. - rpc ListDeviceRegistries(ListDeviceRegistriesRequest) - returns (ListDeviceRegistriesResponse) { + rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/registries" }; + option (google.api.method_signature) = "parent"; } // Creates a device in a device registry. @@ -82,6 +89,7 @@ service DeviceManager { post: "/v1/{parent=projects/*/locations/*/registries/*}/devices" body: "device" }; + option (google.api.method_signature) = "parent,device"; } // Gets details about a device. @@ -92,6 +100,7 @@ service DeviceManager { get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" } }; + option (google.api.method_signature) = "name"; } // Updates a device. @@ -104,6 +113,7 @@ service DeviceManager { body: "device" } }; + option (google.api.method_signature) = "device,update_mask"; } // Deletes a device. @@ -111,6 +121,7 @@ service DeviceManager { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}" }; + option (google.api.method_signature) = "name"; } // List devices in a device registry. @@ -121,13 +132,13 @@ service DeviceManager { get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" } }; + option (google.api.method_signature) = "parent"; } // Modifies the configuration for the device, which is eventually sent from // the Cloud IoT Core servers. Returns the modified configuration version and // its metadata. - rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) - returns (DeviceConfig) { + rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) returns (DeviceConfig) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig" body: "*" @@ -136,36 +147,36 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "name,binary_data"; } // Lists the last few versions of the device configuration in descending // order (i.e.: newest first). - rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) - returns (ListDeviceConfigVersionsResponse) { + rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) returns (ListDeviceConfigVersionsResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions" additional_bindings { get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions" } }; + option (google.api.method_signature) = "name"; } // Lists the last few versions of the device state in descending order (i.e.: // newest first). - rpc ListDeviceStates(ListDeviceStatesRequest) - returns (ListDeviceStatesResponse) { + rpc ListDeviceStates(ListDeviceStatesRequest) returns (ListDeviceStatesResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states" additional_bindings { get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states" } }; + option (google.api.method_signature) = "name"; } // Sets the access control policy on the specified resource. Replaces any // existing policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy" body: "*" @@ -174,13 +185,13 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "resource,policy"; } // Gets the access control policy for a resource. // Returns an empty policy if the resource exists and does not have a policy // set. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy" body: "*" @@ -189,13 +200,13 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "resource"; } // Returns permissions that a caller has on the specified resource. // If the resource does not exist, this will return an empty set of // permissions, not a NOT_FOUND error. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions" body: "*" @@ -204,6 +215,7 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "resource,permissions"; } // Sends a command to the specified device. In order for a device to be able @@ -219,8 +231,7 @@ service DeviceManager { // method will return FAILED_PRECONDITION. Otherwise, this method will // return OK. If the subscription is QoS 1, at least once delivery will be // guaranteed; for QoS 0, no acknowledgment will be expected from the device. - rpc SendCommandToDevice(SendCommandToDeviceRequest) - returns (SendCommandToDeviceResponse) { + rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice" body: "*" @@ -229,11 +240,12 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "name,binary_data"; + option (google.api.method_signature) = "name,binary_data,subfolder"; } // Associates the device with the gateway. - rpc BindDeviceToGateway(BindDeviceToGatewayRequest) - returns (BindDeviceToGatewayResponse) { + rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway" body: "*" @@ -242,11 +254,11 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "parent,gateway_id,device_id"; } // Deletes the association between the device and the gateway. - rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) - returns (UnbindDeviceFromGatewayResponse) { + rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway" body: "*" @@ -255,55 +267,76 @@ service DeviceManager { body: "*" } }; + option (google.api.method_signature) = "parent,gateway_id,device_id"; } } // Request for `CreateDeviceRegistry`. message CreateDeviceRegistryRequest { - // The project and cloud region where this device registry must be created. + // Required. The project and cloud region where this device registry must be created. // For example, `projects/example-project/locations/us-central1`. - string parent = 1; - - // The device registry. The field `name` must be empty. The server will + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The device registry. The field `name` must be empty. The server will // generate that field from the device registry `id` provided and the // `parent` field. - DeviceRegistry device_registry = 2; + DeviceRegistry device_registry = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for `GetDeviceRegistry`. message GetDeviceRegistryRequest { - // The name of the device registry. For example, + // Required. The name of the device registry. For example, // `projects/example-project/locations/us-central1/registries/my-registry`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + } + ]; } // Request for `DeleteDeviceRegistry`. message DeleteDeviceRegistryRequest { - // The name of the device registry. For example, + // Required. The name of the device registry. For example, // `projects/example-project/locations/us-central1/registries/my-registry`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + } + ]; } // Request for `UpdateDeviceRegistry`. message UpdateDeviceRegistryRequest { - // The new values for the device registry. The `id` field must be empty, and + // Required. The new values for the device registry. The `id` field must be empty, and // the `name` field must indicate the path of the resource. For example, // `projects/example-project/locations/us-central1/registries/my-registry`. - DeviceRegistry device_registry = 1; + DeviceRegistry device_registry = 1 [(google.api.field_behavior) = REQUIRED]; - // Only updates the `device_registry` fields indicated by this mask. + // Required. Only updates the `device_registry` fields indicated by this mask. // The field mask must not be empty, and it must not contain fields that // are immutable or only set by the server. // Mutable top-level fields: `event_notification_config`, `http_config`, // `mqtt_config`, and `state_notification_config`. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for `ListDeviceRegistries`. message ListDeviceRegistriesRequest { - // The project and cloud region path. For example, + // Required. The project and cloud region path. For example, // `projects/example-project/locations/us-central1`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of registries to return in the response. If this value // is zero, the service will select a default size. A call may return fewer @@ -330,23 +363,33 @@ message ListDeviceRegistriesResponse { // Request for `CreateDevice`. message CreateDeviceRequest { - // The name of the device registry where this device should be created. + // Required. The name of the device registry where this device should be created. // For example, // `projects/example-project/locations/us-central1/registries/my-registry`. - string parent = 1; - - // The device registration details. The field `name` must be empty. The server + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + } + ]; + + // Required. The device registration details. The field `name` must be empty. The server // generates `name` from the device registry `id` and the // `parent` field. - Device device = 2; + Device device = 2 [(google.api.field_behavior) = REQUIRED]; } // Request for `GetDevice`. message GetDeviceRequest { - // The name of the device. For example, + // Required. The name of the device. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/Device" + } + ]; // The fields of the `Device` resource to be returned in the response. If the // field mask is unset or empty, all fields are returned. @@ -355,32 +398,42 @@ message GetDeviceRequest { // Request for `UpdateDevice`. message UpdateDeviceRequest { - // The new values for the device. The `id` and `num_id` fields must + // Required. The new values for the device. The `id` and `num_id` fields must // be empty, and the field `name` must specify the name path. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0`or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - Device device = 2; + Device device = 2 [(google.api.field_behavior) = REQUIRED]; - // Only updates the `device` fields indicated by this mask. + // Required. Only updates the `device` fields indicated by this mask. // The field mask must not be empty, and it must not contain fields that // are immutable or only set by the server. // Mutable top-level fields: `credentials`, `blocked`, and `metadata` - google.protobuf.FieldMask update_mask = 3; + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for `DeleteDevice`. message DeleteDeviceRequest { - // The name of the device. For example, + // Required. The name of the device. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/Device" + } + ]; } // Request for `ListDevices`. message ListDevicesRequest { - // The device registry path. Required. For example, + // Required. The device registry path. Required. For example, // `projects/my-project/locations/us-central1/registries/my-registry`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + } + ]; // A list of device numeric IDs. If empty, this field is ignored. Maximum // IDs: 10,000. @@ -446,10 +499,15 @@ message ListDevicesResponse { // Request for `ModifyCloudToDeviceConfig`. message ModifyCloudToDeviceConfigRequest { - // The name of the device. For example, + // Required. The name of the device. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/Device" + } + ]; // The version number to update. If this value is zero, it will not check the // version number of the server and will always update the current version; @@ -458,16 +516,21 @@ message ModifyCloudToDeviceConfigRequest { // simultaneous updates without losing data. int64 version_to_update = 2; - // The configuration data for the device. - bytes binary_data = 3; + // Required. The configuration data for the device. + bytes binary_data = 3 [(google.api.field_behavior) = REQUIRED]; } // Request for `ListDeviceConfigVersions`. message ListDeviceConfigVersionsRequest { - // The name of the device. For example, + // Required. The name of the device. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/Device" + } + ]; // The number of versions to list. Versions are listed in decreasing order of // the version number. The maximum number of versions retained is 10. If this @@ -484,10 +547,15 @@ message ListDeviceConfigVersionsResponse { // Request for `ListDeviceStates`. message ListDeviceStatesRequest { - // The name of the device. For example, + // Required. The name of the device. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/Device" + } + ]; // The number of states to list. States are listed in descending order of // update time. The maximum number of states retained is 10. If this @@ -504,13 +572,18 @@ message ListDeviceStatesResponse { // Request for `SendCommandToDevice`. message SendCommandToDeviceRequest { - // The name of the device. For example, + // Required. The name of the device. For example, // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/Device" + } + ]; - // The command data to send to the device. - bytes binary_data = 2; + // Required. The command data to send to the device. + bytes binary_data = 2 [(google.api.field_behavior) = REQUIRED]; // Optional subfolder for the command. If empty, the command will be delivered // to the /devices/{device-id}/commands topic, otherwise it will be delivered @@ -521,42 +594,58 @@ message SendCommandToDeviceRequest { } // Response for `SendCommandToDevice`. -message SendCommandToDeviceResponse {} +message SendCommandToDeviceResponse { + +} // Request for `BindDeviceToGateway`. message BindDeviceToGatewayRequest { - // The name of the registry. For example, + // Required. The name of the registry. For example, // `projects/example-project/locations/us-central1/registries/my-registry`. - string parent = 1; - - // The value of `gateway_id` can be either the device numeric ID or the + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + } + ]; + + // Required. The value of `gateway_id` can be either the device numeric ID or the // user-defined device identifier. - string gateway_id = 2; + string gateway_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The device to associate with the specified gateway. The value of + // Required. The device to associate with the specified gateway. The value of // `device_id` can be either the device numeric ID or the user-defined device // identifier. - string device_id = 3; + string device_id = 3 [(google.api.field_behavior) = REQUIRED]; } // Response for `BindDeviceToGateway`. -message BindDeviceToGatewayResponse {} +message BindDeviceToGatewayResponse { + +} // Request for `UnbindDeviceFromGateway`. message UnbindDeviceFromGatewayRequest { - // The name of the registry. For example, + // Required. The name of the registry. For example, // `projects/example-project/locations/us-central1/registries/my-registry`. - string parent = 1; - - // The value of `gateway_id` can be either the device numeric ID or the + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + } + ]; + + // Required. The value of `gateway_id` can be either the device numeric ID or the // user-defined device identifier. - string gateway_id = 2; + string gateway_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The device to disassociate from the specified gateway. The value of + // Required. The device to disassociate from the specified gateway. The value of // `device_id` can be either the device numeric ID or the user-defined device // identifier. - string device_id = 3; + string device_id = 3 [(google.api.field_behavior) = REQUIRED]; } // Response for `UnbindDeviceFromGateway`. -message UnbindDeviceFromGatewayResponse {} +message UnbindDeviceFromGatewayResponse { + +} diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto index 2a91e989e98..92d668a92f3 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.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.cloud.iot.v1; -import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -29,6 +29,11 @@ option java_package = "com.google.cloud.iot.v1"; // The device resource. message Device { + option (google.api.resource) = { + type: "cloudiot.googleapis.com/Device" + pattern: "projects/{project}/locations/{location}/registries/{registry}/devices/{device}" + }; + // The user-defined device identifier. The device ID must be unique // within a device registry. string id = 1; @@ -149,6 +154,11 @@ message GatewayConfig { // A container for a group of devices. message DeviceRegistry { + option (google.api.resource) = { + type: "cloudiot.googleapis.com/DeviceRegistry" + pattern: "projects/{project}/locations/{location}/registries/{registry}" + }; + // The identifier of this device registry. For example, `myRegistry`. string id = 1; @@ -208,6 +218,19 @@ message MqttConfig { MqttState mqtt_enabled_state = 1; } +// Indicates whether an MQTT connection is enabled or disabled. See the field +// description for details. +enum MqttState { + // No MQTT state specified. If not specified, MQTT will be enabled by default. + MQTT_STATE_UNSPECIFIED = 0; + + // Enables a MQTT connection. + MQTT_ENABLED = 1; + + // Disables a MQTT connection. + MQTT_DISABLED = 2; +} + // The configuration of the HTTP bridge for a device registry. message HttpConfig { // If enabled, allows devices to use DeviceService via the HTTP protocol. @@ -215,6 +238,77 @@ message HttpConfig { HttpState http_enabled_state = 1; } +// Indicates whether DeviceService (HTTP) is enabled or disabled for the +// registry. See the field description for details. +enum HttpState { + // No HTTP state specified. If not specified, DeviceService will be + // enabled by default. + HTTP_STATE_UNSPECIFIED = 0; + + // Enables DeviceService (HTTP) service for the registry. + HTTP_ENABLED = 1; + + // Disables DeviceService (HTTP) service for the registry. + HTTP_DISABLED = 2; +} + +// **Beta Feature** +// +// The logging verbosity for device activity. Specifies which events should be +// written to logs. For example, if the LogLevel is ERROR, only events that +// terminate in errors will be logged. LogLevel is inclusive; enabling INFO +// logging will also enable ERROR logging. +enum LogLevel { + // No logging specified. If not specified, logging will be disabled. + LOG_LEVEL_UNSPECIFIED = 0; + + // Disables logging. + NONE = 10; + + // Error events will be logged. + ERROR = 20; + + // Informational events will be logged, such as connections and + // disconnections. + INFO = 30; + + // All events will be logged. + DEBUG = 40; +} + +// Gateway type. +enum GatewayType { + // If unspecified, the device is considered a non-gateway device. + GATEWAY_TYPE_UNSPECIFIED = 0; + + // The device is a gateway. + GATEWAY = 1; + + // The device is not a gateway. + NON_GATEWAY = 2; +} + +// The gateway authorization/authentication method. This setting determines how +// Cloud IoT Core authorizes/authenticate devices to access the gateway. +enum GatewayAuthMethod { + // No authentication/authorization method specified. No devices are allowed to + // access the gateway. + GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; + + // The device is authenticated through the gateway association only. Device + // credentials are ignored even if provided. + ASSOCIATION_ONLY = 1; + + // The device is authenticated through its own credentials. Gateway + // association is not checked. + DEVICE_AUTH_TOKEN_ONLY = 2; + + // The device is authenticated through both device credentials and gateway + // association. The device must be bound to the gateway and must provide its + // own credentials. + ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; +} + // The configuration for forwarding telemetry events. message EventNotificationConfig { // If the subfolder name matches this string exactly, this configuration will @@ -277,6 +371,18 @@ message PublicKeyCertificate { X509CertificateDetails x509_details = 3; } +// The supported formats for the public key. +enum PublicKeyCertificateFormat { + // The format has not been specified. This is an invalid default value and + // must not be used. + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; + + // An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), + // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and + // `-----END CERTIFICATE-----`. + X509_CERTIFICATE_PEM = 1; +} + // A server-stored device credential used for authentication. message DeviceCredential { // The credential data. Reserved for expansion in the future. @@ -310,6 +416,36 @@ message PublicKeyCredential { string key = 2; } +// The supported formats for the public key. +enum PublicKeyFormat { + // The format has not been specified. This is an invalid default value and + // must not be used. + UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; + + // An RSA public key encoded in base64, and wrapped by + // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be + // used to verify `RS256` signatures in JWT tokens ([RFC7518]( + // https://www.ietf.org/rfc/rfc7518.txt)). + RSA_PEM = 3; + + // As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( + // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + RSA_X509_PEM = 1; + + // Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in + // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END + // PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` + // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is + // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. + ES256_PEM = 2; + + // As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( + // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + ES256_X509_PEM = 4; +} + // The device configuration. Eventually delivered to devices. message DeviceConfig { // [Output only] The version of this update. The version number is assigned by @@ -346,129 +482,3 @@ message DeviceState { // The device state data. bytes binary_data = 2; } - -// Indicates whether an MQTT connection is enabled or disabled. See the field -// description for details. -enum MqttState { - // No MQTT state specified. If not specified, MQTT will be enabled by default. - MQTT_STATE_UNSPECIFIED = 0; - - // Enables a MQTT connection. - MQTT_ENABLED = 1; - - // Disables a MQTT connection. - MQTT_DISABLED = 2; -} - -// Indicates whether DeviceService (HTTP) is enabled or disabled for the -// registry. See the field description for details. -enum HttpState { - // No HTTP state specified. If not specified, DeviceService will be - // enabled by default. - HTTP_STATE_UNSPECIFIED = 0; - - // Enables DeviceService (HTTP) service for the registry. - HTTP_ENABLED = 1; - - // Disables DeviceService (HTTP) service for the registry. - HTTP_DISABLED = 2; -} - -// **Beta Feature** -// -// The logging verbosity for device activity. Specifies which events should be -// written to logs. For example, if the LogLevel is ERROR, only events that -// terminate in errors will be logged. LogLevel is inclusive; enabling INFO -// logging will also enable ERROR logging. -enum LogLevel { - // No logging specified. If not specified, logging will be disabled. - LOG_LEVEL_UNSPECIFIED = 0; - - // Disables logging. - NONE = 10; - - // Error events will be logged. - ERROR = 20; - - // Informational events will be logged, such as connections and - // disconnections. - INFO = 30; - - // All events will be logged. - DEBUG = 40; -} - -// Gateway type. -enum GatewayType { - // If unspecified, the device is considered a non-gateway device. - GATEWAY_TYPE_UNSPECIFIED = 0; - - // The device is a gateway. - GATEWAY = 1; - - // The device is not a gateway. - NON_GATEWAY = 2; -} - -// The gateway authorization/authentication method. This setting determines how -// Cloud IoT Core authorizes/authenticate devices to access the gateway. -enum GatewayAuthMethod { - // No authentication/authorization method specified. No devices are allowed to - // access the gateway. - GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; - - // The device is authenticated through the gateway association only. Device - // credentials are ignored even if provided. - ASSOCIATION_ONLY = 1; - - // The device is authenticated through its own credentials. Gateway - // association is not checked. - DEVICE_AUTH_TOKEN_ONLY = 2; - - // The device is authenticated through both device credentials and gateway - // association. The device must be bound to the gateway and must provide its - // own credentials. - ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; -} - -// The supported formats for the public key. -enum PublicKeyCertificateFormat { - // The format has not been specified. This is an invalid default value and - // must not be used. - UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; - - // An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), - // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and - // `-----END CERTIFICATE-----`. - X509_CERTIFICATE_PEM = 1; -} - -// The supported formats for the public key. -enum PublicKeyFormat { - // The format has not been specified. This is an invalid default value and - // must not be used. - UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; - - // An RSA public key encoded in base64, and wrapped by - // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be - // used to verify `RS256` signatures in JWT tokens ([RFC7518]( - // https://www.ietf.org/rfc/rfc7518.txt)). - RSA_PEM = 3; - - // As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( - // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by - // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. - RSA_X509_PEM = 1; - - // Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in - // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END - // PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` - // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is - // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. - ES256_PEM = 2; - - // As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( - // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by - // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. - ES256_X509_PEM = 4; -} diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 39707075104..648e60a318e 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -3257,6 +3257,13 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** MqttState enum. */ + enum MqttState { + MQTT_STATE_UNSPECIFIED = 0, + MQTT_ENABLED = 1, + MQTT_DISABLED = 2 + } + /** Properties of a HttpConfig. */ interface IHttpConfig { @@ -3347,6 +3354,37 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** HttpState enum. */ + enum HttpState { + HTTP_STATE_UNSPECIFIED = 0, + HTTP_ENABLED = 1, + HTTP_DISABLED = 2 + } + + /** LogLevel enum. */ + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0, + NONE = 10, + ERROR = 20, + INFO = 30, + DEBUG = 40 + } + + /** GatewayType enum. */ + enum GatewayType { + GATEWAY_TYPE_UNSPECIFIED = 0, + GATEWAY = 1, + NON_GATEWAY = 2 + } + + /** GatewayAuthMethod enum. */ + enum GatewayAuthMethod { + GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, + ASSOCIATION_ONLY = 1, + DEVICE_AUTH_TOKEN_ONLY = 2, + ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 + } + /** Properties of an EventNotificationConfig. */ interface IEventNotificationConfig { @@ -3848,6 +3886,12 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** PublicKeyCertificateFormat enum. */ + enum PublicKeyCertificateFormat { + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, + X509_CERTIFICATE_PEM = 1 + } + /** Properties of a DeviceCredential. */ interface IDeviceCredential { @@ -4043,6 +4087,15 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** PublicKeyFormat enum. */ + enum PublicKeyFormat { + UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, + RSA_PEM = 3, + RSA_X509_PEM = 1, + ES256_PEM = 2, + ES256_X509_PEM = 4 + } + /** Properties of a DeviceConfig. */ interface IDeviceConfig { @@ -4246,59 +4299,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** MqttState enum. */ - enum MqttState { - MQTT_STATE_UNSPECIFIED = 0, - MQTT_ENABLED = 1, - MQTT_DISABLED = 2 - } - - /** HttpState enum. */ - enum HttpState { - HTTP_STATE_UNSPECIFIED = 0, - HTTP_ENABLED = 1, - HTTP_DISABLED = 2 - } - - /** LogLevel enum. */ - enum LogLevel { - LOG_LEVEL_UNSPECIFIED = 0, - NONE = 10, - ERROR = 20, - INFO = 30, - DEBUG = 40 - } - - /** GatewayType enum. */ - enum GatewayType { - GATEWAY_TYPE_UNSPECIFIED = 0, - GATEWAY = 1, - NON_GATEWAY = 2 - } - - /** GatewayAuthMethod enum. */ - enum GatewayAuthMethod { - GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, - ASSOCIATION_ONLY = 1, - DEVICE_AUTH_TOKEN_ONLY = 2, - ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 - } - - /** PublicKeyCertificateFormat enum. */ - enum PublicKeyCertificateFormat { - UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, - X509_CERTIFICATE_PEM = 1 - } - - /** PublicKeyFormat enum. */ - enum PublicKeyFormat { - UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, - RSA_PEM = 3, - RSA_X509_PEM = 1, - ES256_PEM = 2, - ES256_X509_PEM = 4 - } } } } @@ -4644,6 +4644,230 @@ 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|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; + + /** + * 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 }; + } } /** Namespace protobuf. */ @@ -6376,6 +6600,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. */ @@ -6496,6 +6723,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. */ @@ -7949,102 +8182,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an Empty. */ interface IEmpty { } diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index d9614c6887f..2b5a71d1762 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -7601,6 +7601,22 @@ return MqttConfig; })(); + /** + * MqttState enum. + * @name google.cloud.iot.v1.MqttState + * @enum {string} + * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value + * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value + * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value + */ + v1.MqttState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MQTT_ENABLED"] = 1; + values[valuesById[2] = "MQTT_DISABLED"] = 2; + return values; + })(); + v1.HttpConfig = (function() { /** @@ -7806,6 +7822,76 @@ return HttpConfig; })(); + /** + * HttpState enum. + * @name google.cloud.iot.v1.HttpState + * @enum {string} + * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value + * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value + * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value + */ + v1.HttpState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTP_ENABLED"] = 1; + values[valuesById[2] = "HTTP_DISABLED"] = 2; + return values; + })(); + + /** + * LogLevel enum. + * @name google.cloud.iot.v1.LogLevel + * @enum {string} + * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value + * @property {number} NONE=10 NONE value + * @property {number} ERROR=20 ERROR value + * @property {number} INFO=30 INFO value + * @property {number} DEBUG=40 DEBUG value + */ + v1.LogLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[10] = "NONE"] = 10; + values[valuesById[20] = "ERROR"] = 20; + values[valuesById[30] = "INFO"] = 30; + values[valuesById[40] = "DEBUG"] = 40; + return values; + })(); + + /** + * GatewayType enum. + * @name google.cloud.iot.v1.GatewayType + * @enum {string} + * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value + * @property {number} GATEWAY=1 GATEWAY value + * @property {number} NON_GATEWAY=2 NON_GATEWAY value + */ + v1.GatewayType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GATEWAY"] = 1; + values[valuesById[2] = "NON_GATEWAY"] = 2; + return values; + })(); + + /** + * GatewayAuthMethod enum. + * @name google.cloud.iot.v1.GatewayAuthMethod + * @enum {string} + * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value + * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value + * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value + * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value + */ + v1.GatewayAuthMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; + values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; + values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; + return values; + })(); + v1.EventNotificationConfig = (function() { /** @@ -8972,6 +9058,20 @@ return PublicKeyCertificate; })(); + /** + * PublicKeyCertificateFormat enum. + * @name google.cloud.iot.v1.PublicKeyCertificateFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value + * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value + */ + v1.PublicKeyCertificateFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; + values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; + return values; + })(); + v1.DeviceCredential = (function() { /** @@ -9449,6 +9549,26 @@ return PublicKeyCredential; })(); + /** + * PublicKeyFormat enum. + * @name google.cloud.iot.v1.PublicKeyFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value + * @property {number} RSA_PEM=3 RSA_PEM value + * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value + * @property {number} ES256_PEM=2 ES256_PEM value + * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value + */ + v1.PublicKeyFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; + values[valuesById[3] = "RSA_PEM"] = 3; + values[valuesById[1] = "RSA_X509_PEM"] = 1; + values[valuesById[2] = "ES256_PEM"] = 2; + values[valuesById[4] = "ES256_X509_PEM"] = 4; + return values; + })(); + v1.DeviceConfig = (function() { /** @@ -9960,126 +10080,6 @@ return DeviceState; })(); - /** - * MqttState enum. - * @name google.cloud.iot.v1.MqttState - * @enum {string} - * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value - * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value - * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value - */ - v1.MqttState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MQTT_ENABLED"] = 1; - values[valuesById[2] = "MQTT_DISABLED"] = 2; - return values; - })(); - - /** - * HttpState enum. - * @name google.cloud.iot.v1.HttpState - * @enum {string} - * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value - * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value - * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value - */ - v1.HttpState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTP_ENABLED"] = 1; - values[valuesById[2] = "HTTP_DISABLED"] = 2; - return values; - })(); - - /** - * LogLevel enum. - * @name google.cloud.iot.v1.LogLevel - * @enum {string} - * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value - * @property {number} NONE=10 NONE value - * @property {number} ERROR=20 ERROR value - * @property {number} INFO=30 INFO value - * @property {number} DEBUG=40 DEBUG value - */ - v1.LogLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[10] = "NONE"] = 10; - values[valuesById[20] = "ERROR"] = 20; - values[valuesById[30] = "INFO"] = 30; - values[valuesById[40] = "DEBUG"] = 40; - return values; - })(); - - /** - * GatewayType enum. - * @name google.cloud.iot.v1.GatewayType - * @enum {string} - * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value - * @property {number} GATEWAY=1 GATEWAY value - * @property {number} NON_GATEWAY=2 NON_GATEWAY value - */ - v1.GatewayType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GATEWAY"] = 1; - values[valuesById[2] = "NON_GATEWAY"] = 2; - return values; - })(); - - /** - * GatewayAuthMethod enum. - * @name google.cloud.iot.v1.GatewayAuthMethod - * @enum {string} - * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value - * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value - * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value - * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value - */ - v1.GatewayAuthMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; - values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; - values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; - return values; - })(); - - /** - * PublicKeyCertificateFormat enum. - * @name google.cloud.iot.v1.PublicKeyCertificateFormat - * @enum {string} - * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value - * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value - */ - v1.PublicKeyCertificateFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; - values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; - return values; - })(); - - /** - * PublicKeyFormat enum. - * @name google.cloud.iot.v1.PublicKeyFormat - * @enum {string} - * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value - * @property {number} RSA_PEM=3 RSA_PEM value - * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value - * @property {number} ES256_PEM=2 ES256_PEM value - * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value - */ - v1.PublicKeyFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; - values[valuesById[3] = "RSA_PEM"] = 3; - values[valuesById[1] = "RSA_X509_PEM"] = 1; - values[valuesById[2] = "ES256_PEM"] = 2; - values[valuesById[4] = "ES256_X509_PEM"] = 4; - return values; - })(); - return v1; })(); @@ -10936,70 +10936,607 @@ 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"; + 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; + })(); + + /** + * 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 + */ + + /** + * 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; + + /** + * 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); + 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; + 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; + } + 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; + } + 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; + } + 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; + 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.childType = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return ResourceReference; })(); return api; @@ -15841,6 +16378,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 */ /** @@ -15899,6 +16437,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 @@ -15934,6 +16480,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; }; @@ -15985,6 +16533,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; @@ -16041,6 +16592,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; }; @@ -16074,6 +16630,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; }; @@ -16097,6 +16658,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; @@ -16111,6 +16673,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; }; @@ -16141,6 +16705,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 */ /** @@ -16153,6 +16719,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) @@ -16215,6 +16782,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 @@ -16254,6 +16837,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; }; @@ -16311,6 +16902,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; @@ -16385,6 +16989,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; }; @@ -16446,6 +17071,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; }; @@ -16462,8 +17125,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; @@ -16471,6 +17136,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; @@ -16489,6 +17155,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; }; @@ -19930,230 +20603,6 @@ return Any; })(); - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Duration; - })(); - protobuf.Empty = (function() { /** diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 150b37ea704..855f5dc2778 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -16,20 +16,26 @@ }, "nested": { "DeviceManager": { + "options": { + "(google.api.default_host)": "cloudiot.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudiot" + }, "methods": { "CreateDeviceRegistry": { "requestType": "CreateDeviceRegistryRequest", "responseType": "DeviceRegistry", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/registries", - "(google.api.http).body": "device_registry" + "(google.api.http).body": "device_registry", + "(google.api.method_signature)": "parent,device_registry" } }, "GetDeviceRegistry": { "requestType": "GetDeviceRegistryRequest", "responseType": "DeviceRegistry", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*}" + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*}", + "(google.api.method_signature)": "name" } }, "UpdateDeviceRegistry": { @@ -37,21 +43,24 @@ "responseType": "DeviceRegistry", "options": { "(google.api.http).patch": "/v1/{device_registry.name=projects/*/locations/*/registries/*}", - "(google.api.http).body": "device_registry" + "(google.api.http).body": "device_registry", + "(google.api.method_signature)": "device_registry,update_mask" } }, "DeleteDeviceRegistry": { "requestType": "DeleteDeviceRegistryRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*}" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*}", + "(google.api.method_signature)": "name" } }, "ListDeviceRegistries": { "requestType": "ListDeviceRegistriesRequest", "responseType": "ListDeviceRegistriesResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/registries" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/registries", + "(google.api.method_signature)": "parent" } }, "CreateDevice": { @@ -59,7 +68,8 @@ "responseType": "Device", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}/devices", - "(google.api.http).body": "device" + "(google.api.http).body": "device", + "(google.api.method_signature)": "parent,device" } }, "GetDevice": { @@ -67,7 +77,8 @@ "responseType": "Device", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}", + "(google.api.method_signature)": "name" } }, "UpdateDevice": { @@ -77,14 +88,16 @@ "(google.api.http).patch": "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}", "(google.api.http).body": "device", "(google.api.http).additional_bindings.patch": "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}", - "(google.api.http).additional_bindings.body": "device" + "(google.api.http).additional_bindings.body": "device", + "(google.api.method_signature)": "device,update_mask" } }, "DeleteDevice": { "requestType": "DeleteDeviceRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", + "(google.api.method_signature)": "name" } }, "ListDevices": { @@ -92,7 +105,8 @@ "responseType": "ListDevicesResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/registries/*}/devices", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices", + "(google.api.method_signature)": "parent" } }, "ModifyCloudToDeviceConfig": { @@ -102,7 +116,8 @@ "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,binary_data" } }, "ListDeviceConfigVersions": { @@ -110,7 +125,8 @@ "responseType": "ListDeviceConfigVersionsResponse", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions" + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions", + "(google.api.method_signature)": "name" } }, "ListDeviceStates": { @@ -118,7 +134,8 @@ "responseType": "ListDeviceStatesResponse", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states" + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states", + "(google.api.method_signature)": "name" } }, "SetIamPolicy": { @@ -128,7 +145,8 @@ "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,policy" } }, "GetIamPolicy": { @@ -138,7 +156,8 @@ "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource" } }, "TestIamPermissions": { @@ -148,7 +167,8 @@ "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,permissions" } }, "SendCommandToDevice": { @@ -158,7 +178,8 @@ "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,binary_data,subfolder" } }, "BindDeviceToGateway": { @@ -168,7 +189,8 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,gateway_id,device_id" } }, "UnbindDeviceFromGateway": { @@ -178,7 +200,8 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,gateway_id,device_id" } } } @@ -187,11 +210,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "deviceRegistry": { "type": "DeviceRegistry", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -199,7 +229,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + } } } }, @@ -207,7 +241,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + } } } }, @@ -215,11 +253,17 @@ "fields": { "deviceRegistry": { "type": "DeviceRegistry", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -227,7 +271,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "pageSize": { "type": "int32", @@ -256,11 +304,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + } }, "device": { "type": "Device", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -268,7 +323,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, "fieldMask": { "type": "google.protobuf.FieldMask", @@ -280,11 +339,17 @@ "fields": { "device": { "type": "Device", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -292,7 +357,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } } } }, @@ -300,7 +369,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + } }, "deviceNumIds": { "rule": "repeated", @@ -372,7 +445,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, "versionToUpdate": { "type": "int64", @@ -380,7 +457,10 @@ }, "binaryData": { "type": "bytes", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -388,7 +468,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, "numVersions": { "type": "int32", @@ -409,7 +493,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, "numStates": { "type": "int32", @@ -430,11 +518,18 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, "binaryData": { "type": "bytes", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "subfolder": { "type": "string", @@ -449,15 +544,25 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + } }, "gatewayId": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "deviceId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -468,15 +573,25 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + } }, "gatewayId": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "deviceId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -484,6 +599,10 @@ "fields": {} }, "Device": { + "options": { + "(google.api.resource).type": "cloudiot.googleapis.com/Device", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}/devices/{device}" + }, "fields": { "id": { "type": "string", @@ -578,6 +697,10 @@ } }, "DeviceRegistry": { + "options": { + "(google.api.resource).type": "cloudiot.googleapis.com/DeviceRegistry", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}" + }, "fields": { "id": { "type": "string", @@ -623,6 +746,13 @@ } } }, + "MqttState": { + "values": { + "MQTT_STATE_UNSPECIFIED": 0, + "MQTT_ENABLED": 1, + "MQTT_DISABLED": 2 + } + }, "HttpConfig": { "fields": { "httpEnabledState": { @@ -631,6 +761,37 @@ } } }, + "HttpState": { + "values": { + "HTTP_STATE_UNSPECIFIED": 0, + "HTTP_ENABLED": 1, + "HTTP_DISABLED": 2 + } + }, + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "NONE": 10, + "ERROR": 20, + "INFO": 30, + "DEBUG": 40 + } + }, + "GatewayType": { + "values": { + "GATEWAY_TYPE_UNSPECIFIED": 0, + "GATEWAY": 1, + "NON_GATEWAY": 2 + } + }, + "GatewayAuthMethod": { + "values": { + "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, + "ASSOCIATION_ONLY": 1, + "DEVICE_AUTH_TOKEN_ONLY": 2, + "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 + } + }, "EventNotificationConfig": { "fields": { "subfolderMatches": { @@ -710,6 +871,12 @@ } } }, + "PublicKeyCertificateFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, + "X509_CERTIFICATE_PEM": 1 + } + }, "DeviceCredential": { "oneofs": { "credential": { @@ -741,6 +908,15 @@ } } }, + "PublicKeyFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, + "RSA_PEM": 3, + "RSA_X509_PEM": 1, + "ES256_PEM": 2, + "ES256_X509_PEM": 4 + } + }, "DeviceConfig": { "fields": { "version": { @@ -772,59 +948,6 @@ "id": 2 } } - }, - "MqttState": { - "values": { - "MQTT_STATE_UNSPECIFIED": 0, - "MQTT_ENABLED": 1, - "MQTT_DISABLED": 2 - } - }, - "HttpState": { - "values": { - "HTTP_STATE_UNSPECIFIED": 0, - "HTTP_ENABLED": 1, - "HTTP_DISABLED": 2 - } - }, - "LogLevel": { - "values": { - "LOG_LEVEL_UNSPECIFIED": 0, - "NONE": 10, - "ERROR": 20, - "INFO": 30, - "DEBUG": 40 - } - }, - "GatewayType": { - "values": { - "GATEWAY_TYPE_UNSPECIFIED": 0, - "GATEWAY": 1, - "NON_GATEWAY": 2 - } - }, - "GatewayAuthMethod": { - "values": { - "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, - "ASSOCIATION_ONLY": 1, - "DEVICE_AUTH_TOKEN_ONLY": 2, - "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 - } - }, - "PublicKeyCertificateFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, - "X509_CERTIFICATE_PEM": 1 - } - }, - "PublicKeyFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, - "RSA_PEM": 3, - "RSA_X509_PEM": 1, - "ES256_PEM": 2, - "ES256_X509_PEM": 4 - } } } } @@ -836,7 +959,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ClientProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -944,6 +1067,74 @@ "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" + }, + "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 + } + }, + "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 + } + } } } }, @@ -1862,18 +2053,6 @@ } } }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Empty": { "fields": {} }, diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index eac27c038cf..10877d1c2aa 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -128,12 +128,12 @@ class DeviceManagerClient { devicePathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' ), + deviceRegistryPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}' + ), locationPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), - registryPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/registries/{registry}' - ), }; // Some of the methods on this service return "paged" results, @@ -266,10 +266,10 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project and cloud region where this device registry must be created. + * Required. The project and cloud region where this device registry must be created. * For example, `projects/example-project/locations/us-central1`. * @param {Object} request.deviceRegistry - * The device registry. The field `name` must be empty. The server will + * Required. The device registry. The field `name` must be empty. The server will * generate that field from the device registry `id` provided and the * `parent` field. * @@ -332,7 +332,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device registry. For example, + * Required. The name of the device registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -353,7 +353,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedName = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.getDeviceRegistry({name: formattedName}) * .then(responses => { * const response = responses[0]; @@ -387,13 +387,13 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.deviceRegistry - * The new values for the device registry. The `id` field must be empty, and + * Required. The new values for the device registry. The `id` field must be empty, and * the `name` field must indicate the path of the resource. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} * @param {Object} request.updateMask - * Only updates the `device_registry` fields indicated by this mask. + * Required. Only updates the `device_registry` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. * Mutable top-level fields: `event_notification_config`, `http_config`, @@ -458,7 +458,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device registry. For example, + * Required. The name of the device registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -476,7 +476,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedName = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.deleteDeviceRegistry({name: formattedName}).catch(err => { * console.error(err); * }); @@ -505,7 +505,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project and cloud region path. For example, + * Required. The project and cloud region path. For example, * `projects/example-project/locations/us-central1`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -618,7 +618,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project and cloud region path. For example, + * Required. The project and cloud region path. For example, * `projects/example-project/locations/us-central1`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -671,11 +671,11 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the device registry where this device should be created. + * Required. The name of the device registry where this device should be created. * For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {Object} request.device - * The device registration details. The field `name` must be empty. The server + * Required. The device registration details. The field `name` must be empty. The server * generates `name` from the device registry `id` and the * `parent` field. * @@ -699,7 +699,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * const device = {}; * const request = { * parent: formattedParent, @@ -738,7 +738,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {Object} [request.fieldMask] @@ -799,14 +799,14 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.device - * The new values for the device. The `id` and `num_id` fields must + * Required. The new values for the device. The `id` and `num_id` fields must * be empty, and the field `name` must specify the name path. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} * @param {Object} request.updateMask - * Only updates the `device` fields indicated by this mask. + * Required. Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. * Mutable top-level fields: `credentials`, `blocked`, and `metadata` @@ -870,7 +870,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {Object} [options] @@ -918,7 +918,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The device registry path. Required. For example, + * Required. The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * @param {number[]} [request.deviceNumIds] * A list of device numeric IDs. If empty, this field is ignored. Maximum @@ -974,7 +974,7 @@ class DeviceManagerClient { * }); * * // Iterate over all elements. - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * * client.listDevices({parent: formattedParent}) * .then(responses => { @@ -988,7 +988,7 @@ class DeviceManagerClient { * }); * * // Or obtain the paged response. - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * * * const options = {autoPaginate: false}; @@ -1047,7 +1047,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The device registry path. Required. For example, + * Required. The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * @param {number[]} [request.deviceNumIds] * A list of device numeric IDs. If empty, this field is ignored. Maximum @@ -1085,7 +1085,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.listDevicesStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -1111,11 +1111,11 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {Buffer} request.binaryData - * The configuration data for the device. + * Required. The configuration data for the device. * @param {number} [request.versionToUpdate] * The version number to update. If this value is zero, it will not check the * version number of the server and will always update the current version; @@ -1185,7 +1185,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {number} [request.numVersions] @@ -1250,7 +1250,7 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {number} [request.numStates] @@ -1339,10 +1339,10 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const resource = ''; * const policy = {}; * const request = { - * resource: formattedResource, + * resource: resource, * policy: policy, * }; * client.setIamPolicy(request) @@ -1406,8 +1406,8 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * client.getIamPolicy({resource: formattedResource}) + * const resource = ''; + * client.getIamPolicy({resource: resource}) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) @@ -1444,7 +1444,7 @@ class DeviceManagerClient { * @param {string} request.resource * REQUIRED: The resource for which the policy detail is being requested. * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions + * @param {string[]} [request.permissions] * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more * information see @@ -1468,13 +1468,8 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedResource = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * const permissions = []; - * const request = { - * resource: formattedResource, - * permissions: permissions, - * }; - * client.testIamPermissions(request) + * const resource = ''; + * client.testIamPermissions({resource: resource}) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) @@ -1519,11 +1514,11 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {Buffer} request.binaryData - * The command data to send to the device. + * Required. The command data to send to the device. * @param {string} [request.subfolder] * Optional subfolder for the command. If empty, the command will be delivered * to the /devices/{device-id}/commands topic, otherwise it will be delivered @@ -1588,13 +1583,13 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the registry. For example, + * Required. The name of the registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {string} request.gatewayId - * The value of `gateway_id` can be either the device numeric ID or the + * Required. The value of `gateway_id` can be either the device numeric ID or the * user-defined device identifier. * @param {string} request.deviceId - * The device to associate with the specified gateway. The value of + * Required. The device to associate with the specified gateway. The value of * `device_id` can be either the device numeric ID or the user-defined device * identifier. * @param {Object} [options] @@ -1616,7 +1611,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * const gatewayId = ''; * const deviceId = ''; * const request = { @@ -1657,13 +1652,13 @@ class DeviceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the registry. For example, + * Required. The name of the registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * @param {string} request.gatewayId - * The value of `gateway_id` can be either the device numeric ID or the + * Required. The value of `gateway_id` can be either the device numeric ID or the * user-defined device identifier. * @param {string} request.deviceId - * The device to disassociate from the specified gateway. The value of + * Required. The device to disassociate from the specified gateway. The value of * `device_id` can be either the device numeric ID or the user-defined device * identifier. * @param {Object} [options] @@ -1685,7 +1680,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * const gatewayId = ''; * const deviceId = ''; * const request = { @@ -1747,32 +1742,32 @@ class DeviceManagerClient { } /** - * Return a fully-qualified location resource name string. + * Return a fully-qualified device_registry resource name string. * * @param {String} project * @param {String} location + * @param {String} registry * @returns {String} */ - locationPath(project, location) { - return this._pathTemplates.locationPathTemplate.render({ + deviceRegistryPath(project, location, registry) { + return this._pathTemplates.deviceRegistryPathTemplate.render({ project: project, location: location, + registry: registry, }); } /** - * Return a fully-qualified registry resource name string. + * Return a fully-qualified location resource name string. * * @param {String} project * @param {String} location - * @param {String} registry * @returns {String} */ - registryPath(project, location, registry) { - return this._pathTemplates.registryPathTemplate.render({ + locationPath(project, location) { + return this._pathTemplates.locationPathTemplate.render({ project: project, location: location, - registry: registry, }); } @@ -1821,61 +1816,65 @@ class DeviceManagerClient { } /** - * Parse the locationName from a location resource. + * Parse the deviceRegistryName from a device_registry resource. * - * @param {String} locationName - * A fully-qualified path representing a location resources. + * @param {String} deviceRegistryName + * A fully-qualified path representing a device_registry resources. * @returns {String} - A string representing the project. */ - matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; + matchProjectFromDeviceRegistryName(deviceRegistryName) { + return this._pathTemplates.deviceRegistryPathTemplate.match( + deviceRegistryName + ).project; } /** - * Parse the locationName from a location resource. + * Parse the deviceRegistryName from a device_registry resource. * - * @param {String} locationName - * A fully-qualified path representing a location resources. + * @param {String} deviceRegistryName + * A fully-qualified path representing a device_registry resources. * @returns {String} - A string representing the location. */ - matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName) - .location; + matchLocationFromDeviceRegistryName(deviceRegistryName) { + return this._pathTemplates.deviceRegistryPathTemplate.match( + deviceRegistryName + ).location; } /** - * Parse the registryName from a registry resource. + * Parse the deviceRegistryName from a device_registry resource. * - * @param {String} registryName - * A fully-qualified path representing a registry resources. - * @returns {String} - A string representing the project. + * @param {String} deviceRegistryName + * A fully-qualified path representing a device_registry resources. + * @returns {String} - A string representing the registry. */ - matchProjectFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate.match(registryName).project; + matchRegistryFromDeviceRegistryName(deviceRegistryName) { + return this._pathTemplates.deviceRegistryPathTemplate.match( + deviceRegistryName + ).registry; } /** - * Parse the registryName from a registry resource. + * Parse the locationName from a location resource. * - * @param {String} registryName - * A fully-qualified path representing a registry resources. - * @returns {String} - A string representing the location. + * @param {String} locationName + * A fully-qualified path representing a location resources. + * @returns {String} - A string representing the project. */ - matchLocationFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate.match(registryName) - .location; + matchProjectFromLocationName(locationName) { + return this._pathTemplates.locationPathTemplate.match(locationName).project; } /** - * Parse the registryName from a registry resource. + * Parse the locationName from a location resource. * - * @param {String} registryName - * A fully-qualified path representing a registry resources. - * @returns {String} - A string representing the registry. + * @param {String} locationName + * A fully-qualified path representing a location resources. + * @returns {String} - A string representing the location. */ - matchRegistryFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate.match(registryName) - .registry; + matchLocationFromLocationName(locationName) { + return this._pathTemplates.locationPathTemplate.match(locationName) + .location; } } diff --git a/packages/google-cloud-iot/src/v1/device_manager_client_config.json b/packages/google-cloud-iot/src/v1/device_manager_client_config.json index 024d680d160..184e06d89c8 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client_config.json +++ b/packages/google-cloud-iot/src/v1/device_manager_client_config.json @@ -6,12 +6,7 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "non_idempotent": [], - "rate_limited_aware": [ - "DEADLINE_EXCEEDED", - "RESOURCE_EXHAUSTED", - "UNAVAILABLE" - ] + "non_idempotent": [] }, "retry_params": { "default": { @@ -21,16 +16,7 @@ "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 120000 - }, - "rate_limited_aware": { - "initial_retry_delay_millis": 1000, - "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": 120000 + "total_timeout_millis": 600000 } }, "methods": { @@ -51,7 +37,7 @@ }, "DeleteDeviceRegistry": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListDeviceRegistries": { @@ -76,7 +62,7 @@ }, "DeleteDevice": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListDevices": { @@ -86,8 +72,8 @@ }, "ModifyCloudToDeviceConfig": { "timeout_millis": 60000, - "retry_codes_name": "rate_limited_aware", - "retry_params_name": "rate_limited_aware" + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" }, "ListDeviceConfigVersions": { "timeout_millis": 60000, @@ -116,8 +102,8 @@ }, "SendCommandToDevice": { "timeout_millis": 60000, - "retry_codes_name": "rate_limited_aware", - "retry_params_name": "rate_limited_aware" + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" }, "BindDeviceToGateway": { "timeout_millis": 60000, diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js index 3c3c0d41ac3..be2bc3deabb 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js +++ b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js @@ -19,11 +19,11 @@ * Request for `CreateDeviceRegistry`. * * @property {string} parent - * The project and cloud region where this device registry must be created. + * Required. The project and cloud region where this device registry must be created. * For example, `projects/example-project/locations/us-central1`. * * @property {Object} deviceRegistry - * The device registry. The field `name` must be empty. The server will + * Required. The device registry. The field `name` must be empty. The server will * generate that field from the device registry `id` provided and the * `parent` field. * @@ -41,7 +41,7 @@ const CreateDeviceRegistryRequest = { * Request for `GetDeviceRegistry`. * * @property {string} name - * The name of the device registry. For example, + * Required. The name of the device registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * @typedef GetDeviceRegistryRequest @@ -56,7 +56,7 @@ const GetDeviceRegistryRequest = { * Request for `DeleteDeviceRegistry`. * * @property {string} name - * The name of the device registry. For example, + * Required. The name of the device registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * @typedef DeleteDeviceRegistryRequest @@ -71,14 +71,14 @@ const DeleteDeviceRegistryRequest = { * Request for `UpdateDeviceRegistry`. * * @property {Object} deviceRegistry - * The new values for the device registry. The `id` field must be empty, and + * Required. The new values for the device registry. The `id` field must be empty, and * the `name` field must indicate the path of the resource. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} * * @property {Object} updateMask - * Only updates the `device_registry` fields indicated by this mask. + * Required. Only updates the `device_registry` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. * Mutable top-level fields: `event_notification_config`, `http_config`, @@ -98,7 +98,7 @@ const UpdateDeviceRegistryRequest = { * Request for `ListDeviceRegistries`. * * @property {string} parent - * The project and cloud region path. For example, + * Required. The project and cloud region path. For example, * `projects/example-project/locations/us-central1`. * * @property {number} pageSize @@ -145,12 +145,12 @@ const ListDeviceRegistriesResponse = { * Request for `CreateDevice`. * * @property {string} parent - * The name of the device registry where this device should be created. + * Required. The name of the device registry where this device should be created. * For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * @property {Object} device - * The device registration details. The field `name` must be empty. The server + * Required. The device registration details. The field `name` must be empty. The server * generates `name` from the device registry `id` and the * `parent` field. * @@ -168,7 +168,7 @@ const CreateDeviceRequest = { * Request for `GetDevice`. * * @property {string} name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @@ -190,7 +190,7 @@ const GetDeviceRequest = { * Request for `UpdateDevice`. * * @property {Object} device - * The new values for the device. The `id` and `num_id` fields must + * Required. The new values for the device. The `id` and `num_id` fields must * be empty, and the field `name` must specify the name path. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. @@ -198,7 +198,7 @@ const GetDeviceRequest = { * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} * * @property {Object} updateMask - * Only updates the `device` fields indicated by this mask. + * Required. Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. * Mutable top-level fields: `credentials`, `blocked`, and `metadata` @@ -217,7 +217,7 @@ const UpdateDeviceRequest = { * Request for `DeleteDevice`. * * @property {string} name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @@ -233,7 +233,7 @@ const DeleteDeviceRequest = { * Request for `ListDevices`. * * @property {string} parent - * The device registry path. Required. For example, + * Required. The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * * @property {number[]} deviceNumIds @@ -329,7 +329,7 @@ const ListDevicesResponse = { * Request for `ModifyCloudToDeviceConfig`. * * @property {string} name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @@ -341,7 +341,7 @@ const ListDevicesResponse = { * simultaneous updates without losing data. * * @property {Buffer} binaryData - * The configuration data for the device. + * Required. The configuration data for the device. * * @typedef ModifyCloudToDeviceConfigRequest * @memberof google.cloud.iot.v1 @@ -355,7 +355,7 @@ const ModifyCloudToDeviceConfigRequest = { * Request for `ListDeviceConfigVersions`. * * @property {string} name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @@ -393,7 +393,7 @@ const ListDeviceConfigVersionsResponse = { * Request for `ListDeviceStates`. * * @property {string} name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @@ -431,12 +431,12 @@ const ListDeviceStatesResponse = { * Request for `SendCommandToDevice`. * * @property {string} name - * The name of the device. For example, + * Required. The name of the device. For example, * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * * @property {Buffer} binaryData - * The command data to send to the device. + * Required. The command data to send to the device. * * @property {string} subfolder * Optional subfolder for the command. If empty, the command will be delivered @@ -467,15 +467,15 @@ const SendCommandToDeviceResponse = { * Request for `BindDeviceToGateway`. * * @property {string} parent - * The name of the registry. For example, + * Required. The name of the registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * @property {string} gatewayId - * The value of `gateway_id` can be either the device numeric ID or the + * Required. The value of `gateway_id` can be either the device numeric ID or the * user-defined device identifier. * * @property {string} deviceId - * The device to associate with the specified gateway. The value of + * Required. The device to associate with the specified gateway. The value of * `device_id` can be either the device numeric ID or the user-defined device * identifier. * @@ -501,15 +501,15 @@ const BindDeviceToGatewayResponse = { * Request for `UnbindDeviceFromGateway`. * * @property {string} parent - * The name of the registry. For example, + * Required. The name of the registry. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. * * @property {string} gatewayId - * The value of `gateway_id` can be either the device numeric ID or the + * Required. The value of `gateway_id` can be either the device numeric ID or the * user-defined device identifier. * * @property {string} deviceId - * The device to disassociate from the specified gateway. The value of + * Required. The device to disassociate from the specified gateway. The value of * `device_id` can be either the device numeric ID or the user-defined device * identifier. * diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index fcfeeef3b9b..da40c8046a3 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-10-01T11:20:14.378224Z", + "updateTime": "2019-10-15T11:20:44.884615Z", "sources": [ { "generator": { "name": "artman", - "version": "0.37.1", - "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" + "version": "0.39.0", + "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ce3c574d1266026cebea3a893247790bd68191c2", - "internalRef": "272147209" + "sha": "82e14b22669d5748d7a0922634159794ce0bf796", + "internalRef": "274692507" } }, { diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 936b19cc57b..da515910871 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -123,7 +123,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.registryPath( + const formattedName = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -160,7 +160,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.registryPath( + const formattedName = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -259,7 +259,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.registryPath( + const formattedName = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -286,7 +286,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.registryPath( + const formattedName = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -385,7 +385,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -428,7 +428,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -668,7 +668,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -710,7 +710,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -953,14 +953,10 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedResource = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); + const resource = 'resource-341064690'; const policy = {}; const request = { - resource: formattedResource, + resource: resource, policy: policy, }; @@ -992,14 +988,10 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedResource = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); + const resource = 'resource-341064690'; const policy = {}; const request = { - resource: formattedResource, + resource: resource, policy: policy, }; @@ -1027,13 +1019,9 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedResource = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); + const resource = 'resource-341064690'; const request = { - resource: formattedResource, + resource: resource, }; // Mock response @@ -1064,13 +1052,9 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedResource = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); + const resource = 'resource-341064690'; const request = { - resource: formattedResource, + resource: resource, }; // Mock Grpc layer @@ -1097,15 +1081,9 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedResource = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const permissions = []; + const resource = 'resource-341064690'; const request = { - resource: formattedResource, - permissions: permissions, + resource: resource, }; // Mock response @@ -1131,15 +1109,9 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedResource = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const permissions = []; + const resource = 'resource-341064690'; const request = { - resource: formattedResource, - permissions: permissions, + resource: resource, }; // Mock Grpc layer @@ -1237,7 +1209,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1273,7 +1245,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1310,7 +1282,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1346,7 +1318,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.registryPath( + const formattedParent = client.deviceRegistryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' From c89afdadcfa88532e8478d1ca06675e281b3ffd3 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Oct 2019 18:17:08 -0700 Subject: [PATCH 138/370] fix(deps): bump google-gax to 1.7.5 (#217) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 771223752f6..660450630ac 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -37,7 +37,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.6.3" + "google-gax": "^1.7.5" }, "devDependencies": { "codecov": "^3.0.2", From af813ea641917bad12e209e281df03fea4ca1aa2 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:29:38 -0700 Subject: [PATCH 139/370] chore: release 1.3.0 (#216) --- packages/google-cloud-iot/CHANGELOG.md | 15 +++++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 58ad91fe2f6..c96f3146f43 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.3.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.2.0...v1.3.0) (2019-10-22) + + +### Features + +* .d.ts for protos ([653713e](https://www.github.com/googleapis/nodejs-iot/commit/653713e2694a82db67a0bf2c810a70d761b65e29)) +* .d.ts for protos ([#207](https://www.github.com/googleapis/nodejs-iot/issues/207)) ([6bf34f4](https://www.github.com/googleapis/nodejs-iot/commit/6bf34f4445c7624235e0b83c3ef4423168467b89)) + + +### Bug Fixes + +* changes to retry logic ([68a1d6e](https://www.github.com/googleapis/nodejs-iot/commit/68a1d6ecb61c6c1af74e3890e7eee302d01db370)) +* use compatible version of google-gax ([b3a96bb](https://www.github.com/googleapis/nodejs-iot/commit/b3a96bb6afd654844e52953b2409fcc3f48148f5)) +* **deps:** bump google-gax to 1.7.5 ([#217](https://www.github.com/googleapis/nodejs-iot/issues/217)) ([7a6442e](https://www.github.com/googleapis/nodejs-iot/commit/7a6442ee0f8959ff10a9a8d646bb10e1c042c135)) + ## [1.2.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.1.3...v1.2.0) (2019-09-16) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 660450630ac..34bc2c404f9 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.2.0", + "version": "1.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 88967ad506e..65c7227e02c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.2.0" + "@google-cloud/iot": "^1.3.0" }, "devDependencies": { "chai": "^4.2.0", From 9a0409cd3079013e75b883f624fe18e0767f8f6f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 5 Nov 2019 11:39:23 -0800 Subject: [PATCH 140/370] chore: exclude gapic files from code coverage (#220) --- packages/google-cloud-iot/.nycrc | 1 - packages/google-cloud-iot/synth.metadata | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index 23e322204ec..367688844eb 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.nycrc @@ -10,7 +10,6 @@ "**/docs", "**/samples", "**/scripts", - "**/src/**/v*/**/*.js", "**/protos", "**/test", ".jsdoc.js", diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index da40c8046a3..1762d2f45ce 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-15T11:20:44.884615Z", + "updateTime": "2019-11-05T12:15:52.416274Z", "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": "82e14b22669d5748d7a0922634159794ce0bf796", - "internalRef": "274692507" + "sha": "8c6569ced063c08a48272de2e887860d0c40d388", + "internalRef": "278552094" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], From 9147566361999f6ad76092e235283fcc327fb2a9 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 12 Nov 2019 11:39:51 -0800 Subject: [PATCH 141/370] fix(docs): snippets are now replaced in jsdoc comments (#222) --- packages/google-cloud-iot/.jsdoc.js | 3 ++- packages/google-cloud-iot/package.json | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 87e1aeb3d6a..b468147c054 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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-iot/package.json b/packages/google-cloud-iot/package.json index 34bc2c404f9..8358e03a55f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -45,13 +45,14 @@ "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.6.2", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", "mocha": "^6.0.0", "nyc": "^14.0.0", "power-assert": "^1.6.0", - "prettier": "^1.13.7", - "linkinator": "^1.5.0" + "prettier": "^1.13.7" } } From d09b6a6b1b97d8f0aad4329b917ea111e8edb4c8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Nov 2019 12:36:45 -0800 Subject: [PATCH 142/370] fix: revert incorrect deviceRegistryPath to correct registryPath in proto --- .../google/cloud/iot/v1/device_manager.proto | 12 +- .../google/cloud/iot/v1/resources.proto | 2 +- packages/google-cloud-iot/protos/protos.json | 14 +-- .../src/v1/device_manager_client.js | 104 +++++++++--------- packages/google-cloud-iot/synth.metadata | 6 +- packages/google-cloud-iot/test/gapic-v1.js | 24 ++-- 6 files changed, 79 insertions(+), 83 deletions(-) diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto index 7f0132d851c..44d11afe650 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto @@ -295,7 +295,7 @@ message GetDeviceRegistryRequest { string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" } ]; } @@ -307,7 +307,7 @@ message DeleteDeviceRegistryRequest { string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" } ]; } @@ -369,7 +369,7 @@ message CreateDeviceRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" } ]; @@ -431,7 +431,7 @@ message ListDevicesRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" } ]; @@ -605,7 +605,7 @@ message BindDeviceToGatewayRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" } ]; @@ -631,7 +631,7 @@ message UnbindDeviceFromGatewayRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" } ]; diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto index 92d668a92f3..2201d330265 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto @@ -155,7 +155,7 @@ message GatewayConfig { // A container for a group of devices. message DeviceRegistry { option (google.api.resource) = { - type: "cloudiot.googleapis.com/DeviceRegistry" + type: "cloudiot.googleapis.com/Registry" pattern: "projects/{project}/locations/{location}/registries/{registry}" }; diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 855f5dc2778..07b00289a0d 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -232,7 +232,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } } } @@ -244,7 +244,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } } } @@ -307,7 +307,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } }, "device": { @@ -372,7 +372,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } }, "deviceNumIds": { @@ -547,7 +547,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } }, "gatewayId": { @@ -576,7 +576,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/DeviceRegistry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } }, "gatewayId": { @@ -698,7 +698,7 @@ }, "DeviceRegistry": { "options": { - "(google.api.resource).type": "cloudiot.googleapis.com/DeviceRegistry", + "(google.api.resource).type": "cloudiot.googleapis.com/Registry", "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}" }, "fields": { diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 10877d1c2aa..174f435157e 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -128,12 +128,12 @@ class DeviceManagerClient { devicePathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' ), - deviceRegistryPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/registries/{registry}' - ), locationPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + registryPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}' + ), }; // Some of the methods on this service return "paged" results, @@ -353,7 +353,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedName = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.getDeviceRegistry({name: formattedName}) * .then(responses => { * const response = responses[0]; @@ -476,7 +476,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedName = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.deleteDeviceRegistry({name: formattedName}).catch(err => { * console.error(err); * }); @@ -699,7 +699,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * const device = {}; * const request = { * parent: formattedParent, @@ -974,7 +974,7 @@ class DeviceManagerClient { * }); * * // Iterate over all elements. - * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * * client.listDevices({parent: formattedParent}) * .then(responses => { @@ -988,7 +988,7 @@ class DeviceManagerClient { * }); * * // Or obtain the paged response. - * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * * * const options = {autoPaginate: false}; @@ -1085,7 +1085,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * client.listDevicesStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -1611,7 +1611,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * const gatewayId = ''; * const deviceId = ''; * const request = { @@ -1680,7 +1680,7 @@ class DeviceManagerClient { * // optional auth parameters. * }); * - * const formattedParent = client.deviceRegistryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); * const gatewayId = ''; * const deviceId = ''; * const request = { @@ -1742,32 +1742,32 @@ class DeviceManagerClient { } /** - * Return a fully-qualified device_registry resource name string. + * Return a fully-qualified location resource name string. * * @param {String} project * @param {String} location - * @param {String} registry * @returns {String} */ - deviceRegistryPath(project, location, registry) { - return this._pathTemplates.deviceRegistryPathTemplate.render({ + locationPath(project, location) { + return this._pathTemplates.locationPathTemplate.render({ project: project, location: location, - registry: registry, }); } /** - * Return a fully-qualified location resource name string. + * Return a fully-qualified registry resource name string. * * @param {String} project * @param {String} location + * @param {String} registry * @returns {String} */ - locationPath(project, location) { - return this._pathTemplates.locationPathTemplate.render({ + registryPath(project, location, registry) { + return this._pathTemplates.registryPathTemplate.render({ project: project, location: location, + registry: registry, }); } @@ -1816,65 +1816,61 @@ class DeviceManagerClient { } /** - * Parse the deviceRegistryName from a device_registry resource. + * Parse the locationName from a location resource. * - * @param {String} deviceRegistryName - * A fully-qualified path representing a device_registry resources. + * @param {String} locationName + * A fully-qualified path representing a location resources. * @returns {String} - A string representing the project. */ - matchProjectFromDeviceRegistryName(deviceRegistryName) { - return this._pathTemplates.deviceRegistryPathTemplate.match( - deviceRegistryName - ).project; + matchProjectFromLocationName(locationName) { + return this._pathTemplates.locationPathTemplate.match(locationName).project; } /** - * Parse the deviceRegistryName from a device_registry resource. + * Parse the locationName from a location resource. * - * @param {String} deviceRegistryName - * A fully-qualified path representing a device_registry resources. + * @param {String} locationName + * A fully-qualified path representing a location resources. * @returns {String} - A string representing the location. */ - matchLocationFromDeviceRegistryName(deviceRegistryName) { - return this._pathTemplates.deviceRegistryPathTemplate.match( - deviceRegistryName - ).location; + matchLocationFromLocationName(locationName) { + return this._pathTemplates.locationPathTemplate.match(locationName) + .location; } /** - * Parse the deviceRegistryName from a device_registry resource. + * Parse the registryName from a registry resource. * - * @param {String} deviceRegistryName - * A fully-qualified path representing a device_registry resources. - * @returns {String} - A string representing the registry. + * @param {String} registryName + * A fully-qualified path representing a registry resources. + * @returns {String} - A string representing the project. */ - matchRegistryFromDeviceRegistryName(deviceRegistryName) { - return this._pathTemplates.deviceRegistryPathTemplate.match( - deviceRegistryName - ).registry; + matchProjectFromRegistryName(registryName) { + return this._pathTemplates.registryPathTemplate.match(registryName).project; } /** - * Parse the locationName from a location resource. + * Parse the registryName from a registry resource. * - * @param {String} locationName - * A fully-qualified path representing a location resources. - * @returns {String} - A string representing the project. + * @param {String} registryName + * A fully-qualified path representing a registry resources. + * @returns {String} - A string representing the location. */ - matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; + matchLocationFromRegistryName(registryName) { + return this._pathTemplates.registryPathTemplate.match(registryName) + .location; } /** - * Parse the locationName from a location resource. + * Parse the registryName from a registry resource. * - * @param {String} locationName - * A fully-qualified path representing a location resources. - * @returns {String} - A string representing the location. + * @param {String} registryName + * A fully-qualified path representing a registry resources. + * @returns {String} - A string representing the registry. */ - matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName) - .location; + matchRegistryFromRegistryName(registryName) { + return this._pathTemplates.registryPathTemplate.match(registryName) + .registry; } } diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 1762d2f45ce..08814e7711a 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-05T12:15:52.416274Z", + "updateTime": "2019-11-06T12:15:12.407798Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8c6569ced063c08a48272de2e887860d0c40d388", - "internalRef": "278552094" + "sha": "5691fcb7c1a926b52577aa1834f31d9c50efda54", + "internalRef": "278731899" } }, { diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index da515910871..01cc4227659 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -123,7 +123,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.deviceRegistryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -160,7 +160,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.deviceRegistryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -259,7 +259,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.deviceRegistryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -286,7 +286,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedName = client.deviceRegistryPath( + const formattedName = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -385,7 +385,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -428,7 +428,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -668,7 +668,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -710,7 +710,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1209,7 +1209,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1245,7 +1245,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1282,7 +1282,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' @@ -1318,7 +1318,7 @@ describe('DeviceManagerClient', () => { }); // Mock request - const formattedParent = client.deviceRegistryPath( + const formattedParent = client.registryPath( '[PROJECT]', '[LOCATION]', '[REGISTRY]' From 54ccafbad25119a3cdf8680a3e76a912e324f099 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2019 10:05:09 -0800 Subject: [PATCH 143/370] chore: release 1.3.1 (#223) --- packages/google-cloud-iot/CHANGELOG.md | 8 ++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index c96f3146f43..49b2d29ab0c 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.3.1](https://www.github.com/googleapis/nodejs-iot/compare/v1.3.0...v1.3.1) (2019-11-12) + + +### Bug Fixes + +* **docs:** snippets are now replaced in jsdoc comments ([#222](https://www.github.com/googleapis/nodejs-iot/issues/222)) ([50e0c77](https://www.github.com/googleapis/nodejs-iot/commit/50e0c7787e480089913606818a34396a0c35725b)) +* revert incorrect deviceRegistryPath to correct registryPath in proto ([a216742](https://www.github.com/googleapis/nodejs-iot/commit/a21674225a0b8b0081a43028e3b8c7b3d497d201)) + ## [1.3.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.2.0...v1.3.0) (2019-10-22) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 8358e03a55f..92bc8d9d971 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.3.0", + "version": "1.3.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 65c7227e02c..07c19ebf3fd 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.3.0" + "@google-cloud/iot": "^1.3.1" }, "devDependencies": { "chai": "^4.2.0", From 74b491e70d630b42fd2d295781f12c7edd4bcf67 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 14 Nov 2019 19:20:43 -0800 Subject: [PATCH 144/370] feat: add permissions to testIamPermissions call (#225) --- .../google-cloud-iot/src/v1/device_manager_client.js | 9 +++++++-- .../src/v1/doc/google/iam/v1/doc_policy.js | 11 ++++++----- packages/google-cloud-iot/synth.metadata | 10 +++++----- packages/google-cloud-iot/test/gapic-v1.js | 4 ++++ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js index 174f435157e..bd9bbc38869 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ b/packages/google-cloud-iot/src/v1/device_manager_client.js @@ -1444,7 +1444,7 @@ class DeviceManagerClient { * @param {string} request.resource * REQUIRED: The resource for which the policy detail is being requested. * See the operation documentation for the appropriate value for this field. - * @param {string[]} [request.permissions] + * @param {string[]} request.permissions * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more * information see @@ -1469,7 +1469,12 @@ class DeviceManagerClient { * }); * * const resource = ''; - * client.testIamPermissions({resource: resource}) + * const permissions = []; + * const request = { + * resource: resource, + * permissions: permissions, + * }; + * client.testIamPermissions(request) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js index 57db8df60b1..606cdf98cad 100644 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js @@ -82,12 +82,13 @@ * * Operations affecting conditional bindings must specify version 3. This can * be either setting a conditional policy, modifying a conditional binding, - * or removing a conditional binding from the stored conditional policy. + * or removing a binding (conditional or unconditional) from the stored + * conditional policy. * Operations on non-conditional policies may specify any valid value or * leave the field unset. * - * If no etag is provided in the call to `setIamPolicy`, any version - * compliance checks on the incoming and/or stored policy is skipped. + * If no etag is provided in the call to `setIamPolicy`, version compliance + * checks against the stored policy is skipped. * * @property {Object[]} bindings * Associates a list of `members` to a `role`. Optionally may specify a @@ -107,8 +108,8 @@ * * If no `etag` is provided in the call to `setIamPolicy`, then the existing * policy is overwritten. Due to blind-set semantics of an etag-less policy, - * 'setIamPolicy' will not fail even if either of incoming or stored policy - * does not meet the version requirements. + * 'setIamPolicy' will not fail even if the incoming policy version does not + * meet the requirements for modifying the stored policy. * * @typedef Policy * @memberof google.iam.v1 diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 08814e7711a..144a9b08c76 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-06T12:15:12.407798Z", + "updateTime": "2019-11-14T12:17:35.275146Z", "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": "5691fcb7c1a926b52577aa1834f31d9c50efda54", - "internalRef": "278731899" + "sha": "4f747bda9b099b4426f495985680d16d0227fa5f", + "internalRef": "280394936" } }, { diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js index 01cc4227659..a5e82bbdf77 100644 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ b/packages/google-cloud-iot/test/gapic-v1.js @@ -1082,8 +1082,10 @@ describe('DeviceManagerClient', () => { // Mock request const resource = 'resource-341064690'; + const permissions = []; const request = { resource: resource, + permissions: permissions, }; // Mock response @@ -1110,8 +1112,10 @@ describe('DeviceManagerClient', () => { // Mock request const resource = 'resource-341064690'; + const permissions = []; const request = { resource: resource, + permissions: permissions, }; // Mock Grpc layer From 609b4b75cfc5197bde3de713dc8ff0e031d64119 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 16:29:40 -0800 Subject: [PATCH 145/370] chore: release 1.4.0 (#227) --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 49b2d29ab0c..6be1d5d6858 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.3.1...v1.4.0) (2019-11-15) + + +### Features + +* add permissions to testIamPermissions call ([#225](https://www.github.com/googleapis/nodejs-iot/issues/225)) ([5549944](https://www.github.com/googleapis/nodejs-iot/commit/554994431348f46b618e407c5f75661de2c4f24b)) + ### [1.3.1](https://www.github.com/googleapis/nodejs-iot/compare/v1.3.0...v1.3.1) (2019-11-12) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 92bc8d9d971..20573c20535 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.3.1", + "version": "1.4.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 07c19ebf3fd..0aad5122f03 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.3.1" + "@google-cloud/iot": "^1.4.0" }, "devDependencies": { "chai": "^4.2.0", From 30e4917d5a2d08f305337b5b7e55a7917e9d49e2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 19 Nov 2019 14:28:46 -0800 Subject: [PATCH 146/370] fix(docs): bump the release level to beta (#229) --- packages/google-cloud-iot/.repo-metadata.json | 4 ++-- packages/google-cloud-iot/README.md | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index dc8e57ff327..fa4c736063c 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -3,10 +3,10 @@ "name_pretty": "Google Cloud Internet of Things (IoT) Core", "product_documentation": "https://cloud.google.com/iot", "client_documentation": "https://googleapis.dev/nodejs/iot/latest", - "release_level": "alpha", + "release_level": "beta", "language": "nodejs", "repo": "googleapis/nodejs-iot", "distribution_name": "@google-cloud/iot", "api_id": "cloudiot.googleapis.com", "requires_billing": true -} \ No newline at end of file +} diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 5b942c0aa60..b25b3f2220a 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -4,7 +4,7 @@ # [Google Cloud Internet of Things (IoT) Core: Node.js Client](https://github.com/googleapis/nodejs-iot) -[![release level](https://img.shields.io/badge/release%20level-alpha-orange.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/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) @@ -95,10 +95,11 @@ 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. -This library is considered to be in **alpha**. This means it is still a -work-in-progress and under active development. Any release is subject to -backwards-incompatible changes at any time. From 30d2ee8eeaf29237038befd3821213f8b8977bbe Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 20 Nov 2019 12:51:16 -0800 Subject: [PATCH 147/370] feat: add singular and plural resource descriptors (#230) --- packages/google-cloud-iot/protos/protos.d.ts | 30 ++++++ packages/google-cloud-iot/protos/protos.js | 104 ++++++++++++++++++- packages/google-cloud-iot/protos/protos.json | 44 ++++++-- packages/google-cloud-iot/synth.metadata | 10 +- 4 files changed, 176 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 648e60a318e..1e2eadbb696 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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 { @@ -4669,6 +4684,12 @@ export namespace google { /** ResourceDescriptor history */ history?: (google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); } /** Represents a ResourceDescriptor. */ @@ -4692,6 +4713,12 @@ export namespace google { /** ResourceDescriptor history. */ public history: 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 @@ -6428,6 +6455,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. */ diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 2b5a71d1762..6a02020916f 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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 */ @@ -11034,6 +11048,8 @@ * @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 */ /** @@ -11084,6 +11100,22 @@ */ 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 @@ -11117,6 +11149,10 @@ 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; }; @@ -11165,6 +11201,12 @@ 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; @@ -11222,6 +11264,12 @@ 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; }; @@ -11262,6 +11310,10 @@ message.history = 2; break; } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; @@ -11284,6 +11336,8 @@ 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; @@ -11296,6 +11350,10 @@ 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; }; @@ -15710,6 +15768,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 */ /** @@ -15722,6 +15781,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) @@ -15896,6 +15956,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 @@ -15963,6 +16031,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; }; @@ -16062,6 +16133,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; @@ -16172,6 +16248,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; }; @@ -16249,6 +16334,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; }; @@ -16265,8 +16360,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 = ""; @@ -16334,6 +16431,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; }; diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 07b00289a0d..136353bf2e3 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -1089,6 +1089,12 @@ "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, @@ -1112,6 +1118,14 @@ "history": { "type": "History", "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 } }, "nested": { @@ -2143,11 +2157,18 @@ "fields": { "resource": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } }, "policy": { "type": "Policy", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -2155,10 +2176,14 @@ "fields": { "resource": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } }, "options": { - "type": "google.iam.v1.GetPolicyOptions", + "type": "GetPolicyOptions", "id": 2 } } @@ -2167,12 +2192,19 @@ "fields": { "resource": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } }, "permissions": { "rule": "repeated", "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 144a9b08c76..a6386b8fd8c 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-14T12:17:35.275146Z", + "updateTime": "2019-11-19T12:19:00.663698Z", "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": "4f747bda9b099b4426f495985680d16d0227fa5f", - "internalRef": "280394936" + "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", + "internalRef": "281088257" } }, { From f4bcc74d7533b3dbe86c32ab75752138532cdbca Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2019 13:00:26 -0800 Subject: [PATCH 148/370] chore: release 1.5.0 (#232) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-iot/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 6be1d5d6858..cc26823f27d 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.5.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.4.0...v1.5.0) (2019-11-20) + + +### Features + +* add singular and plural resource descriptors ([#230](https://www.github.com/googleapis/nodejs-iot/issues/230)) ([2124a2f](https://www.github.com/googleapis/nodejs-iot/commit/2124a2f4bf8ef74e1d0b09108b8a737a090c3802)) + + +### Bug Fixes + +* **docs:** bump the release level to beta ([#229](https://www.github.com/googleapis/nodejs-iot/issues/229)) ([b62087f](https://www.github.com/googleapis/nodejs-iot/commit/b62087fdb781c9942df72ca3d8c3bedd46eac380)) + ## [1.4.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.3.1...v1.4.0) (2019-11-15) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 20573c20535..7a3ec32a443 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.4.0", + "version": "1.5.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 0aad5122f03..4c9ddd48917 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.4.0" + "@google-cloud/iot": "^1.5.0" }, "devDependencies": { "chai": "^4.2.0", From 8453e3d2f4d92c938a64d74ef5cf612e2a8d69a0 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Thu, 19 Dec 2019 15:00:58 -0800 Subject: [PATCH 149/370] feat: move to typescript code generation (#236) * move code to typescript * run synthtool * pass main service name * feedback --- packages/google-cloud-iot/.jsdoc.js | 2 +- packages/google-cloud-iot/package.json | 40 +- .../google/cloud/common_resources.proto | 52 + packages/google-cloud-iot/protos/protos.d.ts | 4668 +++--- packages/google-cloud-iot/protos/protos.js | 12218 ++++++++-------- packages/google-cloud-iot/protos/protos.json | 1578 +- packages/google-cloud-iot/src/index.js | 94 - packages/google-cloud-iot/src/index.ts | 24 + .../src/v1/device_manager_client.js | 1882 --- .../src/v1/device_manager_client.ts | 2129 +++ .../src/v1/device_manager_client_config.json | 72 +- .../src/v1/device_manager_proto_list.json | 1 + .../src/{browser.js => v1/index.ts} | 12 +- packages/google-cloud-iot/synth.metadata | 326 +- packages/google-cloud-iot/synth.py | 37 +- .../system-test/.eslintrc.yml | 1 + .../{none.js => fixtures/sample/src/index.js} | 16 +- .../fixtures/sample/src/index.ts} | 12 +- .../google-cloud-iot/system-test/install.ts | 50 + .../test/gapic-device_manager-v1.ts | 996 ++ packages/google-cloud-iot/test/gapic-v1.js | 1366 -- packages/google-cloud-iot/tsconfig.json | 19 + packages/google-cloud-iot/tslint.json | 3 + packages/google-cloud-iot/webpack.config.js | 34 +- 24 files changed, 12959 insertions(+), 12673 deletions(-) create mode 100644 packages/google-cloud-iot/protos/google/cloud/common_resources.proto delete mode 100644 packages/google-cloud-iot/src/index.js create mode 100644 packages/google-cloud-iot/src/index.ts delete mode 100644 packages/google-cloud-iot/src/v1/device_manager_client.js create mode 100644 packages/google-cloud-iot/src/v1/device_manager_client.ts rename packages/google-cloud-iot/src/{browser.js => v1/index.ts} (69%) rename packages/google-cloud-iot/system-test/{none.js => fixtures/sample/src/index.js} (57%) rename packages/google-cloud-iot/{src/v1/index.js => system-test/fixtures/sample/src/index.ts} (63%) create mode 100644 packages/google-cloud-iot/system-test/install.ts create mode 100644 packages/google-cloud-iot/test/gapic-device_manager-v1.ts delete mode 100644 packages/google-cloud-iot/test/gapic-v1.js create mode 100644 packages/google-cloud-iot/tsconfig.json create mode 100644 packages/google-cloud-iot/tslint.json diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index b468147c054..5b86f31a3ad 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.jsdoc.js @@ -32,7 +32,7 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src' ], includePattern: '\\.js$' }, diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 7a3ec32a443..19dbbb8839b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -8,10 +8,10 @@ "node": ">=8.10.0" }, "repository": "googleapis/nodejs-iot", - "main": "src/index.js", + "main": "build/src/index.js", "files": [ - "protos", - "src" + "build/protos", + "build/src" ], "keywords": [ "google apis client", @@ -27,32 +27,44 @@ "Cloud IoT API" ], "scripts": { - "test": "nyc mocha", - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "lint": "eslint '**/*.js'", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", + "lint": "gts fix && eslint --fix samples/*.js", "docs": "jsdoc -c .jsdoc.js", - "system-test": "mocha system-test --timeout 600000", - "fix": "eslint --fix '**/*.js'", + "system-test": "mocha build/system-test", + "fix": "gts fix", "docs-test": "linkinator docs", - "predocs-test": "npm run docs" + "predocs-test": "npm run docs", + "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.9.0" }, "devDependencies": { - "codecov": "^3.0.2", + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", "intelli-espower-loader": "^1.0.1", + "gts": "^1.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "nyc": "^14.0.0", "power-assert": "^1.6.0", - "prettier": "^1.13.7" + "prettier": "^1.13.7", + "mocha": "^6.1.4", + "null-loader": "^3.0.0", + "pack-n-play": "^1.0.0-2", + "ts-loader": "^6.2.1", + "typescript": "^3.7.0", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" } } diff --git a/packages/google-cloud-iot/protos/google/cloud/common_resources.proto b/packages/google-cloud-iot/protos/google/cloud/common_resources.proto new file mode 100644 index 00000000000..56c9f800d5e --- /dev/null +++ b/packages/google-cloud-iot/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-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 1e2eadbb696..3343a8349be 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -26,4300 +26,4526 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Represents a DeviceManager */ - class DeviceManager extends $protobuf.rpc.Service { + /** Properties of a Device. */ + interface IDevice { - /** - * Constructs a new DeviceManager 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); + /** Device id */ + id?: (string|null); - /** - * Creates new DeviceManager 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): DeviceManager; + /** Device name */ + name?: (string|null); - /** - * Calls CreateDeviceRegistry. - * @param request CreateDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceRegistry - */ - public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback): void; + /** Device numId */ + numId?: (number|Long|null); - /** - * Calls CreateDeviceRegistry. - * @param request CreateDeviceRegistryRequest message or plain object - * @returns Promise - */ - public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest): Promise; + /** Device credentials */ + credentials?: (google.cloud.iot.v1.IDeviceCredential[]|null); - /** - * Calls GetDeviceRegistry. - * @param request GetDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceRegistry - */ - public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback): void; + /** Device lastHeartbeatTime */ + lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - /** - * Calls GetDeviceRegistry. - * @param request GetDeviceRegistryRequest message or plain object - * @returns Promise - */ - public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest): Promise; + /** Device lastEventTime */ + lastEventTime?: (google.protobuf.ITimestamp|null); - /** - * Calls UpdateDeviceRegistry. - * @param request UpdateDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceRegistry - */ - public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback): void; + /** Device lastStateTime */ + lastStateTime?: (google.protobuf.ITimestamp|null); - /** - * Calls UpdateDeviceRegistry. - * @param request UpdateDeviceRegistryRequest message or plain object - * @returns Promise - */ - public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): Promise; + /** Device lastConfigAckTime */ + lastConfigAckTime?: (google.protobuf.ITimestamp|null); - /** - * Calls DeleteDeviceRegistry. - * @param request DeleteDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback): void; + /** Device lastConfigSendTime */ + lastConfigSendTime?: (google.protobuf.ITimestamp|null); - /** - * Calls DeleteDeviceRegistry. - * @param request DeleteDeviceRegistryRequest message or plain object - * @returns Promise - */ - public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): Promise; + /** Device blocked */ + blocked?: (boolean|null); - /** - * Calls ListDeviceRegistries. - * @param request ListDeviceRegistriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse - */ - public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback): void; + /** Device lastErrorTime */ + lastErrorTime?: (google.protobuf.ITimestamp|null); + + /** Device lastErrorStatus */ + lastErrorStatus?: (google.rpc.IStatus|null); + + /** Device config */ + config?: (google.cloud.iot.v1.IDeviceConfig|null); + + /** Device state */ + state?: (google.cloud.iot.v1.IDeviceState|null); + + /** Device logLevel */ + logLevel?: (google.cloud.iot.v1.LogLevel|null); + + /** Device metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Device gatewayConfig */ + gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + } + + /** Represents a Device. */ + class Device implements IDevice { /** - * Calls ListDeviceRegistries. - * @param request ListDeviceRegistriesRequest message or plain object - * @returns Promise + * Constructs a new Device. + * @param [properties] Properties to set */ - public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest): Promise; + constructor(properties?: google.cloud.iot.v1.IDevice); + + /** Device id. */ + public id: string; + + /** Device name. */ + public name: string; + + /** Device numId. */ + public numId: (number|Long); + + /** Device credentials. */ + public credentials: google.cloud.iot.v1.IDeviceCredential[]; + + /** Device lastHeartbeatTime. */ + public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); + + /** Device lastEventTime. */ + public lastEventTime?: (google.protobuf.ITimestamp|null); + + /** Device lastStateTime. */ + public lastStateTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigAckTime. */ + public lastConfigAckTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigSendTime. */ + public lastConfigSendTime?: (google.protobuf.ITimestamp|null); + + /** Device blocked. */ + public blocked: boolean; + + /** Device lastErrorTime. */ + public lastErrorTime?: (google.protobuf.ITimestamp|null); + + /** Device lastErrorStatus. */ + public lastErrorStatus?: (google.rpc.IStatus|null); + + /** Device config. */ + public config?: (google.cloud.iot.v1.IDeviceConfig|null); + + /** Device state. */ + public state?: (google.cloud.iot.v1.IDeviceState|null); + + /** Device logLevel. */ + public logLevel: google.cloud.iot.v1.LogLevel; + + /** Device metadata. */ + public metadata: { [k: string]: string }; + + /** Device gatewayConfig. */ + public gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); /** - * Calls CreateDevice. - * @param request CreateDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Device + * Creates a new Device instance using the specified properties. + * @param [properties] Properties to set + * @returns Device instance */ - public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceCallback): void; + public static create(properties?: google.cloud.iot.v1.IDevice): google.cloud.iot.v1.Device; /** - * Calls CreateDevice. - * @param request CreateDeviceRequest message or plain object - * @returns Promise + * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @param message Device message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest): Promise; + public static encode(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetDevice. - * @param request GetDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Device + * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @param message Device message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceCallback): void; + public static encodeDelimited(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetDevice. - * @param request GetDeviceRequest message or plain object - * @returns Promise + * Decodes a Device message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.Device; /** - * Calls UpdateDevice. - * @param request UpdateDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Device + * Decodes a Device message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.Device; /** - * Calls UpdateDevice. - * @param request UpdateDeviceRequest message or plain object - * @returns Promise + * Verifies a Device message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteDevice. - * @param request DeleteDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a Device message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Device */ - public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.Device; /** - * Calls DeleteDevice. - * @param request DeleteDeviceRequest message or plain object - * @returns Promise + * Creates a plain object from a Device message. Also converts values to other types if specified. + * @param message Device + * @param [options] Conversion options + * @returns Plain object */ - public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest): Promise; + public static toObject(message: google.cloud.iot.v1.Device, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListDevices. - * @param request ListDevicesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDevicesResponse + * Converts this Device to JSON. + * @returns JSON object */ - public listDevices(request: google.cloud.iot.v1.IListDevicesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDevicesCallback): void; + public toJSON(): { [k: string]: any }; + } - /** - * Calls ListDevices. - * @param request ListDevicesRequest message or plain object - * @returns Promise - */ - public listDevices(request: google.cloud.iot.v1.IListDevicesRequest): Promise; + /** Properties of a GatewayConfig. */ + interface IGatewayConfig { - /** - * Calls ModifyCloudToDeviceConfig. - * @param request ModifyCloudToDeviceConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceConfig - */ - public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, callback: google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback): void; + /** GatewayConfig gatewayType */ + gatewayType?: (google.cloud.iot.v1.GatewayType|null); + + /** GatewayConfig gatewayAuthMethod */ + gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|null); + + /** GatewayConfig lastAccessedGatewayId */ + lastAccessedGatewayId?: (string|null); + + /** GatewayConfig lastAccessedGatewayTime */ + lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GatewayConfig. */ + class GatewayConfig implements IGatewayConfig { /** - * Calls ModifyCloudToDeviceConfig. - * @param request ModifyCloudToDeviceConfigRequest message or plain object - * @returns Promise + * Constructs a new GatewayConfig. + * @param [properties] Properties to set */ - public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): Promise; + constructor(properties?: google.cloud.iot.v1.IGatewayConfig); + + /** GatewayConfig gatewayType. */ + public gatewayType: google.cloud.iot.v1.GatewayType; + + /** GatewayConfig gatewayAuthMethod. */ + public gatewayAuthMethod: google.cloud.iot.v1.GatewayAuthMethod; + + /** GatewayConfig lastAccessedGatewayId. */ + public lastAccessedGatewayId: string; + + /** GatewayConfig lastAccessedGatewayTime. */ + public lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); /** - * Calls ListDeviceConfigVersions. - * @param request ListDeviceConfigVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse + * Creates a new GatewayConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GatewayConfig instance */ - public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback): void; + public static create(properties?: google.cloud.iot.v1.IGatewayConfig): google.cloud.iot.v1.GatewayConfig; /** - * Calls ListDeviceConfigVersions. - * @param request ListDeviceConfigVersionsRequest message or plain object - * @returns Promise + * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @param message GatewayConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): Promise; + public static encode(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListDeviceStates. - * @param request ListDeviceStatesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceStatesResponse + * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @param message GatewayConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback): void; + public static encodeDelimited(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListDeviceStates. - * @param request ListDeviceStatesRequest message or plain object - * @returns Promise + * Decodes a GatewayConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayConfig; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayConfig; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise + * Verifies a GatewayConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatewayConfig */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayConfig; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. + * @param message GatewayConfig + * @param [options] Conversion options + * @returns Plain object */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + public static toObject(message: google.cloud.iot.v1.GatewayConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * Converts this GatewayConfig to JSON. + * @returns JSON object */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceRegistry. */ + interface IDeviceRegistry { + + /** DeviceRegistry id */ + id?: (string|null); + + /** DeviceRegistry name */ + name?: (string|null); + + /** DeviceRegistry eventNotificationConfigs */ + eventNotificationConfigs?: (google.cloud.iot.v1.IEventNotificationConfig[]|null); + + /** DeviceRegistry stateNotificationConfig */ + stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + + /** DeviceRegistry mqttConfig */ + mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + + /** DeviceRegistry httpConfig */ + httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + + /** DeviceRegistry logLevel */ + logLevel?: (google.cloud.iot.v1.LogLevel|null); + + /** DeviceRegistry credentials */ + credentials?: (google.cloud.iot.v1.IRegistryCredential[]|null); + } + + /** Represents a DeviceRegistry. */ + class DeviceRegistry implements IDeviceRegistry { /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise + * Constructs a new DeviceRegistry. + * @param [properties] Properties to set */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + constructor(properties?: google.cloud.iot.v1.IDeviceRegistry); + + /** DeviceRegistry id. */ + public id: string; + + /** DeviceRegistry name. */ + public name: string; + + /** DeviceRegistry eventNotificationConfigs. */ + public eventNotificationConfigs: google.cloud.iot.v1.IEventNotificationConfig[]; + + /** DeviceRegistry stateNotificationConfig. */ + public stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + + /** DeviceRegistry mqttConfig. */ + public mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + + /** DeviceRegistry httpConfig. */ + public httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + + /** DeviceRegistry logLevel. */ + public logLevel: google.cloud.iot.v1.LogLevel; + + /** DeviceRegistry credentials. */ + public credentials: google.cloud.iot.v1.IRegistryCredential[]; /** - * Calls SendCommandToDevice. - * @param request SendCommandToDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse + * Creates a new DeviceRegistry instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceRegistry instance */ - public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback): void; + public static create(properties?: google.cloud.iot.v1.IDeviceRegistry): google.cloud.iot.v1.DeviceRegistry; /** - * Calls SendCommandToDevice. - * @param request SendCommandToDeviceRequest message or plain object - * @returns Promise + * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @param message DeviceRegistry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest): Promise; + public static encode(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls BindDeviceToGateway. - * @param request BindDeviceToGatewayRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse + * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @param message DeviceRegistry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback): void; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls BindDeviceToGateway. - * @param request BindDeviceToGatewayRequest message or plain object - * @returns Promise + * Decodes a DeviceRegistry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceRegistry; /** - * Calls UnbindDeviceFromGateway. - * @param request UnbindDeviceFromGatewayRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse + * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceRegistry; /** - * Calls UnbindDeviceFromGateway. - * @param request UnbindDeviceFromGatewayRequest message or plain object - * @returns Promise + * Verifies a DeviceRegistry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): Promise; - } - - namespace DeviceManager { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. - * @param error Error, if any - * @param [response] DeviceRegistry + * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceRegistry */ - type CreateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceRegistry; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. - * @param error Error, if any - * @param [response] DeviceRegistry - */ - type GetDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. - * @param error Error, if any - * @param [response] DeviceRegistry - */ - type UpdateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. + * @param message DeviceRegistry + * @param [options] Conversion options + * @returns Plain object */ - type DeleteDeviceRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.cloud.iot.v1.DeviceRegistry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. - * @param error Error, if any - * @param [response] ListDeviceRegistriesResponse + * Converts this DeviceRegistry to JSON. + * @returns JSON object */ - type ListDeviceRegistriesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceRegistriesResponse) => void; + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. - * @param error Error, if any - * @param [response] Device - */ - type CreateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + /** Properties of a MqttConfig. */ + interface IMqttConfig { - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. - * @param error Error, if any - * @param [response] Device - */ - type GetDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + /** MqttConfig mqttEnabledState */ + mqttEnabledState?: (google.cloud.iot.v1.MqttState|null); + } - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. - * @param error Error, if any - * @param [response] Device - */ - type UpdateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + /** Represents a MqttConfig. */ + class MqttConfig implements IMqttConfig { /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. - * @param error Error, if any - * @param [response] Empty + * Constructs a new MqttConfig. + * @param [properties] Properties to set */ - type DeleteDeviceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + constructor(properties?: google.cloud.iot.v1.IMqttConfig); - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. - * @param error Error, if any - * @param [response] ListDevicesResponse - */ - type ListDevicesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDevicesResponse) => void; + /** MqttConfig mqttEnabledState. */ + public mqttEnabledState: google.cloud.iot.v1.MqttState; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. - * @param error Error, if any - * @param [response] DeviceConfig + * Creates a new MqttConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MqttConfig instance */ - type ModifyCloudToDeviceConfigCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceConfig) => void; + public static create(properties?: google.cloud.iot.v1.IMqttConfig): google.cloud.iot.v1.MqttConfig; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. - * @param error Error, if any - * @param [response] ListDeviceConfigVersionsResponse + * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @param message MqttConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListDeviceConfigVersionsCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceConfigVersionsResponse) => void; + public static encode(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. - * @param error Error, if any - * @param [response] ListDeviceStatesResponse + * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @param message MqttConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListDeviceStatesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceStatesResponse) => void; + public static encodeDelimited(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Decodes a MqttConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MqttConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.MqttConfig; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Decodes a MqttConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MqttConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.MqttConfig; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse + * Verifies a MqttConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. - * @param error Error, if any - * @param [response] SendCommandToDeviceResponse + * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MqttConfig */ - type SendCommandToDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.SendCommandToDeviceResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.MqttConfig; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. - * @param error Error, if any - * @param [response] BindDeviceToGatewayResponse + * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. + * @param message MqttConfig + * @param [options] Conversion options + * @returns Plain object */ - type BindDeviceToGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.BindDeviceToGatewayResponse) => void; + public static toObject(message: google.cloud.iot.v1.MqttConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. - * @param error Error, if any - * @param [response] UnbindDeviceFromGatewayResponse + * Converts this MqttConfig to JSON. + * @returns JSON object */ - type UnbindDeviceFromGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a CreateDeviceRegistryRequest. */ - interface ICreateDeviceRegistryRequest { + /** MqttState enum. */ + enum MqttState { + MQTT_STATE_UNSPECIFIED = 0, + MQTT_ENABLED = 1, + MQTT_DISABLED = 2 + } - /** CreateDeviceRegistryRequest parent */ - parent?: (string|null); + /** Properties of a HttpConfig. */ + interface IHttpConfig { - /** CreateDeviceRegistryRequest deviceRegistry */ - deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** HttpConfig httpEnabledState */ + httpEnabledState?: (google.cloud.iot.v1.HttpState|null); } - /** Represents a CreateDeviceRegistryRequest. */ - class CreateDeviceRegistryRequest implements ICreateDeviceRegistryRequest { + /** Represents a HttpConfig. */ + class HttpConfig implements IHttpConfig { /** - * Constructs a new CreateDeviceRegistryRequest. + * Constructs a new HttpConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest); - - /** CreateDeviceRegistryRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.iot.v1.IHttpConfig); - /** CreateDeviceRegistryRequest deviceRegistry. */ - public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** HttpConfig httpEnabledState. */ + public httpEnabledState: google.cloud.iot.v1.HttpState; /** - * Creates a new CreateDeviceRegistryRequest instance using the specified properties. + * Creates a new HttpConfig instance using the specified properties. * @param [properties] Properties to set - * @returns CreateDeviceRegistryRequest instance + * @returns HttpConfig instance */ - public static create(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.IHttpConfig): google.cloud.iot.v1.HttpConfig; /** - * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. - * @param message CreateDeviceRegistryRequest message or plain object to encode + * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @param message HttpConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. - * @param message CreateDeviceRegistryRequest message or plain object to encode + * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @param message HttpConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a HttpConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateDeviceRegistryRequest + * @returns HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.HttpConfig; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateDeviceRegistryRequest + * @returns HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.HttpConfig; /** - * Verifies a CreateDeviceRegistryRequest message. + * Verifies a HttpConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateDeviceRegistryRequest + * @returns HttpConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.HttpConfig; /** - * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message CreateDeviceRegistryRequest + * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. + * @param message HttpConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.CreateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.HttpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDeviceRegistryRequest to JSON. + * Converts this HttpConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetDeviceRegistryRequest. */ - interface IGetDeviceRegistryRequest { + /** HttpState enum. */ + enum HttpState { + HTTP_STATE_UNSPECIFIED = 0, + HTTP_ENABLED = 1, + HTTP_DISABLED = 2 + } - /** GetDeviceRegistryRequest name */ - name?: (string|null); + /** LogLevel enum. */ + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0, + NONE = 10, + ERROR = 20, + INFO = 30, + DEBUG = 40 } - /** Represents a GetDeviceRegistryRequest. */ - class GetDeviceRegistryRequest implements IGetDeviceRegistryRequest { + /** GatewayType enum. */ + enum GatewayType { + GATEWAY_TYPE_UNSPECIFIED = 0, + GATEWAY = 1, + NON_GATEWAY = 2 + } - /** - * Constructs a new GetDeviceRegistryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest); + /** GatewayAuthMethod enum. */ + enum GatewayAuthMethod { + GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, + ASSOCIATION_ONLY = 1, + DEVICE_AUTH_TOKEN_ONLY = 2, + ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 + } - /** GetDeviceRegistryRequest name. */ - public name: string; + /** Properties of an EventNotificationConfig. */ + interface IEventNotificationConfig { + + /** EventNotificationConfig subfolderMatches */ + subfolderMatches?: (string|null); + + /** EventNotificationConfig pubsubTopicName */ + pubsubTopicName?: (string|null); + } + + /** Represents an EventNotificationConfig. */ + class EventNotificationConfig implements IEventNotificationConfig { /** - * Creates a new GetDeviceRegistryRequest instance using the specified properties. + * Constructs a new EventNotificationConfig. * @param [properties] Properties to set - * @returns GetDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest): google.cloud.iot.v1.GetDeviceRegistryRequest; + constructor(properties?: google.cloud.iot.v1.IEventNotificationConfig); + + /** EventNotificationConfig subfolderMatches. */ + public subfolderMatches: string; + + /** EventNotificationConfig pubsubTopicName. */ + public pubsubTopicName: string; /** - * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. - * @param message GetDeviceRegistryRequest message or plain object to encode + * Creates a new EventNotificationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EventNotificationConfig instance + */ + public static create(properties?: google.cloud.iot.v1.IEventNotificationConfig): google.cloud.iot.v1.EventNotificationConfig; + + /** + * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @param message EventNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. - * @param message GetDeviceRegistryRequest message or plain object to encode + * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @param message EventNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. + * Decodes an EventNotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeviceRegistryRequest + * @returns EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.EventNotificationConfig; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeviceRegistryRequest + * @returns EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.EventNotificationConfig; /** - * Verifies a GetDeviceRegistryRequest message. + * Verifies an EventNotificationConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeviceRegistryRequest + * @returns EventNotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.EventNotificationConfig; /** - * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message GetDeviceRegistryRequest + * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. + * @param message EventNotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.GetDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.EventNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeviceRegistryRequest to JSON. + * Converts this EventNotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDeviceRegistryRequest. */ - interface IDeleteDeviceRegistryRequest { + /** Properties of a StateNotificationConfig. */ + interface IStateNotificationConfig { - /** DeleteDeviceRegistryRequest name */ - name?: (string|null); + /** StateNotificationConfig pubsubTopicName */ + pubsubTopicName?: (string|null); } - /** Represents a DeleteDeviceRegistryRequest. */ - class DeleteDeviceRegistryRequest implements IDeleteDeviceRegistryRequest { + /** Represents a StateNotificationConfig. */ + class StateNotificationConfig implements IStateNotificationConfig { /** - * Constructs a new DeleteDeviceRegistryRequest. + * Constructs a new StateNotificationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest); + constructor(properties?: google.cloud.iot.v1.IStateNotificationConfig); - /** DeleteDeviceRegistryRequest name. */ - public name: string; + /** StateNotificationConfig pubsubTopicName. */ + public pubsubTopicName: string; /** - * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. + * Creates a new StateNotificationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDeviceRegistryRequest instance + * @returns StateNotificationConfig instance */ - public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.IStateNotificationConfig): google.cloud.iot.v1.StateNotificationConfig; /** - * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. - * @param message DeleteDeviceRegistryRequest message or plain object to encode + * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @param message StateNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. - * @param message DeleteDeviceRegistryRequest message or plain object to encode + * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @param message StateNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a StateNotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDeviceRegistryRequest + * @returns StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.StateNotificationConfig; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDeviceRegistryRequest + * @returns StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.StateNotificationConfig; /** - * Verifies a DeleteDeviceRegistryRequest message. + * Verifies a StateNotificationConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDeviceRegistryRequest + * @returns StateNotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.StateNotificationConfig; /** - * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message DeleteDeviceRegistryRequest + * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. + * @param message StateNotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeleteDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.StateNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDeviceRegistryRequest to JSON. + * Converts this StateNotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateDeviceRegistryRequest. */ - interface IUpdateDeviceRegistryRequest { - - /** UpdateDeviceRegistryRequest deviceRegistry */ - deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** Properties of a RegistryCredential. */ + interface IRegistryCredential { - /** UpdateDeviceRegistryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** RegistryCredential publicKeyCertificate */ + publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); } - /** Represents an UpdateDeviceRegistryRequest. */ - class UpdateDeviceRegistryRequest implements IUpdateDeviceRegistryRequest { + /** Represents a RegistryCredential. */ + class RegistryCredential implements IRegistryCredential { /** - * Constructs a new UpdateDeviceRegistryRequest. + * Constructs a new RegistryCredential. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest); + constructor(properties?: google.cloud.iot.v1.IRegistryCredential); - /** UpdateDeviceRegistryRequest deviceRegistry. */ - public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** RegistryCredential publicKeyCertificate. */ + public publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); - /** UpdateDeviceRegistryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** RegistryCredential credential. */ + public credential?: "publicKeyCertificate"; /** - * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. + * Creates a new RegistryCredential instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDeviceRegistryRequest instance + * @returns RegistryCredential instance */ - public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.IRegistryCredential): google.cloud.iot.v1.RegistryCredential; /** - * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. - * @param message UpdateDeviceRegistryRequest message or plain object to encode + * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @param message RegistryCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. - * @param message UpdateDeviceRegistryRequest message or plain object to encode + * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @param message RegistryCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a RegistryCredential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateDeviceRegistryRequest + * @returns RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.RegistryCredential; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDeviceRegistryRequest + * @returns RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.RegistryCredential; /** - * Verifies an UpdateDeviceRegistryRequest message. + * Verifies a RegistryCredential message. * @param message Plain 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 UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDeviceRegistryRequest + * @returns RegistryCredential */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.RegistryCredential; /** - * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message UpdateDeviceRegistryRequest + * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. + * @param message RegistryCredential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.UpdateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.RegistryCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDeviceRegistryRequest to JSON. + * Converts this RegistryCredential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceRegistriesRequest. */ - interface IListDeviceRegistriesRequest { + /** Properties of a X509CertificateDetails. */ + interface IX509CertificateDetails { - /** ListDeviceRegistriesRequest parent */ - parent?: (string|null); + /** X509CertificateDetails issuer */ + issuer?: (string|null); - /** ListDeviceRegistriesRequest pageSize */ - pageSize?: (number|null); + /** X509CertificateDetails subject */ + subject?: (string|null); - /** ListDeviceRegistriesRequest pageToken */ - pageToken?: (string|null); + /** X509CertificateDetails startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails expiryTime */ + expiryTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails signatureAlgorithm */ + signatureAlgorithm?: (string|null); + + /** X509CertificateDetails publicKeyType */ + publicKeyType?: (string|null); } - /** Represents a ListDeviceRegistriesRequest. */ - class ListDeviceRegistriesRequest implements IListDeviceRegistriesRequest { + /** Represents a X509CertificateDetails. */ + class X509CertificateDetails implements IX509CertificateDetails { /** - * Constructs a new ListDeviceRegistriesRequest. + * Constructs a new X509CertificateDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest); + constructor(properties?: google.cloud.iot.v1.IX509CertificateDetails); - /** ListDeviceRegistriesRequest parent. */ - public parent: string; + /** X509CertificateDetails issuer. */ + public issuer: string; - /** ListDeviceRegistriesRequest pageSize. */ - public pageSize: number; + /** X509CertificateDetails subject. */ + public subject: string; - /** ListDeviceRegistriesRequest pageToken. */ - public pageToken: string; + /** X509CertificateDetails startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails expiryTime. */ + public expiryTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails signatureAlgorithm. */ + public signatureAlgorithm: string; + + /** X509CertificateDetails publicKeyType. */ + public publicKeyType: string; /** - * Creates a new ListDeviceRegistriesRequest instance using the specified properties. + * Creates a new X509CertificateDetails instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceRegistriesRequest instance + * @returns X509CertificateDetails instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static create(properties?: google.cloud.iot.v1.IX509CertificateDetails): google.cloud.iot.v1.X509CertificateDetails; /** - * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. - * @param message ListDeviceRegistriesRequest message or plain object to encode + * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @param message X509CertificateDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. - * @param message ListDeviceRegistriesRequest message or plain object to encode + * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @param message X509CertificateDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. + * Decodes a X509CertificateDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceRegistriesRequest + * @returns X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.X509CertificateDetails; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. + * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceRegistriesRequest + * @returns X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.X509CertificateDetails; /** - * Verifies a ListDeviceRegistriesRequest message. + * Verifies a X509CertificateDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceRegistriesRequest + * @returns X509CertificateDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.X509CertificateDetails; /** - * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. - * @param message ListDeviceRegistriesRequest + * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. + * @param message X509CertificateDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.X509CertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceRegistriesRequest to JSON. + * Converts this X509CertificateDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceRegistriesResponse. */ - interface IListDeviceRegistriesResponse { + /** Properties of a PublicKeyCertificate. */ + interface IPublicKeyCertificate { - /** ListDeviceRegistriesResponse deviceRegistries */ - deviceRegistries?: (google.cloud.iot.v1.IDeviceRegistry[]|null); + /** PublicKeyCertificate format */ + format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|null); - /** ListDeviceRegistriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** PublicKeyCertificate certificate */ + certificate?: (string|null); + + /** PublicKeyCertificate x509Details */ + x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); } - /** Represents a ListDeviceRegistriesResponse. */ - class ListDeviceRegistriesResponse implements IListDeviceRegistriesResponse { + /** Represents a PublicKeyCertificate. */ + class PublicKeyCertificate implements IPublicKeyCertificate { /** - * Constructs a new ListDeviceRegistriesResponse. + * Constructs a new PublicKeyCertificate. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse); + constructor(properties?: google.cloud.iot.v1.IPublicKeyCertificate); - /** ListDeviceRegistriesResponse deviceRegistries. */ - public deviceRegistries: google.cloud.iot.v1.IDeviceRegistry[]; + /** PublicKeyCertificate format. */ + public format: google.cloud.iot.v1.PublicKeyCertificateFormat; - /** ListDeviceRegistriesResponse nextPageToken. */ - public nextPageToken: string; + /** PublicKeyCertificate certificate. */ + public certificate: string; + + /** PublicKeyCertificate x509Details. */ + public x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); /** - * Creates a new ListDeviceRegistriesResponse instance using the specified properties. + * Creates a new PublicKeyCertificate instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceRegistriesResponse instance + * @returns PublicKeyCertificate instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static create(properties?: google.cloud.iot.v1.IPublicKeyCertificate): google.cloud.iot.v1.PublicKeyCertificate; /** - * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. - * @param message ListDeviceRegistriesResponse message or plain object to encode + * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @param message PublicKeyCertificate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. - * @param message ListDeviceRegistriesResponse message or plain object to encode + * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @param message PublicKeyCertificate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. + * Decodes a PublicKeyCertificate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceRegistriesResponse + * @returns PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCertificate; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceRegistriesResponse + * @returns PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCertificate; /** - * Verifies a ListDeviceRegistriesResponse message. + * Verifies a PublicKeyCertificate message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceRegistriesResponse + * @returns PublicKeyCertificate */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCertificate; /** - * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. - * @param message ListDeviceRegistriesResponse + * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. + * @param message PublicKeyCertificate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.PublicKeyCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceRegistriesResponse to JSON. + * Converts this PublicKeyCertificate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateDeviceRequest. */ - interface ICreateDeviceRequest { + /** PublicKeyCertificateFormat enum. */ + enum PublicKeyCertificateFormat { + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, + X509_CERTIFICATE_PEM = 1 + } - /** CreateDeviceRequest parent */ - parent?: (string|null); + /** Properties of a DeviceCredential. */ + interface IDeviceCredential { - /** CreateDeviceRequest device */ - device?: (google.cloud.iot.v1.IDevice|null); + /** DeviceCredential publicKey */ + publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + + /** DeviceCredential expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); } - /** Represents a CreateDeviceRequest. */ - class CreateDeviceRequest implements ICreateDeviceRequest { + /** Represents a DeviceCredential. */ + class DeviceCredential implements IDeviceCredential { /** - * Constructs a new CreateDeviceRequest. + * Constructs a new DeviceCredential. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ICreateDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IDeviceCredential); - /** CreateDeviceRequest parent. */ - public parent: string; + /** DeviceCredential publicKey. */ + public publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); - /** CreateDeviceRequest device. */ - public device?: (google.cloud.iot.v1.IDevice|null); + /** DeviceCredential expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** DeviceCredential credential. */ + public credential?: "publicKey"; /** - * Creates a new CreateDeviceRequest instance using the specified properties. + * Creates a new DeviceCredential instance using the specified properties. * @param [properties] Properties to set - * @returns CreateDeviceRequest instance + * @returns DeviceCredential instance */ - public static create(properties?: google.cloud.iot.v1.ICreateDeviceRequest): google.cloud.iot.v1.CreateDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IDeviceCredential): google.cloud.iot.v1.DeviceCredential; /** - * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. - * @param message CreateDeviceRequest message or plain object to encode + * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @param message DeviceCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. - * @param message CreateDeviceRequest message or plain object to encode + * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @param message DeviceCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer. + * Decodes a DeviceCredential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateDeviceRequest + * @returns DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceCredential; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateDeviceRequest + * @returns DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceCredential; /** - * Verifies a CreateDeviceRequest message. + * Verifies a DeviceCredential message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateDeviceRequest + * @returns DeviceCredential */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceCredential; /** - * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. - * @param message CreateDeviceRequest + * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. + * @param message DeviceCredential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.CreateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeviceCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDeviceRequest to JSON. + * Converts this DeviceCredential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetDeviceRequest. */ - interface IGetDeviceRequest { + /** Properties of a PublicKeyCredential. */ + interface IPublicKeyCredential { - /** GetDeviceRequest name */ - name?: (string|null); + /** PublicKeyCredential format */ + format?: (google.cloud.iot.v1.PublicKeyFormat|null); - /** GetDeviceRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** PublicKeyCredential key */ + key?: (string|null); } - /** Represents a GetDeviceRequest. */ - class GetDeviceRequest implements IGetDeviceRequest { + /** Represents a PublicKeyCredential. */ + class PublicKeyCredential implements IPublicKeyCredential { /** - * Constructs a new GetDeviceRequest. + * Constructs a new PublicKeyCredential. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IGetDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IPublicKeyCredential); - /** GetDeviceRequest name. */ - public name: string; + /** PublicKeyCredential format. */ + public format: google.cloud.iot.v1.PublicKeyFormat; - /** GetDeviceRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** PublicKeyCredential key. */ + public key: string; /** - * Creates a new GetDeviceRequest instance using the specified properties. + * Creates a new PublicKeyCredential instance using the specified properties. * @param [properties] Properties to set - * @returns GetDeviceRequest instance + * @returns PublicKeyCredential instance */ - public static create(properties?: google.cloud.iot.v1.IGetDeviceRequest): google.cloud.iot.v1.GetDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IPublicKeyCredential): google.cloud.iot.v1.PublicKeyCredential; /** - * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. - * @param message GetDeviceRequest message or plain object to encode + * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @param message PublicKeyCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. - * @param message GetDeviceRequest message or plain object to encode + * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @param message PublicKeyCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer. + * Decodes a PublicKeyCredential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeviceRequest + * @returns PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCredential; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeviceRequest + * @returns PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCredential; /** - * Verifies a GetDeviceRequest message. + * Verifies a PublicKeyCredential message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeviceRequest + * @returns PublicKeyCredential */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCredential; /** - * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. - * @param message GetDeviceRequest + * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. + * @param message PublicKeyCredential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.GetDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.PublicKeyCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeviceRequest to JSON. + * Converts this PublicKeyCredential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateDeviceRequest. */ - interface IUpdateDeviceRequest { + /** PublicKeyFormat enum. */ + enum PublicKeyFormat { + UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, + RSA_PEM = 3, + RSA_X509_PEM = 1, + ES256_PEM = 2, + ES256_X509_PEM = 4 + } - /** UpdateDeviceRequest device */ - device?: (google.cloud.iot.v1.IDevice|null); + /** Properties of a DeviceConfig. */ + interface IDeviceConfig { - /** UpdateDeviceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeviceConfig version */ + version?: (number|Long|null); + + /** DeviceConfig cloudUpdateTime */ + cloudUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig deviceAckTime */ + deviceAckTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig binaryData */ + binaryData?: (Uint8Array|null); } - /** Represents an UpdateDeviceRequest. */ - class UpdateDeviceRequest implements IUpdateDeviceRequest { + /** Represents a DeviceConfig. */ + class DeviceConfig implements IDeviceConfig { /** - * Constructs a new UpdateDeviceRequest. + * Constructs a new DeviceConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IDeviceConfig); - /** UpdateDeviceRequest device. */ - public device?: (google.cloud.iot.v1.IDevice|null); + /** DeviceConfig version. */ + public version: (number|Long); - /** UpdateDeviceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeviceConfig cloudUpdateTime. */ + public cloudUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig deviceAckTime. */ + public deviceAckTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig binaryData. */ + public binaryData: Uint8Array; /** - * Creates a new UpdateDeviceRequest instance using the specified properties. + * Creates a new DeviceConfig instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDeviceRequest instance + * @returns DeviceConfig instance */ - public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRequest): google.cloud.iot.v1.UpdateDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IDeviceConfig): google.cloud.iot.v1.DeviceConfig; /** - * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. - * @param message UpdateDeviceRequest message or plain object to encode + * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @param message DeviceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. - * @param message UpdateDeviceRequest message or plain object to encode + * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @param message DeviceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * Decodes a DeviceConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateDeviceRequest + * @returns DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceConfig; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDeviceRequest + * @returns DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceConfig; /** - * Verifies an UpdateDeviceRequest message. + * Verifies a DeviceConfig message. * @param message Plain 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 UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDeviceRequest + * @returns DeviceConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceConfig; /** - * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. - * @param message UpdateDeviceRequest + * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. + * @param message DeviceConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.UpdateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeviceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDeviceRequest to JSON. + * Converts this DeviceConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDeviceRequest. */ - interface IDeleteDeviceRequest { + /** Properties of a DeviceState. */ + interface IDeviceState { - /** DeleteDeviceRequest name */ - name?: (string|null); + /** DeviceState updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceState binaryData */ + binaryData?: (Uint8Array|null); } - /** Represents a DeleteDeviceRequest. */ - class DeleteDeviceRequest implements IDeleteDeviceRequest { + /** Represents a DeviceState. */ + class DeviceState implements IDeviceState { /** - * Constructs a new DeleteDeviceRequest. + * Constructs a new DeviceState. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IDeviceState); - /** DeleteDeviceRequest name. */ - public name: string; + /** DeviceState updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceState binaryData. */ + public binaryData: Uint8Array; /** - * Creates a new DeleteDeviceRequest instance using the specified properties. + * Creates a new DeviceState instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDeviceRequest instance + * @returns DeviceState instance */ - public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRequest): google.cloud.iot.v1.DeleteDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IDeviceState): google.cloud.iot.v1.DeviceState; /** - * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. - * @param message DeleteDeviceRequest message or plain object to encode + * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @param message DeviceState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. - * @param message DeleteDeviceRequest message or plain object to encode + * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @param message DeviceState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer. + * Decodes a DeviceState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDeviceRequest + * @returns DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceState; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDeviceRequest + * @returns DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceState; /** - * Verifies a DeleteDeviceRequest message. + * Verifies a DeviceState message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDeviceRequest + * @returns DeviceState */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceState; /** - * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. - * @param message DeleteDeviceRequest + * Creates a plain object from a DeviceState message. Also converts values to other types if specified. + * @param message DeviceState * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeleteDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeviceState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDeviceRequest to JSON. + * Converts this DeviceState to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDevicesRequest. */ - interface IListDevicesRequest { - - /** ListDevicesRequest parent */ - parent?: (string|null); - - /** ListDevicesRequest deviceNumIds */ - deviceNumIds?: ((number|Long)[]|null); - - /** ListDevicesRequest deviceIds */ - deviceIds?: (string[]|null); - - /** ListDevicesRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListDevicesRequest gatewayListOptions */ - gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); - - /** ListDevicesRequest pageSize */ - pageSize?: (number|null); - - /** ListDevicesRequest pageToken */ - pageToken?: (string|null); - } + /** Represents a DeviceManager */ + class DeviceManager extends $protobuf.rpc.Service { - /** Represents a ListDevicesRequest. */ - class ListDevicesRequest implements IListDevicesRequest { + /** + * Constructs a new DeviceManager 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); /** - * Constructs a new ListDevicesRequest. - * @param [properties] Properties to set + * Creates new DeviceManager 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. */ - constructor(properties?: google.cloud.iot.v1.IListDevicesRequest); - - /** ListDevicesRequest parent. */ - public parent: string; - - /** ListDevicesRequest deviceNumIds. */ - public deviceNumIds: (number|Long)[]; - - /** ListDevicesRequest deviceIds. */ - public deviceIds: string[]; - - /** ListDevicesRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListDevicesRequest gatewayListOptions. */ - public gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); - - /** ListDevicesRequest pageSize. */ - public pageSize: number; - - /** ListDevicesRequest pageToken. */ - public pageToken: string; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DeviceManager; /** - * Creates a new ListDevicesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDevicesRequest instance + * Calls CreateDeviceRegistry. + * @param request CreateDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry */ - public static create(properties?: google.cloud.iot.v1.IListDevicesRequest): google.cloud.iot.v1.ListDevicesRequest; + public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback): void; /** - * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. - * @param message ListDevicesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateDeviceRegistry. + * @param request CreateDeviceRegistryRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest): Promise; /** - * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. - * @param message ListDevicesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetDeviceRegistry. + * @param request GetDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback): void; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDevicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetDeviceRegistry. + * @param request GetDeviceRegistryRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesRequest; + public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest): Promise; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDevicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateDeviceRegistry. + * @param request UpdateDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesRequest; + public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback): void; /** - * Verifies a ListDevicesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateDeviceRegistry. + * @param request UpdateDeviceRegistryRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): Promise; /** - * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDevicesRequest + * Calls DeleteDeviceRegistry. + * @param request DeleteDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesRequest; + public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback): void; /** - * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. - * @param message ListDevicesRequest - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteDeviceRegistry. + * @param request DeleteDeviceRegistryRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.iot.v1.ListDevicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): Promise; /** - * Converts this ListDevicesRequest to JSON. - * @returns JSON object + * Calls ListDeviceRegistries. + * @param request ListDeviceRegistriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GatewayListOptions. */ - interface IGatewayListOptions { - - /** GatewayListOptions gatewayType */ - gatewayType?: (google.cloud.iot.v1.GatewayType|null); - - /** GatewayListOptions associationsGatewayId */ - associationsGatewayId?: (string|null); - - /** GatewayListOptions associationsDeviceId */ - associationsDeviceId?: (string|null); - } - - /** Represents a GatewayListOptions. */ - class GatewayListOptions implements IGatewayListOptions { + public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback): void; /** - * Constructs a new GatewayListOptions. - * @param [properties] Properties to set + * Calls ListDeviceRegistries. + * @param request ListDeviceRegistriesRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); - - /** GatewayListOptions gatewayType. */ - public gatewayType: google.cloud.iot.v1.GatewayType; - - /** GatewayListOptions associationsGatewayId. */ - public associationsGatewayId: string; - - /** GatewayListOptions associationsDeviceId. */ - public associationsDeviceId: string; - - /** GatewayListOptions filter. */ - public filter?: ("gatewayType"|"associationsGatewayId"|"associationsDeviceId"); + public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest): Promise; /** - * Creates a new GatewayListOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns GatewayListOptions instance + * Calls CreateDevice. + * @param request CreateDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device */ - public static create(properties?: google.cloud.iot.v1.IGatewayListOptions): google.cloud.iot.v1.GatewayListOptions; + public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceCallback): void; /** - * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. - * @param message GatewayListOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateDevice. + * @param request CreateDeviceRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest): Promise; /** - * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. - * @param message GatewayListOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetDevice. + * @param request GetDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device */ - public static encodeDelimited(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceCallback): void; /** - * Decodes a GatewayListOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GatewayListOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetDevice. + * @param request GetDeviceRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayListOptions; + public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest): Promise; /** - * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GatewayListOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateDevice. + * @param request UpdateDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayListOptions; + public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback): void; /** - * Verifies a GatewayListOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateDevice. + * @param request UpdateDeviceRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest): Promise; /** - * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GatewayListOptions + * Calls DeleteDevice. + * @param request DeleteDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayListOptions; + public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback): void; /** - * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. - * @param message GatewayListOptions - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteDevice. + * @param request DeleteDeviceRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.iot.v1.GatewayListOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest): Promise; /** - * Converts this GatewayListOptions to JSON. - * @returns JSON object + * Calls ListDevices. + * @param request ListDevicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDevicesResponse */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListDevicesResponse. */ - interface IListDevicesResponse { - - /** ListDevicesResponse devices */ - devices?: (google.cloud.iot.v1.IDevice[]|null); - - /** ListDevicesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListDevicesResponse. */ - class ListDevicesResponse implements IListDevicesResponse { + public listDevices(request: google.cloud.iot.v1.IListDevicesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDevicesCallback): void; /** - * Constructs a new ListDevicesResponse. - * @param [properties] Properties to set + * Calls ListDevices. + * @param request ListDevicesRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.iot.v1.IListDevicesResponse); - - /** ListDevicesResponse devices. */ - public devices: google.cloud.iot.v1.IDevice[]; - - /** ListDevicesResponse nextPageToken. */ - public nextPageToken: string; + public listDevices(request: google.cloud.iot.v1.IListDevicesRequest): Promise; /** - * Creates a new ListDevicesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDevicesResponse instance + * Calls ModifyCloudToDeviceConfig. + * @param request ModifyCloudToDeviceConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceConfig */ - public static create(properties?: google.cloud.iot.v1.IListDevicesResponse): google.cloud.iot.v1.ListDevicesResponse; + public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, callback: google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback): void; /** - * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. - * @param message ListDevicesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ModifyCloudToDeviceConfig. + * @param request ModifyCloudToDeviceConfigRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. - * @param message ListDevicesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): Promise; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDevicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListDeviceConfigVersions. + * @param request ListDeviceConfigVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesResponse; + public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback): void; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDevicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListDeviceConfigVersions. + * @param request ListDeviceConfigVersionsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesResponse; + public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): Promise; /** - * Verifies a ListDevicesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListDeviceStates. + * @param request ListDeviceStatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceStatesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback): void; /** - * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDevicesResponse + * Calls ListDeviceStates. + * @param request ListDeviceStatesRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesResponse; + public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest): Promise; /** - * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. - * @param message ListDevicesResponse - * @param [options] Conversion options - * @returns Plain object + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static toObject(message: google.cloud.iot.v1.ListDevicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback): void; /** - * Converts this ListDevicesResponse to JSON. - * @returns JSON object + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ModifyCloudToDeviceConfigRequest. */ - interface IModifyCloudToDeviceConfigRequest { - - /** ModifyCloudToDeviceConfigRequest name */ - name?: (string|null); - - /** ModifyCloudToDeviceConfigRequest versionToUpdate */ - versionToUpdate?: (number|Long|null); - - /** ModifyCloudToDeviceConfigRequest binaryData */ - binaryData?: (Uint8Array|null); - } - - /** Represents a ModifyCloudToDeviceConfigRequest. */ - class ModifyCloudToDeviceConfigRequest implements IModifyCloudToDeviceConfigRequest { + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; /** - * Constructs a new ModifyCloudToDeviceConfigRequest. - * @param [properties] Properties to set + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - constructor(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest); - - /** ModifyCloudToDeviceConfigRequest name. */ - public name: string; - - /** ModifyCloudToDeviceConfigRequest versionToUpdate. */ - public versionToUpdate: (number|Long); - - /** ModifyCloudToDeviceConfigRequest binaryData. */ - public binaryData: Uint8Array; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback): void; /** - * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyCloudToDeviceConfigRequest instance + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. - * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static encode(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback): void; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. - * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyCloudToDeviceConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SendCommandToDevice. + * @param request SendCommandToDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback): void; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyCloudToDeviceConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SendCommandToDevice. + * @param request SendCommandToDeviceRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest): Promise; /** - * Verifies a ModifyCloudToDeviceConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls BindDeviceToGateway. + * @param request BindDeviceToGatewayRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback): void; /** - * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyCloudToDeviceConfigRequest + * Calls BindDeviceToGateway. + * @param request BindDeviceToGatewayRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest): Promise; /** - * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. - * @param message ModifyCloudToDeviceConfigRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UnbindDeviceFromGateway. + * @param request UnbindDeviceFromGatewayRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse */ - public static toObject(message: google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback): void; /** - * Converts this ModifyCloudToDeviceConfigRequest to JSON. - * @returns JSON object + * Calls UnbindDeviceFromGateway. + * @param request UnbindDeviceFromGatewayRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListDeviceConfigVersionsRequest. */ - interface IListDeviceConfigVersionsRequest { - - /** ListDeviceConfigVersionsRequest name */ - name?: (string|null); - - /** ListDeviceConfigVersionsRequest numVersions */ - numVersions?: (number|null); + public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): Promise; } - /** Represents a ListDeviceConfigVersionsRequest. */ - class ListDeviceConfigVersionsRequest implements IListDeviceConfigVersionsRequest { + namespace DeviceManager { /** - * Constructs a new ListDeviceConfigVersionsRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry */ - constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest); - - /** ListDeviceConfigVersionsRequest name. */ - public name: string; - - /** ListDeviceConfigVersionsRequest numVersions. */ - public numVersions: number; + type CreateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; /** - * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeviceConfigVersionsRequest instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry */ - public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + type GetDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; /** - * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. - * @param message ListDeviceConfigVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry */ - public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; /** - * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. - * @param message ListDeviceConfigVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * @param error Error, if any + * @param [response] Empty */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteDeviceRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDeviceConfigVersionsRequest - * @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.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * @param error Error, if any + * @param [response] ListDeviceRegistriesResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + type ListDeviceRegistriesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceRegistriesResponse) => void; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDeviceConfigVersionsRequest - * @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.cloud.iot.v1.DeviceManager#createDevice}. + * @param error Error, if any + * @param [response] Device */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + type CreateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Verifies a ListDeviceConfigVersionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * @param error Error, if any + * @param [response] Device */ - public static verify(message: { [k: string]: any }): (string|null); + type GetDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDeviceConfigVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; - - /** - * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. - * @param message ListDeviceConfigVersionsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * @param error Error, if any + * @param [response] Device */ - public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type UpdateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Converts this ListDeviceConfigVersionsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * @param error Error, if any + * @param [response] Empty */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListDeviceConfigVersionsResponse. */ - interface IListDeviceConfigVersionsResponse { - - /** ListDeviceConfigVersionsResponse deviceConfigs */ - deviceConfigs?: (google.cloud.iot.v1.IDeviceConfig[]|null); - } - - /** Represents a ListDeviceConfigVersionsResponse. */ - class ListDeviceConfigVersionsResponse implements IListDeviceConfigVersionsResponse { + type DeleteDeviceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Constructs a new ListDeviceConfigVersionsResponse. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * @param error Error, if any + * @param [response] ListDevicesResponse */ - constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse); - - /** ListDeviceConfigVersionsResponse deviceConfigs. */ - public deviceConfigs: google.cloud.iot.v1.IDeviceConfig[]; + type ListDevicesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDevicesResponse) => void; /** - * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeviceConfigVersionsResponse instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * @param error Error, if any + * @param [response] DeviceConfig */ - public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + type ModifyCloudToDeviceConfigCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceConfig) => void; /** - * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. - * @param message ListDeviceConfigVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * @param error Error, if any + * @param [response] ListDeviceConfigVersionsResponse */ - public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type ListDeviceConfigVersionsCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceConfigVersionsResponse) => void; /** - * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. - * @param message ListDeviceConfigVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * @param error Error, if any + * @param [response] ListDeviceStatesResponse */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type ListDeviceStatesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceStatesResponse) => void; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDeviceConfigVersionsResponse - * @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.cloud.iot.v1.DeviceManager#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDeviceConfigVersionsResponse - * @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.cloud.iot.v1.DeviceManager#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Verifies a ListDeviceConfigVersionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; /** - * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDeviceConfigVersionsResponse + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * @param error Error, if any + * @param [response] SendCommandToDeviceResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + type SendCommandToDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.SendCommandToDeviceResponse) => void; /** - * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. - * @param message ListDeviceConfigVersionsResponse - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * @param error Error, if any + * @param [response] BindDeviceToGatewayResponse */ - public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type BindDeviceToGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.BindDeviceToGatewayResponse) => void; /** - * Converts this ListDeviceConfigVersionsResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * @param error Error, if any + * @param [response] UnbindDeviceFromGatewayResponse */ - public toJSON(): { [k: string]: any }; + type UnbindDeviceFromGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) => void; } - /** Properties of a ListDeviceStatesRequest. */ - interface IListDeviceStatesRequest { + /** Properties of a CreateDeviceRegistryRequest. */ + interface ICreateDeviceRegistryRequest { - /** ListDeviceStatesRequest name */ - name?: (string|null); + /** CreateDeviceRegistryRequest parent */ + parent?: (string|null); - /** ListDeviceStatesRequest numStates */ - numStates?: (number|null); + /** CreateDeviceRegistryRequest deviceRegistry */ + deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); } - /** Represents a ListDeviceStatesRequest. */ - class ListDeviceStatesRequest implements IListDeviceStatesRequest { + /** Represents a CreateDeviceRegistryRequest. */ + class CreateDeviceRegistryRequest implements ICreateDeviceRegistryRequest { /** - * Constructs a new ListDeviceStatesRequest. + * Constructs a new CreateDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceStatesRequest); + constructor(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest); - /** ListDeviceStatesRequest name. */ - public name: string; + /** CreateDeviceRegistryRequest parent. */ + public parent: string; - /** ListDeviceStatesRequest numStates. */ - public numStates: number; + /** CreateDeviceRegistryRequest deviceRegistry. */ + public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); /** - * Creates a new ListDeviceStatesRequest instance using the specified properties. + * Creates a new CreateDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceStatesRequest instance + * @returns CreateDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceStatesRequest): google.cloud.iot.v1.ListDeviceStatesRequest; + public static create(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. - * @param message ListDeviceStatesRequest message or plain object to encode + * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @param message CreateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. - * @param message ListDeviceStatesRequest message or plain object to encode + * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @param message CreateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceStatesRequest + * @returns CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceStatesRequest + * @returns CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Verifies a ListDeviceStatesRequest message. + * Verifies a CreateDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceStatesRequest + * @returns CreateDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. - * @param message ListDeviceStatesRequest + * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message CreateDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.CreateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceStatesRequest to JSON. + * Converts this CreateDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceStatesResponse. */ - interface IListDeviceStatesResponse { + /** Properties of a GetDeviceRegistryRequest. */ + interface IGetDeviceRegistryRequest { - /** ListDeviceStatesResponse deviceStates */ - deviceStates?: (google.cloud.iot.v1.IDeviceState[]|null); + /** GetDeviceRegistryRequest name */ + name?: (string|null); } - /** Represents a ListDeviceStatesResponse. */ - class ListDeviceStatesResponse implements IListDeviceStatesResponse { + /** Represents a GetDeviceRegistryRequest. */ + class GetDeviceRegistryRequest implements IGetDeviceRegistryRequest { /** - * Constructs a new ListDeviceStatesResponse. + * Constructs a new GetDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceStatesResponse); + constructor(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest); - /** ListDeviceStatesResponse deviceStates. */ - public deviceStates: google.cloud.iot.v1.IDeviceState[]; + /** GetDeviceRegistryRequest name. */ + public name: string; /** - * Creates a new ListDeviceStatesResponse instance using the specified properties. + * Creates a new GetDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceStatesResponse instance + * @returns GetDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceStatesResponse): google.cloud.iot.v1.ListDeviceStatesResponse; + public static create(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. - * @param message ListDeviceStatesResponse message or plain object to encode + * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @param message GetDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. - * @param message ListDeviceStatesResponse message or plain object to encode + * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @param message GetDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceStatesResponse + * @returns GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceStatesResponse + * @returns GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Verifies a ListDeviceStatesResponse message. + * Verifies a GetDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceStatesResponse + * @returns GetDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. - * @param message ListDeviceStatesResponse + * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message GetDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.GetDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceStatesResponse to JSON. + * Converts this GetDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SendCommandToDeviceRequest. */ - interface ISendCommandToDeviceRequest { + /** Properties of a DeleteDeviceRegistryRequest. */ + interface IDeleteDeviceRegistryRequest { - /** SendCommandToDeviceRequest name */ + /** DeleteDeviceRegistryRequest name */ name?: (string|null); - - /** SendCommandToDeviceRequest binaryData */ - binaryData?: (Uint8Array|null); - - /** SendCommandToDeviceRequest subfolder */ - subfolder?: (string|null); } - /** Represents a SendCommandToDeviceRequest. */ - class SendCommandToDeviceRequest implements ISendCommandToDeviceRequest { + /** Represents a DeleteDeviceRegistryRequest. */ + class DeleteDeviceRegistryRequest implements IDeleteDeviceRegistryRequest { /** - * Constructs a new SendCommandToDeviceRequest. + * Constructs a new DeleteDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest); - /** SendCommandToDeviceRequest name. */ + /** DeleteDeviceRegistryRequest name. */ public name: string; - /** SendCommandToDeviceRequest binaryData. */ - public binaryData: Uint8Array; - - /** SendCommandToDeviceRequest subfolder. */ - public subfolder: string; - /** - * Creates a new SendCommandToDeviceRequest instance using the specified properties. + * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SendCommandToDeviceRequest instance + * @returns DeleteDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. - * @param message SendCommandToDeviceRequest message or plain object to encode + * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @param message DeleteDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. - * @param message SendCommandToDeviceRequest message or plain object to encode + * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @param message DeleteDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SendCommandToDeviceRequest + * @returns DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SendCommandToDeviceRequest + * @returns DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Verifies a SendCommandToDeviceRequest message. + * Verifies a DeleteDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SendCommandToDeviceRequest + * @returns DeleteDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. - * @param message SendCommandToDeviceRequest + * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message DeleteDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeleteDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SendCommandToDeviceRequest to JSON. + * Converts this DeleteDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SendCommandToDeviceResponse. */ - interface ISendCommandToDeviceResponse { + /** Properties of an UpdateDeviceRegistryRequest. */ + interface IUpdateDeviceRegistryRequest { + + /** UpdateDeviceRegistryRequest deviceRegistry */ + deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + + /** UpdateDeviceRegistryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a SendCommandToDeviceResponse. */ - class SendCommandToDeviceResponse implements ISendCommandToDeviceResponse { + /** Represents an UpdateDeviceRegistryRequest. */ + class UpdateDeviceRegistryRequest implements IUpdateDeviceRegistryRequest { /** - * Constructs a new SendCommandToDeviceResponse. + * Constructs a new UpdateDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse); + constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest); + + /** UpdateDeviceRegistryRequest deviceRegistry. */ + public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + + /** UpdateDeviceRegistryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new SendCommandToDeviceResponse instance using the specified properties. + * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SendCommandToDeviceResponse instance + * @returns UpdateDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. - * @param message SendCommandToDeviceResponse message or plain object to encode + * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @param message UpdateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. - * @param message SendCommandToDeviceResponse message or plain object to encode + * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @param message UpdateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SendCommandToDeviceResponse + * @returns UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SendCommandToDeviceResponse + * @returns UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Verifies a SendCommandToDeviceResponse message. + * Verifies an UpdateDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SendCommandToDeviceResponse + * @returns UpdateDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. - * @param message SendCommandToDeviceResponse + * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message UpdateDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.UpdateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SendCommandToDeviceResponse to JSON. + * Converts this UpdateDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BindDeviceToGatewayRequest. */ - interface IBindDeviceToGatewayRequest { + /** Properties of a ListDeviceRegistriesRequest. */ + interface IListDeviceRegistriesRequest { - /** BindDeviceToGatewayRequest parent */ + /** ListDeviceRegistriesRequest parent */ parent?: (string|null); - /** BindDeviceToGatewayRequest gatewayId */ - gatewayId?: (string|null); + /** ListDeviceRegistriesRequest pageSize */ + pageSize?: (number|null); - /** BindDeviceToGatewayRequest deviceId */ - deviceId?: (string|null); + /** ListDeviceRegistriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a BindDeviceToGatewayRequest. */ - class BindDeviceToGatewayRequest implements IBindDeviceToGatewayRequest { + /** Represents a ListDeviceRegistriesRequest. */ + class ListDeviceRegistriesRequest implements IListDeviceRegistriesRequest { /** - * Constructs a new BindDeviceToGatewayRequest. + * Constructs a new ListDeviceRegistriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest); + constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest); - /** BindDeviceToGatewayRequest parent. */ + /** ListDeviceRegistriesRequest parent. */ public parent: string; - /** BindDeviceToGatewayRequest gatewayId. */ - public gatewayId: string; + /** ListDeviceRegistriesRequest pageSize. */ + public pageSize: number; - /** BindDeviceToGatewayRequest deviceId. */ - public deviceId: string; + /** ListDeviceRegistriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new BindDeviceToGatewayRequest instance using the specified properties. + * Creates a new ListDeviceRegistriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BindDeviceToGatewayRequest instance + * @returns ListDeviceRegistriesRequest instance */ - public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. - * @param message BindDeviceToGatewayRequest message or plain object to encode + * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @param message ListDeviceRegistriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. - * @param message BindDeviceToGatewayRequest message or plain object to encode + * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @param message ListDeviceRegistriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BindDeviceToGatewayRequest + * @returns ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BindDeviceToGatewayRequest + * @returns ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Verifies a BindDeviceToGatewayRequest message. + * Verifies a ListDeviceRegistriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BindDeviceToGatewayRequest + * @returns ListDeviceRegistriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. - * @param message BindDeviceToGatewayRequest + * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. + * @param message ListDeviceRegistriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BindDeviceToGatewayRequest to JSON. + * Converts this ListDeviceRegistriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BindDeviceToGatewayResponse. */ - interface IBindDeviceToGatewayResponse { + /** Properties of a ListDeviceRegistriesResponse. */ + interface IListDeviceRegistriesResponse { + + /** ListDeviceRegistriesResponse deviceRegistries */ + deviceRegistries?: (google.cloud.iot.v1.IDeviceRegistry[]|null); + + /** ListDeviceRegistriesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a BindDeviceToGatewayResponse. */ - class BindDeviceToGatewayResponse implements IBindDeviceToGatewayResponse { + /** Represents a ListDeviceRegistriesResponse. */ + class ListDeviceRegistriesResponse implements IListDeviceRegistriesResponse { /** - * Constructs a new BindDeviceToGatewayResponse. + * Constructs a new ListDeviceRegistriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse); + constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse); + + /** ListDeviceRegistriesResponse deviceRegistries. */ + public deviceRegistries: google.cloud.iot.v1.IDeviceRegistry[]; + + /** ListDeviceRegistriesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new BindDeviceToGatewayResponse instance using the specified properties. + * Creates a new ListDeviceRegistriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BindDeviceToGatewayResponse instance + * @returns ListDeviceRegistriesResponse instance */ - public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. - * @param message BindDeviceToGatewayResponse message or plain object to encode + * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @param message ListDeviceRegistriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. - * @param message BindDeviceToGatewayResponse message or plain object to encode + * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @param message ListDeviceRegistriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BindDeviceToGatewayResponse + * @returns ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BindDeviceToGatewayResponse + * @returns ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Verifies a BindDeviceToGatewayResponse message. + * Verifies a ListDeviceRegistriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BindDeviceToGatewayResponse + * @returns ListDeviceRegistriesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. - * @param message BindDeviceToGatewayResponse + * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. + * @param message ListDeviceRegistriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BindDeviceToGatewayResponse to JSON. + * Converts this ListDeviceRegistriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UnbindDeviceFromGatewayRequest. */ - interface IUnbindDeviceFromGatewayRequest { + /** Properties of a CreateDeviceRequest. */ + interface ICreateDeviceRequest { - /** UnbindDeviceFromGatewayRequest parent */ + /** CreateDeviceRequest parent */ parent?: (string|null); - /** UnbindDeviceFromGatewayRequest gatewayId */ - gatewayId?: (string|null); - - /** UnbindDeviceFromGatewayRequest deviceId */ - deviceId?: (string|null); + /** CreateDeviceRequest device */ + device?: (google.cloud.iot.v1.IDevice|null); } - /** Represents an UnbindDeviceFromGatewayRequest. */ - class UnbindDeviceFromGatewayRequest implements IUnbindDeviceFromGatewayRequest { + /** Represents a CreateDeviceRequest. */ + class CreateDeviceRequest implements ICreateDeviceRequest { /** - * Constructs a new UnbindDeviceFromGatewayRequest. + * Constructs a new CreateDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest); + constructor(properties?: google.cloud.iot.v1.ICreateDeviceRequest); - /** UnbindDeviceFromGatewayRequest parent. */ + /** CreateDeviceRequest parent. */ public parent: string; - /** UnbindDeviceFromGatewayRequest gatewayId. */ - public gatewayId: string; - - /** UnbindDeviceFromGatewayRequest deviceId. */ - public deviceId: string; + /** CreateDeviceRequest device. */ + public device?: (google.cloud.iot.v1.IDevice|null); /** - * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. + * Creates a new CreateDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UnbindDeviceFromGatewayRequest instance + * @returns CreateDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static create(properties?: google.cloud.iot.v1.ICreateDeviceRequest): google.cloud.iot.v1.CreateDeviceRequest; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. - * @param message UnbindDeviceFromGatewayRequest message or plain object to encode + * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @param message CreateDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. - * @param message UnbindDeviceFromGatewayRequest message or plain object to encode + * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @param message CreateDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. + * Decodes a CreateDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UnbindDeviceFromGatewayRequest + * @returns CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRequest; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UnbindDeviceFromGatewayRequest + * @returns CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRequest; /** - * Verifies an UnbindDeviceFromGatewayRequest message. + * Verifies a CreateDeviceRequest message. * @param message Plain 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 UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UnbindDeviceFromGatewayRequest + * @returns CreateDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRequest; /** - * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. - * @param message UnbindDeviceFromGatewayRequest + * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. + * @param message CreateDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.CreateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UnbindDeviceFromGatewayRequest to JSON. + * Converts this CreateDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UnbindDeviceFromGatewayResponse. */ - interface IUnbindDeviceFromGatewayResponse { + /** Properties of a GetDeviceRequest. */ + interface IGetDeviceRequest { + + /** GetDeviceRequest name */ + name?: (string|null); + + /** GetDeviceRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UnbindDeviceFromGatewayResponse. */ - class UnbindDeviceFromGatewayResponse implements IUnbindDeviceFromGatewayResponse { + /** Represents a GetDeviceRequest. */ + class GetDeviceRequest implements IGetDeviceRequest { /** - * Constructs a new UnbindDeviceFromGatewayResponse. + * Constructs a new GetDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse); + constructor(properties?: google.cloud.iot.v1.IGetDeviceRequest); + + /** GetDeviceRequest name. */ + public name: string; + + /** GetDeviceRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. + * Creates a new GetDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UnbindDeviceFromGatewayResponse instance + * @returns GetDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + public static create(properties?: google.cloud.iot.v1.IGetDeviceRequest): google.cloud.iot.v1.GetDeviceRequest; /** - * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. - * @param message UnbindDeviceFromGatewayResponse message or plain object to encode + * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @param message GetDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. - * @param message UnbindDeviceFromGatewayResponse message or plain object to encode + * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @param message GetDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. + * Decodes a GetDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UnbindDeviceFromGatewayResponse + * @returns GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRequest; /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UnbindDeviceFromGatewayResponse + * @returns GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRequest; /** - * Verifies an UnbindDeviceFromGatewayResponse message. + * Verifies a GetDeviceRequest message. * @param message Plain 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 UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UnbindDeviceFromGatewayResponse + * @returns GetDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRequest; /** - * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. - * @param message UnbindDeviceFromGatewayResponse + * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. + * @param message GetDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.GetDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UnbindDeviceFromGatewayResponse to JSON. + * Converts this GetDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Device. */ - interface IDevice { - - /** Device id */ - id?: (string|null); - - /** Device name */ - name?: (string|null); - - /** Device numId */ - numId?: (number|Long|null); + /** Properties of an UpdateDeviceRequest. */ + interface IUpdateDeviceRequest { - /** Device credentials */ - credentials?: (google.cloud.iot.v1.IDeviceCredential[]|null); + /** UpdateDeviceRequest device */ + device?: (google.cloud.iot.v1.IDevice|null); - /** Device lastHeartbeatTime */ - lastHeartbeatTime?: (google.protobuf.ITimestamp|null); + /** UpdateDeviceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** Device lastEventTime */ - lastEventTime?: (google.protobuf.ITimestamp|null); + /** Represents an UpdateDeviceRequest. */ + class UpdateDeviceRequest implements IUpdateDeviceRequest { - /** Device lastStateTime */ - lastStateTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new UpdateDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRequest); - /** Device lastConfigAckTime */ - lastConfigAckTime?: (google.protobuf.ITimestamp|null); + /** UpdateDeviceRequest device. */ + public device?: (google.cloud.iot.v1.IDevice|null); - /** Device lastConfigSendTime */ - lastConfigSendTime?: (google.protobuf.ITimestamp|null); + /** UpdateDeviceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** Device blocked */ - blocked?: (boolean|null); + /** + * Creates a new UpdateDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeviceRequest instance + */ + public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRequest): google.cloud.iot.v1.UpdateDeviceRequest; - /** Device lastErrorTime */ - lastErrorTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @param message UpdateDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Device lastErrorStatus */ - lastErrorStatus?: (google.rpc.IStatus|null); - - /** Device config */ - config?: (google.cloud.iot.v1.IDeviceConfig|null); - - /** Device state */ - state?: (google.cloud.iot.v1.IDeviceState|null); - - /** Device logLevel */ - logLevel?: (google.cloud.iot.v1.LogLevel|null); - - /** Device metadata */ - metadata?: ({ [k: string]: string }|null); - - /** Device gatewayConfig */ - gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); - } - - /** Represents a Device. */ - class Device implements IDevice { + /** + * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @param message UpdateDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new Device. - * @param [properties] Properties to set + * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.cloud.iot.v1.IDevice); - - /** Device id. */ - public id: string; - - /** Device name. */ - public name: string; - - /** Device numId. */ - public numId: (number|Long); - - /** Device credentials. */ - public credentials: google.cloud.iot.v1.IDeviceCredential[]; - - /** Device lastHeartbeatTime. */ - public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Device lastEventTime. */ - public lastEventTime?: (google.protobuf.ITimestamp|null); - - /** Device lastStateTime. */ - public lastStateTime?: (google.protobuf.ITimestamp|null); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRequest; - /** Device lastConfigAckTime. */ - public lastConfigAckTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRequest; - /** Device lastConfigSendTime. */ - public lastConfigSendTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies an UpdateDeviceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Device blocked. */ - public blocked: boolean; + /** + * Creates an UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRequest; - /** Device lastErrorTime. */ - public lastErrorTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. + * @param message UpdateDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.UpdateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Device lastErrorStatus. */ - public lastErrorStatus?: (google.rpc.IStatus|null); + /** + * Converts this UpdateDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Device config. */ - public config?: (google.cloud.iot.v1.IDeviceConfig|null); + /** Properties of a DeleteDeviceRequest. */ + interface IDeleteDeviceRequest { - /** Device state. */ - public state?: (google.cloud.iot.v1.IDeviceState|null); + /** DeleteDeviceRequest name */ + name?: (string|null); + } - /** Device logLevel. */ - public logLevel: google.cloud.iot.v1.LogLevel; + /** Represents a DeleteDeviceRequest. */ + class DeleteDeviceRequest implements IDeleteDeviceRequest { - /** Device metadata. */ - public metadata: { [k: string]: string }; + /** + * Constructs a new DeleteDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRequest); - /** Device gatewayConfig. */ - public gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + /** DeleteDeviceRequest name. */ + public name: string; /** - * Creates a new Device instance using the specified properties. + * Creates a new DeleteDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Device instance + * @returns DeleteDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IDevice): google.cloud.iot.v1.Device; + public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRequest): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. - * @param message Device message or plain object to encode + * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @param message DeleteDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. - * @param message Device message or plain object to encode + * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @param message DeleteDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Device message from the specified reader or buffer. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Device + * @returns DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.Device; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Decodes a Device message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Device + * @returns DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.Device; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Verifies a Device message. + * Verifies a DeleteDeviceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Device message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Device + * @returns DeleteDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.Device; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Creates a plain object from a Device message. Also converts values to other types if specified. - * @param message Device + * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * @param message DeleteDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.Device, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeleteDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Device to JSON. + * Converts this DeleteDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GatewayConfig. */ - interface IGatewayConfig { + /** Properties of a ListDevicesRequest. */ + interface IListDevicesRequest { - /** GatewayConfig gatewayType */ - gatewayType?: (google.cloud.iot.v1.GatewayType|null); + /** ListDevicesRequest parent */ + parent?: (string|null); - /** GatewayConfig gatewayAuthMethod */ - gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|null); + /** ListDevicesRequest deviceNumIds */ + deviceNumIds?: ((number|Long)[]|null); - /** GatewayConfig lastAccessedGatewayId */ - lastAccessedGatewayId?: (string|null); + /** ListDevicesRequest deviceIds */ + deviceIds?: (string[]|null); - /** GatewayConfig lastAccessedGatewayTime */ - lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); + /** ListDevicesRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListDevicesRequest gatewayListOptions */ + gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + + /** ListDevicesRequest pageSize */ + pageSize?: (number|null); + + /** ListDevicesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GatewayConfig. */ - class GatewayConfig implements IGatewayConfig { + /** Represents a ListDevicesRequest. */ + class ListDevicesRequest implements IListDevicesRequest { /** - * Constructs a new GatewayConfig. + * Constructs a new ListDevicesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IGatewayConfig); + constructor(properties?: google.cloud.iot.v1.IListDevicesRequest); - /** GatewayConfig gatewayType. */ - public gatewayType: google.cloud.iot.v1.GatewayType; + /** ListDevicesRequest parent. */ + public parent: string; - /** GatewayConfig gatewayAuthMethod. */ - public gatewayAuthMethod: google.cloud.iot.v1.GatewayAuthMethod; + /** ListDevicesRequest deviceNumIds. */ + public deviceNumIds: (number|Long)[]; - /** GatewayConfig lastAccessedGatewayId. */ - public lastAccessedGatewayId: string; + /** ListDevicesRequest deviceIds. */ + public deviceIds: string[]; - /** GatewayConfig lastAccessedGatewayTime. */ - public lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); + /** ListDevicesRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListDevicesRequest gatewayListOptions. */ + public gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + + /** ListDevicesRequest pageSize. */ + public pageSize: number; + + /** ListDevicesRequest pageToken. */ + public pageToken: string; /** - * Creates a new GatewayConfig instance using the specified properties. + * Creates a new ListDevicesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GatewayConfig instance + * @returns ListDevicesRequest instance */ - public static create(properties?: google.cloud.iot.v1.IGatewayConfig): google.cloud.iot.v1.GatewayConfig; + public static create(properties?: google.cloud.iot.v1.IListDevicesRequest): google.cloud.iot.v1.ListDevicesRequest; /** - * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. - * @param message GatewayConfig message or plain object to encode + * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @param message ListDevicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. - * @param message GatewayConfig message or plain object to encode + * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @param message ListDevicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GatewayConfig message from the specified reader or buffer. + * Decodes a ListDevicesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GatewayConfig + * @returns ListDevicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesRequest; /** - * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GatewayConfig + * @returns ListDevicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesRequest; /** - * Verifies a GatewayConfig message. + * Verifies a ListDevicesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GatewayConfig + * @returns ListDevicesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesRequest; /** - * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. - * @param message GatewayConfig + * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. + * @param message ListDevicesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.GatewayConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDevicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GatewayConfig to JSON. + * Converts this ListDevicesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeviceRegistry. */ - interface IDeviceRegistry { - - /** DeviceRegistry id */ - id?: (string|null); - - /** DeviceRegistry name */ - name?: (string|null); - - /** DeviceRegistry eventNotificationConfigs */ - eventNotificationConfigs?: (google.cloud.iot.v1.IEventNotificationConfig[]|null); - - /** DeviceRegistry stateNotificationConfig */ - stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); - - /** DeviceRegistry mqttConfig */ - mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + /** Properties of a GatewayListOptions. */ + interface IGatewayListOptions { - /** DeviceRegistry httpConfig */ - httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + /** GatewayListOptions gatewayType */ + gatewayType?: (google.cloud.iot.v1.GatewayType|null); - /** DeviceRegistry logLevel */ - logLevel?: (google.cloud.iot.v1.LogLevel|null); + /** GatewayListOptions associationsGatewayId */ + associationsGatewayId?: (string|null); - /** DeviceRegistry credentials */ - credentials?: (google.cloud.iot.v1.IRegistryCredential[]|null); + /** GatewayListOptions associationsDeviceId */ + associationsDeviceId?: (string|null); } - /** Represents a DeviceRegistry. */ - class DeviceRegistry implements IDeviceRegistry { + /** Represents a GatewayListOptions. */ + class GatewayListOptions implements IGatewayListOptions { /** - * Constructs a new DeviceRegistry. + * Constructs a new GatewayListOptions. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceRegistry); - - /** DeviceRegistry id. */ - public id: string; - - /** DeviceRegistry name. */ - public name: string; - - /** DeviceRegistry eventNotificationConfigs. */ - public eventNotificationConfigs: google.cloud.iot.v1.IEventNotificationConfig[]; - - /** DeviceRegistry stateNotificationConfig. */ - public stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); - /** DeviceRegistry mqttConfig. */ - public mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + /** GatewayListOptions gatewayType. */ + public gatewayType: google.cloud.iot.v1.GatewayType; - /** DeviceRegistry httpConfig. */ - public httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + /** GatewayListOptions associationsGatewayId. */ + public associationsGatewayId: string; - /** DeviceRegistry logLevel. */ - public logLevel: google.cloud.iot.v1.LogLevel; + /** GatewayListOptions associationsDeviceId. */ + public associationsDeviceId: string; - /** DeviceRegistry credentials. */ - public credentials: google.cloud.iot.v1.IRegistryCredential[]; + /** GatewayListOptions filter. */ + public filter?: ("gatewayType"|"associationsGatewayId"|"associationsDeviceId"); /** - * Creates a new DeviceRegistry instance using the specified properties. + * Creates a new GatewayListOptions instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceRegistry instance + * @returns GatewayListOptions instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceRegistry): google.cloud.iot.v1.DeviceRegistry; + public static create(properties?: google.cloud.iot.v1.IGatewayListOptions): google.cloud.iot.v1.GatewayListOptions; /** - * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. - * @param message DeviceRegistry message or plain object to encode + * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @param message GatewayListOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. - * @param message DeviceRegistry message or plain object to encode + * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @param message GatewayListOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceRegistry message from the specified reader or buffer. + * Decodes a GatewayListOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceRegistry + * @returns GatewayListOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceRegistry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayListOptions; /** - * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. + * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceRegistry + * @returns GatewayListOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceRegistry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayListOptions; /** - * Verifies a DeviceRegistry message. + * Verifies a GatewayListOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. + * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceRegistry + * @returns GatewayListOptions */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceRegistry; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayListOptions; /** - * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. - * @param message DeviceRegistry + * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. + * @param message GatewayListOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceRegistry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.GatewayListOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceRegistry to JSON. + * Converts this GatewayListOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MqttConfig. */ - interface IMqttConfig { + /** Properties of a ListDevicesResponse. */ + interface IListDevicesResponse { - /** MqttConfig mqttEnabledState */ - mqttEnabledState?: (google.cloud.iot.v1.MqttState|null); + /** ListDevicesResponse devices */ + devices?: (google.cloud.iot.v1.IDevice[]|null); + + /** ListDevicesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a MqttConfig. */ - class MqttConfig implements IMqttConfig { + /** Represents a ListDevicesResponse. */ + class ListDevicesResponse implements IListDevicesResponse { /** - * Constructs a new MqttConfig. + * Constructs a new ListDevicesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IMqttConfig); + constructor(properties?: google.cloud.iot.v1.IListDevicesResponse); - /** MqttConfig mqttEnabledState. */ - public mqttEnabledState: google.cloud.iot.v1.MqttState; + /** ListDevicesResponse devices. */ + public devices: google.cloud.iot.v1.IDevice[]; + + /** ListDevicesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new MqttConfig instance using the specified properties. + * Creates a new ListDevicesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MqttConfig instance + * @returns ListDevicesResponse instance */ - public static create(properties?: google.cloud.iot.v1.IMqttConfig): google.cloud.iot.v1.MqttConfig; + public static create(properties?: google.cloud.iot.v1.IListDevicesResponse): google.cloud.iot.v1.ListDevicesResponse; /** - * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. - * @param message MqttConfig message or plain object to encode + * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @param message ListDevicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. - * @param message MqttConfig message or plain object to encode + * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @param message ListDevicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MqttConfig message from the specified reader or buffer. + * Decodes a ListDevicesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MqttConfig + * @returns ListDevicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.MqttConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesResponse; /** - * Decodes a MqttConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MqttConfig + * @returns ListDevicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.MqttConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesResponse; /** - * Verifies a MqttConfig message. + * Verifies a ListDevicesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MqttConfig + * @returns ListDevicesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.MqttConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesResponse; /** - * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. - * @param message MqttConfig + * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. + * @param message ListDevicesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.MqttConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDevicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MqttConfig to JSON. + * Converts this ListDevicesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** MqttState enum. */ - enum MqttState { - MQTT_STATE_UNSPECIFIED = 0, - MQTT_ENABLED = 1, - MQTT_DISABLED = 2 - } + /** Properties of a ModifyCloudToDeviceConfigRequest. */ + interface IModifyCloudToDeviceConfigRequest { - /** Properties of a HttpConfig. */ - interface IHttpConfig { + /** ModifyCloudToDeviceConfigRequest name */ + name?: (string|null); - /** HttpConfig httpEnabledState */ - httpEnabledState?: (google.cloud.iot.v1.HttpState|null); + /** ModifyCloudToDeviceConfigRequest versionToUpdate */ + versionToUpdate?: (number|Long|null); + + /** ModifyCloudToDeviceConfigRequest binaryData */ + binaryData?: (Uint8Array|null); } - /** Represents a HttpConfig. */ - class HttpConfig implements IHttpConfig { + /** Represents a ModifyCloudToDeviceConfigRequest. */ + class ModifyCloudToDeviceConfigRequest implements IModifyCloudToDeviceConfigRequest { /** - * Constructs a new HttpConfig. + * Constructs a new ModifyCloudToDeviceConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IHttpConfig); + constructor(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest); - /** HttpConfig httpEnabledState. */ - public httpEnabledState: google.cloud.iot.v1.HttpState; + /** ModifyCloudToDeviceConfigRequest name. */ + public name: string; + + /** ModifyCloudToDeviceConfigRequest versionToUpdate. */ + public versionToUpdate: (number|Long); + + /** ModifyCloudToDeviceConfigRequest binaryData. */ + public binaryData: Uint8Array; /** - * Creates a new HttpConfig instance using the specified properties. + * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns HttpConfig instance + * @returns ModifyCloudToDeviceConfigRequest instance */ - public static create(properties?: google.cloud.iot.v1.IHttpConfig): google.cloud.iot.v1.HttpConfig; + public static create(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. - * @param message HttpConfig message or plain object to encode + * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. - * @param message HttpConfig message or plain object to encode + * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpConfig message from the specified reader or buffer. + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpConfig + * @returns ModifyCloudToDeviceConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.HttpConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Decodes a HttpConfig message from the specified reader or buffer, length delimited. + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpConfig + * @returns ModifyCloudToDeviceConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.HttpConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Verifies a HttpConfig message. + * Verifies a ModifyCloudToDeviceConfigRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpConfig + * @returns ModifyCloudToDeviceConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.HttpConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. - * @param message HttpConfig + * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. + * @param message ModifyCloudToDeviceConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.HttpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpConfig to JSON. + * Converts this ModifyCloudToDeviceConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** HttpState enum. */ - enum HttpState { - HTTP_STATE_UNSPECIFIED = 0, - HTTP_ENABLED = 1, - HTTP_DISABLED = 2 - } - - /** LogLevel enum. */ - enum LogLevel { - LOG_LEVEL_UNSPECIFIED = 0, - NONE = 10, - ERROR = 20, - INFO = 30, - DEBUG = 40 - } - - /** GatewayType enum. */ - enum GatewayType { - GATEWAY_TYPE_UNSPECIFIED = 0, - GATEWAY = 1, - NON_GATEWAY = 2 - } - - /** GatewayAuthMethod enum. */ - enum GatewayAuthMethod { - GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, - ASSOCIATION_ONLY = 1, - DEVICE_AUTH_TOKEN_ONLY = 2, - ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 - } - - /** Properties of an EventNotificationConfig. */ - interface IEventNotificationConfig { + /** Properties of a ListDeviceConfigVersionsRequest. */ + interface IListDeviceConfigVersionsRequest { - /** EventNotificationConfig subfolderMatches */ - subfolderMatches?: (string|null); + /** ListDeviceConfigVersionsRequest name */ + name?: (string|null); - /** EventNotificationConfig pubsubTopicName */ - pubsubTopicName?: (string|null); + /** ListDeviceConfigVersionsRequest numVersions */ + numVersions?: (number|null); } - /** Represents an EventNotificationConfig. */ - class EventNotificationConfig implements IEventNotificationConfig { + /** Represents a ListDeviceConfigVersionsRequest. */ + class ListDeviceConfigVersionsRequest implements IListDeviceConfigVersionsRequest { /** - * Constructs a new EventNotificationConfig. + * Constructs a new ListDeviceConfigVersionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IEventNotificationConfig); + constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest); - /** EventNotificationConfig subfolderMatches. */ - public subfolderMatches: string; + /** ListDeviceConfigVersionsRequest name. */ + public name: string; - /** EventNotificationConfig pubsubTopicName. */ - public pubsubTopicName: string; + /** ListDeviceConfigVersionsRequest numVersions. */ + public numVersions: number; /** - * Creates a new EventNotificationConfig instance using the specified properties. + * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EventNotificationConfig instance + * @returns ListDeviceConfigVersionsRequest instance */ - public static create(properties?: google.cloud.iot.v1.IEventNotificationConfig): google.cloud.iot.v1.EventNotificationConfig; + public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. - * @param message EventNotificationConfig message or plain object to encode + * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @param message ListDeviceConfigVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. - * @param message EventNotificationConfig message or plain object to encode + * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @param message ListDeviceConfigVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventNotificationConfig + * @returns ListDeviceConfigVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.EventNotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventNotificationConfig + * @returns ListDeviceConfigVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.EventNotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Verifies an EventNotificationConfig message. + * Verifies a ListDeviceConfigVersionsRequest message. * @param message Plain 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 EventNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventNotificationConfig + * @returns ListDeviceConfigVersionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.EventNotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. - * @param message EventNotificationConfig + * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. + * @param message ListDeviceConfigVersionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.EventNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventNotificationConfig to JSON. + * Converts this ListDeviceConfigVersionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StateNotificationConfig. */ - interface IStateNotificationConfig { + /** Properties of a ListDeviceConfigVersionsResponse. */ + interface IListDeviceConfigVersionsResponse { - /** StateNotificationConfig pubsubTopicName */ - pubsubTopicName?: (string|null); + /** ListDeviceConfigVersionsResponse deviceConfigs */ + deviceConfigs?: (google.cloud.iot.v1.IDeviceConfig[]|null); } - /** Represents a StateNotificationConfig. */ - class StateNotificationConfig implements IStateNotificationConfig { + /** Represents a ListDeviceConfigVersionsResponse. */ + class ListDeviceConfigVersionsResponse implements IListDeviceConfigVersionsResponse { /** - * Constructs a new StateNotificationConfig. + * Constructs a new ListDeviceConfigVersionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IStateNotificationConfig); + constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse); - /** StateNotificationConfig pubsubTopicName. */ - public pubsubTopicName: string; + /** ListDeviceConfigVersionsResponse deviceConfigs. */ + public deviceConfigs: google.cloud.iot.v1.IDeviceConfig[]; /** - * Creates a new StateNotificationConfig instance using the specified properties. + * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StateNotificationConfig instance + * @returns ListDeviceConfigVersionsResponse instance */ - public static create(properties?: google.cloud.iot.v1.IStateNotificationConfig): google.cloud.iot.v1.StateNotificationConfig; + public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. - * @param message StateNotificationConfig message or plain object to encode + * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @param message ListDeviceConfigVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. - * @param message StateNotificationConfig message or plain object to encode + * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @param message ListDeviceConfigVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StateNotificationConfig + * @returns ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.StateNotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StateNotificationConfig + * @returns ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.StateNotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Verifies a StateNotificationConfig message. + * Verifies a ListDeviceConfigVersionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StateNotificationConfig + * @returns ListDeviceConfigVersionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.StateNotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. - * @param message StateNotificationConfig + * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. + * @param message ListDeviceConfigVersionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.StateNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StateNotificationConfig to JSON. + * Converts this ListDeviceConfigVersionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RegistryCredential. */ - interface IRegistryCredential { + /** Properties of a ListDeviceStatesRequest. */ + interface IListDeviceStatesRequest { - /** RegistryCredential publicKeyCertificate */ - publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); + /** ListDeviceStatesRequest name */ + name?: (string|null); + + /** ListDeviceStatesRequest numStates */ + numStates?: (number|null); } - /** Represents a RegistryCredential. */ - class RegistryCredential implements IRegistryCredential { + /** Represents a ListDeviceStatesRequest. */ + class ListDeviceStatesRequest implements IListDeviceStatesRequest { /** - * Constructs a new RegistryCredential. + * Constructs a new ListDeviceStatesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IRegistryCredential); + constructor(properties?: google.cloud.iot.v1.IListDeviceStatesRequest); - /** RegistryCredential publicKeyCertificate. */ - public publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); + /** ListDeviceStatesRequest name. */ + public name: string; - /** RegistryCredential credential. */ - public credential?: "publicKeyCertificate"; + /** ListDeviceStatesRequest numStates. */ + public numStates: number; /** - * Creates a new RegistryCredential instance using the specified properties. + * Creates a new ListDeviceStatesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RegistryCredential instance + * @returns ListDeviceStatesRequest instance */ - public static create(properties?: google.cloud.iot.v1.IRegistryCredential): google.cloud.iot.v1.RegistryCredential; + public static create(properties?: google.cloud.iot.v1.IListDeviceStatesRequest): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. - * @param message RegistryCredential message or plain object to encode + * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @param message ListDeviceStatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. - * @param message RegistryCredential message or plain object to encode + * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @param message ListDeviceStatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RegistryCredential message from the specified reader or buffer. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RegistryCredential + * @returns ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.RegistryCredential; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RegistryCredential + * @returns ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.RegistryCredential; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Verifies a RegistryCredential message. + * Verifies a ListDeviceStatesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RegistryCredential + * @returns ListDeviceStatesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.RegistryCredential; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. - * @param message RegistryCredential + * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. + * @param message ListDeviceStatesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.RegistryCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RegistryCredential to JSON. + * Converts this ListDeviceStatesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a X509CertificateDetails. */ - interface IX509CertificateDetails { - - /** X509CertificateDetails issuer */ - issuer?: (string|null); - - /** X509CertificateDetails subject */ - subject?: (string|null); - - /** X509CertificateDetails startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** X509CertificateDetails expiryTime */ - expiryTime?: (google.protobuf.ITimestamp|null); - - /** X509CertificateDetails signatureAlgorithm */ - signatureAlgorithm?: (string|null); + /** Properties of a ListDeviceStatesResponse. */ + interface IListDeviceStatesResponse { - /** X509CertificateDetails publicKeyType */ - publicKeyType?: (string|null); + /** ListDeviceStatesResponse deviceStates */ + deviceStates?: (google.cloud.iot.v1.IDeviceState[]|null); } - /** Represents a X509CertificateDetails. */ - class X509CertificateDetails implements IX509CertificateDetails { + /** Represents a ListDeviceStatesResponse. */ + class ListDeviceStatesResponse implements IListDeviceStatesResponse { /** - * Constructs a new X509CertificateDetails. + * Constructs a new ListDeviceStatesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IX509CertificateDetails); - - /** X509CertificateDetails issuer. */ - public issuer: string; - - /** X509CertificateDetails subject. */ - public subject: string; - - /** X509CertificateDetails startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** X509CertificateDetails expiryTime. */ - public expiryTime?: (google.protobuf.ITimestamp|null); - - /** X509CertificateDetails signatureAlgorithm. */ - public signatureAlgorithm: string; + constructor(properties?: google.cloud.iot.v1.IListDeviceStatesResponse); - /** X509CertificateDetails publicKeyType. */ - public publicKeyType: string; + /** ListDeviceStatesResponse deviceStates. */ + public deviceStates: google.cloud.iot.v1.IDeviceState[]; /** - * Creates a new X509CertificateDetails instance using the specified properties. + * Creates a new ListDeviceStatesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns X509CertificateDetails instance + * @returns ListDeviceStatesResponse instance */ - public static create(properties?: google.cloud.iot.v1.IX509CertificateDetails): google.cloud.iot.v1.X509CertificateDetails; + public static create(properties?: google.cloud.iot.v1.IListDeviceStatesResponse): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. - * @param message X509CertificateDetails message or plain object to encode + * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @param message ListDeviceStatesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. - * @param message X509CertificateDetails message or plain object to encode + * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @param message ListDeviceStatesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns X509CertificateDetails + * @returns ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.X509CertificateDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns X509CertificateDetails + * @returns ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.X509CertificateDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Verifies a X509CertificateDetails message. + * Verifies a ListDeviceStatesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns X509CertificateDetails + * @returns ListDeviceStatesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.X509CertificateDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. - * @param message X509CertificateDetails + * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. + * @param message ListDeviceStatesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.X509CertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this X509CertificateDetails to JSON. + * Converts this ListDeviceStatesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PublicKeyCertificate. */ - interface IPublicKeyCertificate { + /** Properties of a SendCommandToDeviceRequest. */ + interface ISendCommandToDeviceRequest { - /** PublicKeyCertificate format */ - format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|null); + /** SendCommandToDeviceRequest name */ + name?: (string|null); - /** PublicKeyCertificate certificate */ - certificate?: (string|null); + /** SendCommandToDeviceRequest binaryData */ + binaryData?: (Uint8Array|null); - /** PublicKeyCertificate x509Details */ - x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); + /** SendCommandToDeviceRequest subfolder */ + subfolder?: (string|null); } - /** Represents a PublicKeyCertificate. */ - class PublicKeyCertificate implements IPublicKeyCertificate { + /** Represents a SendCommandToDeviceRequest. */ + class SendCommandToDeviceRequest implements ISendCommandToDeviceRequest { /** - * Constructs a new PublicKeyCertificate. + * Constructs a new SendCommandToDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IPublicKeyCertificate); + constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest); - /** PublicKeyCertificate format. */ - public format: google.cloud.iot.v1.PublicKeyCertificateFormat; + /** SendCommandToDeviceRequest name. */ + public name: string; - /** PublicKeyCertificate certificate. */ - public certificate: string; + /** SendCommandToDeviceRequest binaryData. */ + public binaryData: Uint8Array; - /** PublicKeyCertificate x509Details. */ - public x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); + /** SendCommandToDeviceRequest subfolder. */ + public subfolder: string; /** - * Creates a new PublicKeyCertificate instance using the specified properties. + * Creates a new SendCommandToDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PublicKeyCertificate instance + * @returns SendCommandToDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IPublicKeyCertificate): google.cloud.iot.v1.PublicKeyCertificate; + public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. - * @param message PublicKeyCertificate message or plain object to encode + * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @param message SendCommandToDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. - * @param message PublicKeyCertificate message or plain object to encode + * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @param message SendCommandToDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PublicKeyCertificate + * @returns SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCertificate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PublicKeyCertificate + * @returns SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCertificate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Verifies a PublicKeyCertificate message. + * Verifies a SendCommandToDeviceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PublicKeyCertificate + * @returns SendCommandToDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCertificate; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. - * @param message PublicKeyCertificate + * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. + * @param message SendCommandToDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.PublicKeyCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PublicKeyCertificate to JSON. + * Converts this SendCommandToDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** PublicKeyCertificateFormat enum. */ - enum PublicKeyCertificateFormat { - UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, - X509_CERTIFICATE_PEM = 1 - } - - /** Properties of a DeviceCredential. */ - interface IDeviceCredential { - - /** DeviceCredential publicKey */ - publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); - - /** DeviceCredential expirationTime */ - expirationTime?: (google.protobuf.ITimestamp|null); + /** Properties of a SendCommandToDeviceResponse. */ + interface ISendCommandToDeviceResponse { } - /** Represents a DeviceCredential. */ - class DeviceCredential implements IDeviceCredential { + /** Represents a SendCommandToDeviceResponse. */ + class SendCommandToDeviceResponse implements ISendCommandToDeviceResponse { /** - * Constructs a new DeviceCredential. + * Constructs a new SendCommandToDeviceResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceCredential); - - /** DeviceCredential publicKey. */ - public publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); - - /** DeviceCredential expirationTime. */ - public expirationTime?: (google.protobuf.ITimestamp|null); - - /** DeviceCredential credential. */ - public credential?: "publicKey"; + constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse); /** - * Creates a new DeviceCredential instance using the specified properties. + * Creates a new SendCommandToDeviceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceCredential instance + * @returns SendCommandToDeviceResponse instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceCredential): google.cloud.iot.v1.DeviceCredential; + public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. - * @param message DeviceCredential message or plain object to encode + * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @param message SendCommandToDeviceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. - * @param message DeviceCredential message or plain object to encode + * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @param message SendCommandToDeviceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceCredential message from the specified reader or buffer. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceCredential + * @returns SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceCredential; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceCredential + * @returns SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceCredential; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Verifies a DeviceCredential message. + * Verifies a SendCommandToDeviceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceCredential + * @returns SendCommandToDeviceResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceCredential; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. - * @param message DeviceCredential + * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. + * @param message SendCommandToDeviceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceCredential to JSON. + * Converts this SendCommandToDeviceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PublicKeyCredential. */ - interface IPublicKeyCredential { + /** Properties of a BindDeviceToGatewayRequest. */ + interface IBindDeviceToGatewayRequest { - /** PublicKeyCredential format */ - format?: (google.cloud.iot.v1.PublicKeyFormat|null); + /** BindDeviceToGatewayRequest parent */ + parent?: (string|null); - /** PublicKeyCredential key */ - key?: (string|null); + /** BindDeviceToGatewayRequest gatewayId */ + gatewayId?: (string|null); + + /** BindDeviceToGatewayRequest deviceId */ + deviceId?: (string|null); } - /** Represents a PublicKeyCredential. */ - class PublicKeyCredential implements IPublicKeyCredential { + /** Represents a BindDeviceToGatewayRequest. */ + class BindDeviceToGatewayRequest implements IBindDeviceToGatewayRequest { /** - * Constructs a new PublicKeyCredential. + * Constructs a new BindDeviceToGatewayRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IPublicKeyCredential); + constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest); - /** PublicKeyCredential format. */ - public format: google.cloud.iot.v1.PublicKeyFormat; + /** BindDeviceToGatewayRequest parent. */ + public parent: string; - /** PublicKeyCredential key. */ - public key: string; + /** BindDeviceToGatewayRequest gatewayId. */ + public gatewayId: string; + + /** BindDeviceToGatewayRequest deviceId. */ + public deviceId: string; /** - * Creates a new PublicKeyCredential instance using the specified properties. + * Creates a new BindDeviceToGatewayRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PublicKeyCredential instance + * @returns BindDeviceToGatewayRequest instance */ - public static create(properties?: google.cloud.iot.v1.IPublicKeyCredential): google.cloud.iot.v1.PublicKeyCredential; + public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. - * @param message PublicKeyCredential message or plain object to encode + * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @param message BindDeviceToGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. - * @param message PublicKeyCredential message or plain object to encode + * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @param message BindDeviceToGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PublicKeyCredential + * @returns BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCredential; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PublicKeyCredential + * @returns BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCredential; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Verifies a PublicKeyCredential message. + * Verifies a BindDeviceToGatewayRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PublicKeyCredential + * @returns BindDeviceToGatewayRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCredential; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. - * @param message PublicKeyCredential + * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. + * @param message BindDeviceToGatewayRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.PublicKeyCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PublicKeyCredential to JSON. + * Converts this BindDeviceToGatewayRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** PublicKeyFormat enum. */ - enum PublicKeyFormat { - UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, - RSA_PEM = 3, - RSA_X509_PEM = 1, - ES256_PEM = 2, - ES256_X509_PEM = 4 - } - - /** Properties of a DeviceConfig. */ - interface IDeviceConfig { - - /** DeviceConfig version */ - version?: (number|Long|null); - - /** DeviceConfig cloudUpdateTime */ - cloudUpdateTime?: (google.protobuf.ITimestamp|null); - - /** DeviceConfig deviceAckTime */ - deviceAckTime?: (google.protobuf.ITimestamp|null); - - /** DeviceConfig binaryData */ - binaryData?: (Uint8Array|null); + /** Properties of a BindDeviceToGatewayResponse. */ + interface IBindDeviceToGatewayResponse { } - /** Represents a DeviceConfig. */ - class DeviceConfig implements IDeviceConfig { + /** Represents a BindDeviceToGatewayResponse. */ + class BindDeviceToGatewayResponse implements IBindDeviceToGatewayResponse { /** - * Constructs a new DeviceConfig. + * Constructs a new BindDeviceToGatewayResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceConfig); - - /** DeviceConfig version. */ - public version: (number|Long); - - /** DeviceConfig cloudUpdateTime. */ - public cloudUpdateTime?: (google.protobuf.ITimestamp|null); - - /** DeviceConfig deviceAckTime. */ - public deviceAckTime?: (google.protobuf.ITimestamp|null); - - /** DeviceConfig binaryData. */ - public binaryData: Uint8Array; + constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse); /** - * Creates a new DeviceConfig instance using the specified properties. + * Creates a new BindDeviceToGatewayResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceConfig instance + * @returns BindDeviceToGatewayResponse instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceConfig): google.cloud.iot.v1.DeviceConfig; + public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. - * @param message DeviceConfig message or plain object to encode + * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @param message BindDeviceToGatewayResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. - * @param message DeviceConfig message or plain object to encode + * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @param message BindDeviceToGatewayResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceConfig message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceConfig + * @returns BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceConfig + * @returns BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Verifies a DeviceConfig message. + * Verifies a BindDeviceToGatewayResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceConfig + * @returns BindDeviceToGatewayResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. - * @param message DeviceConfig + * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. + * @param message BindDeviceToGatewayResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceConfig to JSON. + * Converts this BindDeviceToGatewayResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeviceState. */ - interface IDeviceState { + /** Properties of an UnbindDeviceFromGatewayRequest. */ + interface IUnbindDeviceFromGatewayRequest { - /** DeviceState updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** UnbindDeviceFromGatewayRequest parent */ + parent?: (string|null); - /** DeviceState binaryData */ - binaryData?: (Uint8Array|null); + /** UnbindDeviceFromGatewayRequest gatewayId */ + gatewayId?: (string|null); + + /** UnbindDeviceFromGatewayRequest deviceId */ + deviceId?: (string|null); } - /** Represents a DeviceState. */ - class DeviceState implements IDeviceState { + /** Represents an UnbindDeviceFromGatewayRequest. */ + class UnbindDeviceFromGatewayRequest implements IUnbindDeviceFromGatewayRequest { /** - * Constructs a new DeviceState. + * Constructs a new UnbindDeviceFromGatewayRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceState); + constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest); - /** DeviceState updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** UnbindDeviceFromGatewayRequest parent. */ + public parent: string; - /** DeviceState binaryData. */ - public binaryData: Uint8Array; + /** UnbindDeviceFromGatewayRequest gatewayId. */ + public gatewayId: string; + + /** UnbindDeviceFromGatewayRequest deviceId. */ + public deviceId: string; /** - * Creates a new DeviceState instance using the specified properties. + * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceState instance + * @returns UnbindDeviceFromGatewayRequest instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceState): google.cloud.iot.v1.DeviceState; + public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. - * @param message DeviceState message or plain object to encode + * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @param message UnbindDeviceFromGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. - * @param message DeviceState message or plain object to encode + * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @param message UnbindDeviceFromGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceState message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceState + * @returns UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceState; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Decodes a DeviceState message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceState + * @returns UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceState; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Verifies a DeviceState message. + * Verifies an UnbindDeviceFromGatewayRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceState + * @returns UnbindDeviceFromGatewayRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceState; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Creates a plain object from a DeviceState message. Also converts values to other types if specified. - * @param message DeviceState + * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. + * @param message UnbindDeviceFromGatewayRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnbindDeviceFromGatewayRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbindDeviceFromGatewayResponse. */ + interface IUnbindDeviceFromGatewayResponse { + } + + /** Represents an UnbindDeviceFromGatewayResponse. */ + class UnbindDeviceFromGatewayResponse implements IUnbindDeviceFromGatewayResponse { + + /** + * Constructs a new UnbindDeviceFromGatewayResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse); + + /** + * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbindDeviceFromGatewayResponse instance + */ + public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @param message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @param message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbindDeviceFromGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbindDeviceFromGatewayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Verifies an UnbindDeviceFromGatewayResponse message. + * @param message Plain 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 UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbindDeviceFromGatewayResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; + + /** + * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. + * @param message UnbindDeviceFromGatewayResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnbindDeviceFromGatewayResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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|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; + + /** 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; - /** - * Converts this DeviceState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } + /** + * 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 }; - /** Namespace api. */ - namespace api { + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } /** Properties of a Http. */ interface IHttp { @@ -4669,232 +4895,6 @@ export namespace google { 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|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; - - /** 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 }; - } } /** Namespace protobuf. */ @@ -6754,11 +6754,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. */ diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 6a02020916f..ba9d9c8b819 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -66,687 +66,1429 @@ */ var v1 = {}; - v1.DeviceManager = (function() { + v1.Device = (function() { /** - * Constructs a new DeviceManager service. + * Properties of a Device. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceManager - * @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 IDevice + * @property {string|null} [id] Device id + * @property {string|null} [name] Device name + * @property {number|Long|null} [numId] Device numId + * @property {Array.|null} [credentials] Device credentials + * @property {google.protobuf.ITimestamp|null} [lastHeartbeatTime] Device lastHeartbeatTime + * @property {google.protobuf.ITimestamp|null} [lastEventTime] Device lastEventTime + * @property {google.protobuf.ITimestamp|null} [lastStateTime] Device lastStateTime + * @property {google.protobuf.ITimestamp|null} [lastConfigAckTime] Device lastConfigAckTime + * @property {google.protobuf.ITimestamp|null} [lastConfigSendTime] Device lastConfigSendTime + * @property {boolean|null} [blocked] Device blocked + * @property {google.protobuf.ITimestamp|null} [lastErrorTime] Device lastErrorTime + * @property {google.rpc.IStatus|null} [lastErrorStatus] Device lastErrorStatus + * @property {google.cloud.iot.v1.IDeviceConfig|null} [config] Device config + * @property {google.cloud.iot.v1.IDeviceState|null} [state] Device state + * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] Device logLevel + * @property {Object.|null} [metadata] Device metadata + * @property {google.cloud.iot.v1.IGatewayConfig|null} [gatewayConfig] Device gatewayConfig */ - function DeviceManager(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DeviceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceManager; /** - * Creates new DeviceManager service using the specified rpc implementation. - * @function create - * @memberof google.cloud.iot.v1.DeviceManager - * @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 {DeviceManager} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new Device. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a Device. + * @implements IDevice + * @constructor + * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set */ - DeviceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function Device(properties) { + this.credentials = []; + this.metadata = {}; + if (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.cloud.iot.v1.DeviceManager#createDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef CreateDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + * Device id. + * @member {string} id + * @memberof google.cloud.iot.v1.Device + * @instance */ + Device.prototype.id = ""; /** - * Calls CreateDeviceRegistry. - * @function createDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device name. + * @member {string} name + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.createDeviceRegistry = function createDeviceRegistry(request, callback) { - return this.rpcCall(createDeviceRegistry, $root.google.cloud.iot.v1.CreateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); - }, "name", { value: "CreateDeviceRegistry" }); + Device.prototype.name = ""; /** - * Calls CreateDeviceRegistry. - * @function createDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device numId. + * @member {number|Long} numId + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Device.prototype.numId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef GetDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + * Device credentials. + * @member {Array.} credentials + * @memberof google.cloud.iot.v1.Device + * @instance */ + Device.prototype.credentials = $util.emptyArray; /** - * Calls GetDeviceRegistry. - * @function getDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device lastHeartbeatTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastHeartbeatTime + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.getDeviceRegistry = function getDeviceRegistry(request, callback) { - return this.rpcCall(getDeviceRegistry, $root.google.cloud.iot.v1.GetDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); - }, "name", { value: "GetDeviceRegistry" }); + Device.prototype.lastHeartbeatTime = null; /** - * Calls GetDeviceRegistry. - * @function getDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device lastEventTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastEventTime + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Device.prototype.lastEventTime = null; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef UpdateDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + * Device lastStateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastStateTime + * @memberof google.cloud.iot.v1.Device + * @instance */ + Device.prototype.lastStateTime = null; /** - * Calls UpdateDeviceRegistry. - * @function updateDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device lastConfigAckTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConfigAckTime + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.updateDeviceRegistry = function updateDeviceRegistry(request, callback) { - return this.rpcCall(updateDeviceRegistry, $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); - }, "name", { value: "UpdateDeviceRegistry" }); + Device.prototype.lastConfigAckTime = null; /** - * Calls UpdateDeviceRegistry. - * @function updateDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device lastConfigSendTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConfigSendTime + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Device.prototype.lastConfigSendTime = null; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef DeleteDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Device blocked. + * @member {boolean} blocked + * @memberof google.cloud.iot.v1.Device + * @instance */ + Device.prototype.blocked = false; /** - * Calls DeleteDeviceRegistry. - * @function deleteDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device lastErrorTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastErrorTime + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.deleteDeviceRegistry = function deleteDeviceRegistry(request, callback) { - return this.rpcCall(deleteDeviceRegistry, $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDeviceRegistry" }); + Device.prototype.lastErrorTime = null; /** - * Calls DeleteDeviceRegistry. - * @function deleteDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Device lastErrorStatus. + * @member {google.rpc.IStatus|null|undefined} lastErrorStatus + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Device.prototype.lastErrorStatus = null; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDeviceRegistriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} [response] ListDeviceRegistriesResponse + * Device config. + * @member {google.cloud.iot.v1.IDeviceConfig|null|undefined} config + * @memberof google.cloud.iot.v1.Device + * @instance */ + Device.prototype.config = null; /** - * Calls ListDeviceRegistries. - * @function listDeviceRegistries - * @memberof google.cloud.iot.v1.DeviceManager + * Device state. + * @member {google.cloud.iot.v1.IDeviceState|null|undefined} state + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback} callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.listDeviceRegistries = function listDeviceRegistries(request, callback) { - return this.rpcCall(listDeviceRegistries, $root.google.cloud.iot.v1.ListDeviceRegistriesRequest, $root.google.cloud.iot.v1.ListDeviceRegistriesResponse, request, callback); - }, "name", { value: "ListDeviceRegistries" }); + Device.prototype.state = null; /** - * Calls ListDeviceRegistries. - * @function listDeviceRegistries - * @memberof google.cloud.iot.v1.DeviceManager + * Device logLevel. + * @member {google.cloud.iot.v1.LogLevel} logLevel + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Device.prototype.logLevel = 0; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef CreateDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.Device} [response] Device + * Device metadata. + * @member {Object.} metadata + * @memberof google.cloud.iot.v1.Device + * @instance */ + Device.prototype.metadata = $util.emptyObject; /** - * Calls CreateDevice. - * @function createDevice - * @memberof google.cloud.iot.v1.DeviceManager + * Device gatewayConfig. + * @member {google.cloud.iot.v1.IGatewayConfig|null|undefined} gatewayConfig + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceCallback} callback Node-style callback called with the error, if any, and Device - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.createDevice = function createDevice(request, callback) { - return this.rpcCall(createDevice, $root.google.cloud.iot.v1.CreateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); - }, "name", { value: "CreateDevice" }); + Device.prototype.gatewayConfig = null; + + /** + * Creates a new Device instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set + * @returns {google.cloud.iot.v1.Device} Device instance + */ + Device.create = function create(properties) { + return new Device(properties); + }; + + /** + * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Device.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.numId != null && message.hasOwnProperty("numId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.numId); + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + $root.google.protobuf.Timestamp.encode(message.lastHeartbeatTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + $root.google.protobuf.Timestamp.encode(message.lastEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + $root.google.protobuf.Timestamp.encode(message.lastErrorTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + $root.google.rpc.Status.encode(message.lastErrorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.credentials != null && message.credentials.length) + for (var i = 0; i < message.credentials.length; ++i) + $root.google.cloud.iot.v1.DeviceCredential.encode(message.credentials[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.config != null && message.hasOwnProperty("config")) + $root.google.cloud.iot.v1.DeviceConfig.encode(message.config, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + $root.google.protobuf.Timestamp.encode(message.lastConfigAckTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + $root.google.cloud.iot.v1.DeviceState.encode(message.state, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + $root.google.protobuf.Timestamp.encode(message.lastConfigSendTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.blocked != null && message.hasOwnProperty("blocked")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.blocked); + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + $root.google.protobuf.Timestamp.encode(message.lastStateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.logLevel); + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + $root.google.cloud.iot.v1.GatewayConfig.encode(message.gatewayConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Device.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Device message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.Device + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.Device} Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Device.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.numId = reader.uint64(); + break; + case 12: + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); + break; + case 7: + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 20: + message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 18: + message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 19: + message.blocked = reader.bool(); + break; + case 10: + message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 13: + message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); + break; + case 16: + message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); + break; + case 21: + message.logLevel = reader.int32(); + break; + case 17: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); + break; + case 24: + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Device message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.Device + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.Device} Device + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Device.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Device message. + * @function verify + * @memberof google.cloud.iot.v1.Device + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Device.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.numId != null && message.hasOwnProperty("numId")) + if (!$util.isInteger(message.numId) && !(message.numId && $util.isInteger(message.numId.low) && $util.isInteger(message.numId.high))) + return "numId: integer|Long expected"; + if (message.credentials != null && message.hasOwnProperty("credentials")) { + if (!Array.isArray(message.credentials)) + return "credentials: array expected"; + for (var i = 0; i < message.credentials.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceCredential.verify(message.credentials[i]); + if (error) + return "credentials." + error; + } + } + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastHeartbeatTime); + if (error) + return "lastHeartbeatTime." + error; + } + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastEventTime); + if (error) + return "lastEventTime." + error; + } + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastStateTime); + if (error) + return "lastStateTime." + error; + } + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConfigAckTime); + if (error) + return "lastConfigAckTime." + error; + } + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConfigSendTime); + if (error) + return "lastConfigSendTime." + error; + } + if (message.blocked != null && message.hasOwnProperty("blocked")) + if (typeof message.blocked !== "boolean") + return "blocked: boolean expected"; + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastErrorTime); + if (error) + return "lastErrorTime." + error; + } + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) { + var error = $root.google.rpc.Status.verify(message.lastErrorStatus); + if (error) + return "lastErrorStatus." + error; + } + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.iot.v1.DeviceState.verify(message.state); + if (error) + return "state." + error; + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 10: + case 20: + case 30: + case 40: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) { + var error = $root.google.cloud.iot.v1.GatewayConfig.verify(message.gatewayConfig); + if (error) + return "gatewayConfig." + error; + } + return null; + }; + + /** + * Creates a Device message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.Device + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.Device} Device + */ + Device.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.Device) + return object; + var message = new $root.google.cloud.iot.v1.Device(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.numId != null) + if ($util.Long) + (message.numId = $util.Long.fromValue(object.numId)).unsigned = true; + else if (typeof object.numId === "string") + message.numId = parseInt(object.numId, 10); + else if (typeof object.numId === "number") + message.numId = object.numId; + else if (typeof object.numId === "object") + message.numId = new $util.LongBits(object.numId.low >>> 0, object.numId.high >>> 0).toNumber(true); + if (object.credentials) { + if (!Array.isArray(object.credentials)) + throw TypeError(".google.cloud.iot.v1.Device.credentials: array expected"); + message.credentials = []; + for (var i = 0; i < object.credentials.length; ++i) { + if (typeof object.credentials[i] !== "object") + throw TypeError(".google.cloud.iot.v1.Device.credentials: object expected"); + message.credentials[i] = $root.google.cloud.iot.v1.DeviceCredential.fromObject(object.credentials[i]); + } + } + if (object.lastHeartbeatTime != null) { + if (typeof object.lastHeartbeatTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastHeartbeatTime: object expected"); + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.fromObject(object.lastHeartbeatTime); + } + if (object.lastEventTime != null) { + if (typeof object.lastEventTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastEventTime: object expected"); + message.lastEventTime = $root.google.protobuf.Timestamp.fromObject(object.lastEventTime); + } + if (object.lastStateTime != null) { + if (typeof object.lastStateTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastStateTime: object expected"); + message.lastStateTime = $root.google.protobuf.Timestamp.fromObject(object.lastStateTime); + } + if (object.lastConfigAckTime != null) { + if (typeof object.lastConfigAckTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastConfigAckTime: object expected"); + message.lastConfigAckTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigAckTime); + } + if (object.lastConfigSendTime != null) { + if (typeof object.lastConfigSendTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastConfigSendTime: object expected"); + message.lastConfigSendTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigSendTime); + } + if (object.blocked != null) + message.blocked = Boolean(object.blocked); + if (object.lastErrorTime != null) { + if (typeof object.lastErrorTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastErrorTime: object expected"); + message.lastErrorTime = $root.google.protobuf.Timestamp.fromObject(object.lastErrorTime); + } + if (object.lastErrorStatus != null) { + if (typeof object.lastErrorStatus !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastErrorStatus: object expected"); + message.lastErrorStatus = $root.google.rpc.Status.fromObject(object.lastErrorStatus); + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.iot.v1.Device.config: object expected"); + message.config = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.config); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.iot.v1.Device.state: object expected"); + message.state = $root.google.cloud.iot.v1.DeviceState.fromObject(object.state); + } + switch (object.logLevel) { + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "NONE": + case 10: + message.logLevel = 10; + break; + case "ERROR": + case 20: + message.logLevel = 20; + break; + case "INFO": + case 30: + message.logLevel = 30; + break; + case "DEBUG": + case 40: + message.logLevel = 40; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.iot.v1.Device.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.gatewayConfig != null) { + if (typeof object.gatewayConfig !== "object") + throw TypeError(".google.cloud.iot.v1.Device.gatewayConfig: object expected"); + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.fromObject(object.gatewayConfig); + } + return message; + }; + + /** + * Creates a plain object from a Device message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.Device + * @static + * @param {google.cloud.iot.v1.Device} message Device + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Device.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.credentials = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.numId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numId = options.longs === String ? "0" : 0; + object.lastHeartbeatTime = null; + object.lastEventTime = null; + object.lastErrorTime = null; + object.lastErrorStatus = null; + object.config = null; + object.lastConfigAckTime = null; + object.state = null; + object.lastConfigSendTime = null; + object.blocked = false; + object.lastStateTime = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + object.gatewayConfig = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numId != null && message.hasOwnProperty("numId")) + if (typeof message.numId === "number") + object.numId = options.longs === String ? String(message.numId) : message.numId; + else + object.numId = options.longs === String ? $util.Long.prototype.toString.call(message.numId) : options.longs === Number ? new $util.LongBits(message.numId.low >>> 0, message.numId.high >>> 0).toNumber(true) : message.numId; + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + object.lastHeartbeatTime = $root.google.protobuf.Timestamp.toObject(message.lastHeartbeatTime, options); + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + object.lastEventTime = $root.google.protobuf.Timestamp.toObject(message.lastEventTime, options); + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + object.lastErrorTime = $root.google.protobuf.Timestamp.toObject(message.lastErrorTime, options); + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + object.lastErrorStatus = $root.google.rpc.Status.toObject(message.lastErrorStatus, options); + if (message.credentials && message.credentials.length) { + object.credentials = []; + for (var j = 0; j < message.credentials.length; ++j) + object.credentials[j] = $root.google.cloud.iot.v1.DeviceCredential.toObject(message.credentials[j], options); + } + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.config, options); + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + object.lastConfigAckTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigAckTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.iot.v1.DeviceState.toObject(message.state, options); + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + object.lastConfigSendTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigSendTime, options); + if (message.blocked != null && message.hasOwnProperty("blocked")) + object.blocked = message.blocked; + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + object.lastStateTime = $root.google.protobuf.Timestamp.toObject(message.lastStateTime, options); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + object.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.toObject(message.gatewayConfig, options); + return object; + }; /** - * Calls CreateDevice. - * @function createDevice - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this Device to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.Device * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + Device.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef GetDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.Device} [response] Device - */ + return Device; + })(); - /** - * Calls GetDevice. - * @function getDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.GetDeviceCallback} callback Node-style callback called with the error, if any, and Device - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DeviceManager.prototype.getDevice = function getDevice(request, callback) { - return this.rpcCall(getDevice, $root.google.cloud.iot.v1.GetDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); - }, "name", { value: "GetDevice" }); + v1.GatewayConfig = (function() { /** - * Calls GetDevice. - * @function getDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GatewayConfig. + * @memberof google.cloud.iot.v1 + * @interface IGatewayConfig + * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayConfig gatewayType + * @property {google.cloud.iot.v1.GatewayAuthMethod|null} [gatewayAuthMethod] GatewayConfig gatewayAuthMethod + * @property {string|null} [lastAccessedGatewayId] GatewayConfig lastAccessedGatewayId + * @property {google.protobuf.ITimestamp|null} [lastAccessedGatewayTime] GatewayConfig lastAccessedGatewayTime */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef UpdateDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.Device} [response] Device + * Constructs a new GatewayConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a GatewayConfig. + * @implements IGatewayConfig + * @constructor + * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set */ + function GatewayConfig(properties) { + if (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 UpdateDevice. - * @function updateDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayConfig gatewayType. + * @member {google.cloud.iot.v1.GatewayType} gatewayType + * @memberof google.cloud.iot.v1.GatewayConfig * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback} callback Node-style callback called with the error, if any, and Device - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.updateDevice = function updateDevice(request, callback) { - return this.rpcCall(updateDevice, $root.google.cloud.iot.v1.UpdateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); - }, "name", { value: "UpdateDevice" }); + GatewayConfig.prototype.gatewayType = 0; /** - * Calls UpdateDevice. - * @function updateDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayConfig gatewayAuthMethod. + * @member {google.cloud.iot.v1.GatewayAuthMethod} gatewayAuthMethod + * @memberof google.cloud.iot.v1.GatewayConfig * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef DeleteDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty */ + GatewayConfig.prototype.gatewayAuthMethod = 0; /** - * Calls DeleteDevice. - * @function deleteDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayConfig lastAccessedGatewayId. + * @member {string} lastAccessedGatewayId + * @memberof google.cloud.iot.v1.GatewayConfig * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.deleteDevice = function deleteDevice(request, callback) { - return this.rpcCall(deleteDevice, $root.google.cloud.iot.v1.DeleteDeviceRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDevice" }); + GatewayConfig.prototype.lastAccessedGatewayId = ""; /** - * Calls DeleteDevice. - * @function deleteDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayConfig lastAccessedGatewayTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastAccessedGatewayTime + * @memberof google.cloud.iot.v1.GatewayConfig * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GatewayConfig.prototype.lastAccessedGatewayTime = null; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDevicesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDevicesResponse} [response] ListDevicesResponse + * Creates a new GatewayConfig instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig instance */ + GatewayConfig.create = function create(properties) { + return new GatewayConfig(properties); + }; /** - * Calls ListDevices. - * @function listDevices - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDevicesCallback} callback Node-style callback called with the error, if any, and ListDevicesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DeviceManager.prototype.listDevices = function listDevices(request, callback) { - return this.rpcCall(listDevices, $root.google.cloud.iot.v1.ListDevicesRequest, $root.google.cloud.iot.v1.ListDevicesResponse, request, callback); - }, "name", { value: "ListDevices" }); + GatewayConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gatewayAuthMethod); + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAccessedGatewayId); + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + $root.google.protobuf.Timestamp.encode(message.lastAccessedGatewayTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; /** - * Calls ListDevices. - * @function listDevices - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GatewayConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ModifyCloudToDeviceConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceConfig} [response] DeviceConfig + * Decodes a GatewayConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GatewayConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gatewayType = reader.int32(); + break; + case 2: + message.gatewayAuthMethod = reader.int32(); + break; + case 3: + message.lastAccessedGatewayId = reader.string(); + break; + case 4: + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ModifyCloudToDeviceConfig. - * @function modifyCloudToDeviceConfig - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback} callback Node-style callback called with the error, if any, and DeviceConfig - * @returns {undefined} - * @variation 1 + * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DeviceManager.prototype.modifyCloudToDeviceConfig = function modifyCloudToDeviceConfig(request, callback) { - return this.rpcCall(modifyCloudToDeviceConfig, $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, $root.google.cloud.iot.v1.DeviceConfig, request, callback); - }, "name", { value: "ModifyCloudToDeviceConfig" }); + GatewayConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ModifyCloudToDeviceConfig. - * @function modifyCloudToDeviceConfig - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GatewayConfig message. + * @function verify + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GatewayConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + switch (message.gatewayType) { + default: + return "gatewayType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + switch (message.gatewayAuthMethod) { + default: + return "gatewayAuthMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + if (!$util.isString(message.lastAccessedGatewayId)) + return "lastAccessedGatewayId: string expected"; + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastAccessedGatewayTime); + if (error) + return "lastAccessedGatewayTime." + error; + } + return null; + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDeviceConfigVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} [response] ListDeviceConfigVersionsResponse + * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig */ + GatewayConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GatewayConfig) + return object; + var message = new $root.google.cloud.iot.v1.GatewayConfig(); + switch (object.gatewayType) { + case "GATEWAY_TYPE_UNSPECIFIED": + case 0: + message.gatewayType = 0; + break; + case "GATEWAY": + case 1: + message.gatewayType = 1; + break; + case "NON_GATEWAY": + case 2: + message.gatewayType = 2; + break; + } + switch (object.gatewayAuthMethod) { + case "GATEWAY_AUTH_METHOD_UNSPECIFIED": + case 0: + message.gatewayAuthMethod = 0; + break; + case "ASSOCIATION_ONLY": + case 1: + message.gatewayAuthMethod = 1; + break; + case "DEVICE_AUTH_TOKEN_ONLY": + case 2: + message.gatewayAuthMethod = 2; + break; + case "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": + case 3: + message.gatewayAuthMethod = 3; + break; + } + if (object.lastAccessedGatewayId != null) + message.lastAccessedGatewayId = String(object.lastAccessedGatewayId); + if (object.lastAccessedGatewayTime != null) { + if (typeof object.lastAccessedGatewayTime !== "object") + throw TypeError(".google.cloud.iot.v1.GatewayConfig.lastAccessedGatewayTime: object expected"); + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.fromObject(object.lastAccessedGatewayTime); + } + return message; + }; /** - * Calls ListDeviceConfigVersions. - * @function listDeviceConfigVersions - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback} callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {google.cloud.iot.v1.GatewayConfig} message GatewayConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DeviceManager.prototype.listDeviceConfigVersions = function listDeviceConfigVersions(request, callback) { - return this.rpcCall(listDeviceConfigVersions, $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest, $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse, request, callback); - }, "name", { value: "ListDeviceConfigVersions" }); + GatewayConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gatewayType = options.enums === String ? "GATEWAY_TYPE_UNSPECIFIED" : 0; + object.gatewayAuthMethod = options.enums === String ? "GATEWAY_AUTH_METHOD_UNSPECIFIED" : 0; + object.lastAccessedGatewayId = ""; + object.lastAccessedGatewayTime = null; + } + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + object.lastAccessedGatewayId = message.lastAccessedGatewayId; + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + object.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.toObject(message.lastAccessedGatewayTime, options); + return object; + }; /** - * Calls ListDeviceConfigVersions. - * @function listDeviceConfigVersions - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this GatewayConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.GatewayConfig * @instance - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GatewayConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDeviceStatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDeviceStatesResponse} [response] ListDeviceStatesResponse - */ + return GatewayConfig; + })(); - /** - * Calls ListDeviceStates. - * @function listDeviceStates - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback} callback Node-style callback called with the error, if any, and ListDeviceStatesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DeviceManager.prototype.listDeviceStates = function listDeviceStates(request, callback) { - return this.rpcCall(listDeviceStates, $root.google.cloud.iot.v1.ListDeviceStatesRequest, $root.google.cloud.iot.v1.ListDeviceStatesResponse, request, callback); - }, "name", { value: "ListDeviceStates" }); + v1.DeviceRegistry = (function() { /** - * Calls ListDeviceStates. - * @function listDeviceStates - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a DeviceRegistry. + * @memberof google.cloud.iot.v1 + * @interface IDeviceRegistry + * @property {string|null} [id] DeviceRegistry id + * @property {string|null} [name] DeviceRegistry name + * @property {Array.|null} [eventNotificationConfigs] DeviceRegistry eventNotificationConfigs + * @property {google.cloud.iot.v1.IStateNotificationConfig|null} [stateNotificationConfig] DeviceRegistry stateNotificationConfig + * @property {google.cloud.iot.v1.IMqttConfig|null} [mqttConfig] DeviceRegistry mqttConfig + * @property {google.cloud.iot.v1.IHttpConfig|null} [httpConfig] DeviceRegistry httpConfig + * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] DeviceRegistry logLevel + * @property {Array.|null} [credentials] DeviceRegistry credentials */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Constructs a new DeviceRegistry. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceRegistry. + * @implements IDeviceRegistry + * @constructor + * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set */ + function DeviceRegistry(properties) { + this.eventNotificationConfigs = []; + this.credentials = []; + if (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 SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager + * DeviceRegistry id. + * @member {string} id + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); + DeviceRegistry.prototype.id = ""; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager + * DeviceRegistry name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeviceRegistry.prototype.name = ""; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * DeviceRegistry eventNotificationConfigs. + * @member {Array.} eventNotificationConfigs + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance */ + DeviceRegistry.prototype.eventNotificationConfigs = $util.emptyArray; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager + * DeviceRegistry stateNotificationConfig. + * @member {google.cloud.iot.v1.IStateNotificationConfig|null|undefined} stateNotificationConfig + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); + DeviceRegistry.prototype.stateNotificationConfig = null; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager + * DeviceRegistry mqttConfig. + * @member {google.cloud.iot.v1.IMqttConfig|null|undefined} mqttConfig + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeviceRegistry.prototype.mqttConfig = null; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + * DeviceRegistry httpConfig. + * @member {google.cloud.iot.v1.IHttpConfig|null|undefined} httpConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance */ + DeviceRegistry.prototype.httpConfig = null; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.iot.v1.DeviceManager + * DeviceRegistry logLevel. + * @member {google.cloud.iot.v1.LogLevel} logLevel + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); + DeviceRegistry.prototype.logLevel = 0; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.iot.v1.DeviceManager + * DeviceRegistry credentials. + * @member {Array.} credentials + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeviceRegistry.prototype.credentials = $util.emptyArray; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef SendCommandToDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} [response] SendCommandToDeviceResponse + * Creates a new DeviceRegistry instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry instance */ + DeviceRegistry.create = function create(properties) { + return new DeviceRegistry(properties); + }; /** - * Calls SendCommandToDevice. - * @function sendCommandToDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback} callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DeviceManager.prototype.sendCommandToDevice = function sendCommandToDevice(request, callback) { - return this.rpcCall(sendCommandToDevice, $root.google.cloud.iot.v1.SendCommandToDeviceRequest, $root.google.cloud.iot.v1.SendCommandToDeviceResponse, request, callback); - }, "name", { value: "SendCommandToDevice" }); + DeviceRegistry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + $root.google.cloud.iot.v1.MqttConfig.encode(message.mqttConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + $root.google.cloud.iot.v1.StateNotificationConfig.encode(message.stateNotificationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.credentials != null && message.credentials.length) + for (var i = 0; i < message.credentials.length; ++i) + $root.google.cloud.iot.v1.RegistryCredential.encode(message.credentials[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + $root.google.cloud.iot.v1.HttpConfig.encode(message.httpConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventNotificationConfigs != null && message.eventNotificationConfigs.length) + for (var i = 0; i < message.eventNotificationConfigs.length; ++i) + $root.google.cloud.iot.v1.EventNotificationConfig.encode(message.eventNotificationConfigs[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logLevel); + return writer; + }; /** - * Calls SendCommandToDevice. - * @function sendCommandToDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeviceRegistry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef BindDeviceToGatewayCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} [response] BindDeviceToGatewayResponse + * Decodes a DeviceRegistry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeviceRegistry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceRegistry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 10: + if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) + message.eventNotificationConfigs = []; + message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); + break; + case 7: + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); + break; + case 4: + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); + break; + case 9: + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); + break; + case 11: + message.logLevel = reader.int32(); + break; + case 8: + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls BindDeviceToGateway. - * @function bindDeviceToGateway - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback} callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse - * @returns {undefined} - * @variation 1 + * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DeviceManager.prototype.bindDeviceToGateway = function bindDeviceToGateway(request, callback) { - return this.rpcCall(bindDeviceToGateway, $root.google.cloud.iot.v1.BindDeviceToGatewayRequest, $root.google.cloud.iot.v1.BindDeviceToGatewayResponse, request, callback); - }, "name", { value: "BindDeviceToGateway" }); - - /** - * Calls BindDeviceToGateway. - * @function bindDeviceToGateway - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + DeviceRegistry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceRegistry message. + * @function verify + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + DeviceRegistry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.eventNotificationConfigs != null && message.hasOwnProperty("eventNotificationConfigs")) { + if (!Array.isArray(message.eventNotificationConfigs)) + return "eventNotificationConfigs: array expected"; + for (var i = 0; i < message.eventNotificationConfigs.length; ++i) { + var error = $root.google.cloud.iot.v1.EventNotificationConfig.verify(message.eventNotificationConfigs[i]); + if (error) + return "eventNotificationConfigs." + error; + } + } + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) { + var error = $root.google.cloud.iot.v1.StateNotificationConfig.verify(message.stateNotificationConfig); + if (error) + return "stateNotificationConfig." + error; + } + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) { + var error = $root.google.cloud.iot.v1.MqttConfig.verify(message.mqttConfig); + if (error) + return "mqttConfig." + error; + } + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) { + var error = $root.google.cloud.iot.v1.HttpConfig.verify(message.httpConfig); + if (error) + return "httpConfig." + error; + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 10: + case 20: + case 30: + case 40: + break; + } + if (message.credentials != null && message.hasOwnProperty("credentials")) { + if (!Array.isArray(message.credentials)) + return "credentials: array expected"; + for (var i = 0; i < message.credentials.length; ++i) { + var error = $root.google.cloud.iot.v1.RegistryCredential.verify(message.credentials[i]); + if (error) + return "credentials." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef UnbindDeviceFromGatewayCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} [response] UnbindDeviceFromGatewayResponse + * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry */ + DeviceRegistry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceRegistry) + return object; + var message = new $root.google.cloud.iot.v1.DeviceRegistry(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.eventNotificationConfigs) { + if (!Array.isArray(object.eventNotificationConfigs)) + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: array expected"); + message.eventNotificationConfigs = []; + for (var i = 0; i < object.eventNotificationConfigs.length; ++i) { + if (typeof object.eventNotificationConfigs[i] !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: object expected"); + message.eventNotificationConfigs[i] = $root.google.cloud.iot.v1.EventNotificationConfig.fromObject(object.eventNotificationConfigs[i]); + } + } + if (object.stateNotificationConfig != null) { + if (typeof object.stateNotificationConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.stateNotificationConfig: object expected"); + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.fromObject(object.stateNotificationConfig); + } + if (object.mqttConfig != null) { + if (typeof object.mqttConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.mqttConfig: object expected"); + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.fromObject(object.mqttConfig); + } + if (object.httpConfig != null) { + if (typeof object.httpConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.httpConfig: object expected"); + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.fromObject(object.httpConfig); + } + switch (object.logLevel) { + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "NONE": + case 10: + message.logLevel = 10; + break; + case "ERROR": + case 20: + message.logLevel = 20; + break; + case "INFO": + case 30: + message.logLevel = 30; + break; + case "DEBUG": + case 40: + message.logLevel = 40; + break; + } + if (object.credentials) { + if (!Array.isArray(object.credentials)) + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: array expected"); + message.credentials = []; + for (var i = 0; i < object.credentials.length; ++i) { + if (typeof object.credentials[i] !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: object expected"); + message.credentials[i] = $root.google.cloud.iot.v1.RegistryCredential.fromObject(object.credentials[i]); + } + } + return message; + }; /** - * Calls UnbindDeviceFromGateway. - * @function unbindDeviceFromGateway - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback} callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {google.cloud.iot.v1.DeviceRegistry} message DeviceRegistry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DeviceManager.prototype.unbindDeviceFromGateway = function unbindDeviceFromGateway(request, callback) { - return this.rpcCall(unbindDeviceFromGateway, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, request, callback); - }, "name", { value: "UnbindDeviceFromGateway" }); + DeviceRegistry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.credentials = []; + object.eventNotificationConfigs = []; + } + if (options.defaults) { + object.id = ""; + object.name = ""; + object.mqttConfig = null; + object.stateNotificationConfig = null; + object.httpConfig = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + object.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.toObject(message.mqttConfig, options); + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + object.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.toObject(message.stateNotificationConfig, options); + if (message.credentials && message.credentials.length) { + object.credentials = []; + for (var j = 0; j < message.credentials.length; ++j) + object.credentials[j] = $root.google.cloud.iot.v1.RegistryCredential.toObject(message.credentials[j], options); + } + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + object.httpConfig = $root.google.cloud.iot.v1.HttpConfig.toObject(message.httpConfig, options); + if (message.eventNotificationConfigs && message.eventNotificationConfigs.length) { + object.eventNotificationConfigs = []; + for (var j = 0; j < message.eventNotificationConfigs.length; ++j) + object.eventNotificationConfigs[j] = $root.google.cloud.iot.v1.EventNotificationConfig.toObject(message.eventNotificationConfigs[j], options); + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + return object; + }; /** - * Calls UnbindDeviceFromGateway. - * @function unbindDeviceFromGateway - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this DeviceRegistry to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + DeviceRegistry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeviceManager; + return DeviceRegistry; })(); - v1.CreateDeviceRegistryRequest = (function() { + v1.MqttConfig = (function() { /** - * Properties of a CreateDeviceRegistryRequest. + * Properties of a MqttConfig. * @memberof google.cloud.iot.v1 - * @interface ICreateDeviceRegistryRequest - * @property {string|null} [parent] CreateDeviceRegistryRequest parent - * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] CreateDeviceRegistryRequest deviceRegistry + * @interface IMqttConfig + * @property {google.cloud.iot.v1.MqttState|null} [mqttEnabledState] MqttConfig mqttEnabledState */ /** - * Constructs a new CreateDeviceRegistryRequest. + * Constructs a new MqttConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a CreateDeviceRegistryRequest. - * @implements ICreateDeviceRegistryRequest + * @classdesc Represents a MqttConfig. + * @implements IMqttConfig * @constructor - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set */ - function CreateDeviceRegistryRequest(properties) { + function MqttConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -754,88 +1496,75 @@ } /** - * CreateDeviceRegistryRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest - * @instance - */ - CreateDeviceRegistryRequest.prototype.parent = ""; - - /** - * CreateDeviceRegistryRequest deviceRegistry. - * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * MqttConfig mqttEnabledState. + * @member {google.cloud.iot.v1.MqttState} mqttEnabledState + * @memberof google.cloud.iot.v1.MqttConfig * @instance */ - CreateDeviceRegistryRequest.prototype.deviceRegistry = null; + MqttConfig.prototype.mqttEnabledState = 0; /** - * Creates a new CreateDeviceRegistryRequest instance using the specified properties. + * Creates a new MqttConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig instance */ - CreateDeviceRegistryRequest.create = function create(properties) { - return new CreateDeviceRegistryRequest(properties); + MqttConfig.create = function create(properties) { + return new MqttConfig(properties); }; /** - * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRegistryRequest.encode = function encode(message, writer) { + MqttConfig.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mqttEnabledState); return writer; }; /** - * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + MqttConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a MqttConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRegistryRequest.decode = function decode(reader, length) { + MqttConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.MqttConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + message.mqttEnabledState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -846,121 +1575,141 @@ }; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a MqttConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + MqttConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDeviceRegistryRequest message. + * Verifies a MqttConfig message. * @function verify - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDeviceRegistryRequest.verify = function verify(message) { + MqttConfig.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { - var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); - if (error) - return "deviceRegistry." + error; - } + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + switch (message.mqttEnabledState) { + default: + return "mqttEnabledState: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig */ - CreateDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRegistryRequest) + MqttConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.MqttConfig) return object; - var message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deviceRegistry != null) { - if (typeof object.deviceRegistry !== "object") - throw TypeError(".google.cloud.iot.v1.CreateDeviceRegistryRequest.deviceRegistry: object expected"); - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); + var message = new $root.google.cloud.iot.v1.MqttConfig(); + switch (object.mqttEnabledState) { + case "MQTT_STATE_UNSPECIFIED": + case 0: + message.mqttEnabledState = 0; + break; + case "MQTT_ENABLED": + case 1: + message.mqttEnabledState = 1; + break; + case "MQTT_DISABLED": + case 2: + message.mqttEnabledState = 2; + break; } return message; }; /** - * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.CreateDeviceRegistryRequest} message CreateDeviceRegistryRequest + * @param {google.cloud.iot.v1.MqttConfig} message MqttConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDeviceRegistryRequest.toObject = function toObject(message, options) { + MqttConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.deviceRegistry = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); + if (options.defaults) + object.mqttEnabledState = options.enums === String ? "MQTT_STATE_UNSPECIFIED" : 0; + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; return object; }; /** - * Converts this CreateDeviceRegistryRequest to JSON. + * Converts this MqttConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.MqttConfig * @instance * @returns {Object.} JSON object */ - CreateDeviceRegistryRequest.prototype.toJSON = function toJSON() { + MqttConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDeviceRegistryRequest; + return MqttConfig; })(); - v1.GetDeviceRegistryRequest = (function() { + /** + * MqttState enum. + * @name google.cloud.iot.v1.MqttState + * @enum {string} + * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value + * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value + * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value + */ + v1.MqttState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MQTT_ENABLED"] = 1; + values[valuesById[2] = "MQTT_DISABLED"] = 2; + return values; + })(); + + v1.HttpConfig = (function() { /** - * Properties of a GetDeviceRegistryRequest. + * Properties of a HttpConfig. * @memberof google.cloud.iot.v1 - * @interface IGetDeviceRegistryRequest - * @property {string|null} [name] GetDeviceRegistryRequest name + * @interface IHttpConfig + * @property {google.cloud.iot.v1.HttpState|null} [httpEnabledState] HttpConfig httpEnabledState */ /** - * Constructs a new GetDeviceRegistryRequest. + * Constructs a new HttpConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a GetDeviceRegistryRequest. - * @implements IGetDeviceRegistryRequest + * @classdesc Represents a HttpConfig. + * @implements IHttpConfig * @constructor - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set */ - function GetDeviceRegistryRequest(properties) { + function HttpConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -968,75 +1717,75 @@ } /** - * GetDeviceRegistryRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * HttpConfig httpEnabledState. + * @member {google.cloud.iot.v1.HttpState} httpEnabledState + * @memberof google.cloud.iot.v1.HttpConfig * @instance */ - GetDeviceRegistryRequest.prototype.name = ""; + HttpConfig.prototype.httpEnabledState = 0; /** - * Creates a new GetDeviceRegistryRequest instance using the specified properties. + * Creates a new HttpConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig instance */ - GetDeviceRegistryRequest.create = function create(properties) { - return new GetDeviceRegistryRequest(properties); + HttpConfig.create = function create(properties) { + return new HttpConfig(properties); }; /** - * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRegistryRequest.encode = function encode(message, writer) { + HttpConfig.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.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.httpEnabledState); return writer; }; /** - * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + HttpConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a HttpConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRegistryRequest.decode = function decode(reader, length) { + HttpConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.HttpConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.httpEnabledState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -1047,107 +1796,196 @@ }; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + HttpConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeviceRegistryRequest message. + * Verifies a HttpConfig message. * @function verify - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeviceRegistryRequest.verify = function verify(message) { + HttpConfig.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.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + switch (message.httpEnabledState) { + default: + return "httpEnabledState: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest - */ - GetDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GetDeviceRegistryRequest) + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + */ + HttpConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.HttpConfig) return object; - var message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.iot.v1.HttpConfig(); + switch (object.httpEnabledState) { + case "HTTP_STATE_UNSPECIFIED": + case 0: + message.httpEnabledState = 0; + break; + case "HTTP_ENABLED": + case 1: + message.httpEnabledState = 1; + break; + case "HTTP_DISABLED": + case 2: + message.httpEnabledState = 2; + break; + } return message; }; /** - * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.GetDeviceRegistryRequest} message GetDeviceRegistryRequest + * @param {google.cloud.iot.v1.HttpConfig} message HttpConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeviceRegistryRequest.toObject = function toObject(message, options) { + HttpConfig.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; + object.httpEnabledState = options.enums === String ? "HTTP_STATE_UNSPECIFIED" : 0; + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; return object; }; /** - * Converts this GetDeviceRegistryRequest to JSON. + * Converts this HttpConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.HttpConfig * @instance * @returns {Object.} JSON object */ - GetDeviceRegistryRequest.prototype.toJSON = function toJSON() { + HttpConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDeviceRegistryRequest; + return HttpConfig; })(); - v1.DeleteDeviceRegistryRequest = (function() { + /** + * HttpState enum. + * @name google.cloud.iot.v1.HttpState + * @enum {string} + * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value + * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value + * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value + */ + v1.HttpState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTP_ENABLED"] = 1; + values[valuesById[2] = "HTTP_DISABLED"] = 2; + return values; + })(); + + /** + * LogLevel enum. + * @name google.cloud.iot.v1.LogLevel + * @enum {string} + * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value + * @property {number} NONE=10 NONE value + * @property {number} ERROR=20 ERROR value + * @property {number} INFO=30 INFO value + * @property {number} DEBUG=40 DEBUG value + */ + v1.LogLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[10] = "NONE"] = 10; + values[valuesById[20] = "ERROR"] = 20; + values[valuesById[30] = "INFO"] = 30; + values[valuesById[40] = "DEBUG"] = 40; + return values; + })(); + + /** + * GatewayType enum. + * @name google.cloud.iot.v1.GatewayType + * @enum {string} + * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value + * @property {number} GATEWAY=1 GATEWAY value + * @property {number} NON_GATEWAY=2 NON_GATEWAY value + */ + v1.GatewayType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GATEWAY"] = 1; + values[valuesById[2] = "NON_GATEWAY"] = 2; + return values; + })(); + + /** + * GatewayAuthMethod enum. + * @name google.cloud.iot.v1.GatewayAuthMethod + * @enum {string} + * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value + * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value + * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value + * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value + */ + v1.GatewayAuthMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; + values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; + values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; + return values; + })(); + + v1.EventNotificationConfig = (function() { /** - * Properties of a DeleteDeviceRegistryRequest. + * Properties of an EventNotificationConfig. * @memberof google.cloud.iot.v1 - * @interface IDeleteDeviceRegistryRequest - * @property {string|null} [name] DeleteDeviceRegistryRequest name + * @interface IEventNotificationConfig + * @property {string|null} [subfolderMatches] EventNotificationConfig subfolderMatches + * @property {string|null} [pubsubTopicName] EventNotificationConfig pubsubTopicName */ /** - * Constructs a new DeleteDeviceRegistryRequest. + * Constructs a new EventNotificationConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeleteDeviceRegistryRequest. - * @implements IDeleteDeviceRegistryRequest + * @classdesc Represents an EventNotificationConfig. + * @implements IEventNotificationConfig * @constructor - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set */ - function DeleteDeviceRegistryRequest(properties) { + function EventNotificationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1155,75 +1993,88 @@ } /** - * DeleteDeviceRegistryRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * EventNotificationConfig subfolderMatches. + * @member {string} subfolderMatches + * @memberof google.cloud.iot.v1.EventNotificationConfig * @instance */ - DeleteDeviceRegistryRequest.prototype.name = ""; + EventNotificationConfig.prototype.subfolderMatches = ""; /** - * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. + * EventNotificationConfig pubsubTopicName. + * @member {string} pubsubTopicName + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @instance + */ + EventNotificationConfig.prototype.pubsubTopicName = ""; + + /** + * Creates a new EventNotificationConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig instance */ - DeleteDeviceRegistryRequest.create = function create(properties) { - return new DeleteDeviceRegistryRequest(properties); + EventNotificationConfig.create = function create(properties) { + return new EventNotificationConfig(properties); }; /** - * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRegistryRequest.encode = function encode(message, writer) { + EventNotificationConfig.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.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subfolderMatches); return writer; }; /** - * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + EventNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. + * Decodes an EventNotificationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRegistryRequest.decode = function decode(reader, length) { + EventNotificationConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.EventNotificationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: + message.subfolderMatches = reader.string(); + break; case 1: - message.name = reader.string(); + message.pubsubTopicName = reader.string(); break; default: reader.skipType(tag & 7); @@ -1234,108 +2085,116 @@ }; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + EventNotificationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDeviceRegistryRequest message. + * Verifies an EventNotificationConfig message. * @function verify - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDeviceRegistryRequest.verify = function verify(message) { + EventNotificationConfig.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.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + if (!$util.isString(message.subfolderMatches)) + return "subfolderMatches: string expected"; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (!$util.isString(message.pubsubTopicName)) + return "pubsubTopicName: string expected"; return null; }; /** - * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig */ - DeleteDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest) + EventNotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.EventNotificationConfig) return object; - var message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.iot.v1.EventNotificationConfig(); + if (object.subfolderMatches != null) + message.subfolderMatches = String(object.subfolderMatches); + if (object.pubsubTopicName != null) + message.pubsubTopicName = String(object.pubsubTopicName); return message; }; /** - * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.DeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest + * @param {google.cloud.iot.v1.EventNotificationConfig} message EventNotificationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDeviceRegistryRequest.toObject = function toObject(message, options) { + EventNotificationConfig.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.pubsubTopicName = ""; + object.subfolderMatches = ""; + } + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + object.pubsubTopicName = message.pubsubTopicName; + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + object.subfolderMatches = message.subfolderMatches; return object; }; /** - * Converts this DeleteDeviceRegistryRequest to JSON. + * Converts this EventNotificationConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.EventNotificationConfig * @instance * @returns {Object.} JSON object */ - DeleteDeviceRegistryRequest.prototype.toJSON = function toJSON() { + EventNotificationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDeviceRegistryRequest; + return EventNotificationConfig; })(); - v1.UpdateDeviceRegistryRequest = (function() { + v1.StateNotificationConfig = (function() { /** - * Properties of an UpdateDeviceRegistryRequest. + * Properties of a StateNotificationConfig. * @memberof google.cloud.iot.v1 - * @interface IUpdateDeviceRegistryRequest - * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] UpdateDeviceRegistryRequest deviceRegistry - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRegistryRequest updateMask + * @interface IStateNotificationConfig + * @property {string|null} [pubsubTopicName] StateNotificationConfig pubsubTopicName */ /** - * Constructs a new UpdateDeviceRegistryRequest. + * Constructs a new StateNotificationConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UpdateDeviceRegistryRequest. - * @implements IUpdateDeviceRegistryRequest + * @classdesc Represents a StateNotificationConfig. + * @implements IStateNotificationConfig * @constructor - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set */ - function UpdateDeviceRegistryRequest(properties) { + function StateNotificationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1343,88 +2202,75 @@ } /** - * UpdateDeviceRegistryRequest deviceRegistry. - * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest - * @instance - */ - UpdateDeviceRegistryRequest.prototype.deviceRegistry = null; - - /** - * UpdateDeviceRegistryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * StateNotificationConfig pubsubTopicName. + * @member {string} pubsubTopicName + * @memberof google.cloud.iot.v1.StateNotificationConfig * @instance */ - UpdateDeviceRegistryRequest.prototype.updateMask = null; + StateNotificationConfig.prototype.pubsubTopicName = ""; /** - * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. + * Creates a new StateNotificationConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig instance */ - UpdateDeviceRegistryRequest.create = function create(properties) { - return new UpdateDeviceRegistryRequest(properties); + StateNotificationConfig.create = function create(properties) { + return new StateNotificationConfig(properties); }; /** - * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRegistryRequest.encode = function encode(message, writer) { + StateNotificationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); return writer; }; /** - * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + StateNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a StateNotificationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRegistryRequest.decode = function decode(reader, length) { + StateNotificationConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.StateNotificationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pubsubTopicName = reader.string(); break; default: reader.skipType(tag & 7); @@ -1435,128 +2281,107 @@ }; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + StateNotificationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDeviceRegistryRequest message. + * Verifies a StateNotificationConfig message. * @function verify - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDeviceRegistryRequest.verify = function verify(message) { + StateNotificationConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { - var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); - if (error) - return "deviceRegistry." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (!$util.isString(message.pubsubTopicName)) + return "pubsubTopicName: string expected"; return null; }; /** - * Creates an UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig */ - UpdateDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest) + StateNotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.StateNotificationConfig) return object; - var message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); - if (object.deviceRegistry != null) { - if (typeof object.deviceRegistry !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.deviceRegistry: object expected"); - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.iot.v1.StateNotificationConfig(); + if (object.pubsubTopicName != null) + message.pubsubTopicName = String(object.pubsubTopicName); return message; }; /** - * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.UpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest + * @param {google.cloud.iot.v1.StateNotificationConfig} message StateNotificationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDeviceRegistryRequest.toObject = function toObject(message, options) { + StateNotificationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.deviceRegistry = null; - object.updateMask = null; - } - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.pubsubTopicName = ""; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + object.pubsubTopicName = message.pubsubTopicName; return object; }; /** - * Converts this UpdateDeviceRegistryRequest to JSON. + * Converts this StateNotificationConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @instance * @returns {Object.} JSON object */ - UpdateDeviceRegistryRequest.prototype.toJSON = function toJSON() { + StateNotificationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDeviceRegistryRequest; + return StateNotificationConfig; })(); - v1.ListDeviceRegistriesRequest = (function() { + v1.RegistryCredential = (function() { /** - * Properties of a ListDeviceRegistriesRequest. + * Properties of a RegistryCredential. * @memberof google.cloud.iot.v1 - * @interface IListDeviceRegistriesRequest - * @property {string|null} [parent] ListDeviceRegistriesRequest parent - * @property {number|null} [pageSize] ListDeviceRegistriesRequest pageSize - * @property {string|null} [pageToken] ListDeviceRegistriesRequest pageToken + * @interface IRegistryCredential + * @property {google.cloud.iot.v1.IPublicKeyCertificate|null} [publicKeyCertificate] RegistryCredential publicKeyCertificate */ /** - * Constructs a new ListDeviceRegistriesRequest. + * Constructs a new RegistryCredential. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceRegistriesRequest. - * @implements IListDeviceRegistriesRequest + * @classdesc Represents a RegistryCredential. + * @implements IRegistryCredential * @constructor - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set */ - function ListDeviceRegistriesRequest(properties) { + function RegistryCredential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1564,101 +2389,89 @@ } /** - * ListDeviceRegistriesRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * RegistryCredential publicKeyCertificate. + * @member {google.cloud.iot.v1.IPublicKeyCertificate|null|undefined} publicKeyCertificate + * @memberof google.cloud.iot.v1.RegistryCredential * @instance */ - ListDeviceRegistriesRequest.prototype.parent = ""; + RegistryCredential.prototype.publicKeyCertificate = null; - /** - * ListDeviceRegistriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest - * @instance - */ - ListDeviceRegistriesRequest.prototype.pageSize = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListDeviceRegistriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * RegistryCredential credential. + * @member {"publicKeyCertificate"|undefined} credential + * @memberof google.cloud.iot.v1.RegistryCredential * @instance */ - ListDeviceRegistriesRequest.prototype.pageToken = ""; + Object.defineProperty(RegistryCredential.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["publicKeyCertificate"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListDeviceRegistriesRequest instance using the specified properties. + * Creates a new RegistryCredential instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest instance + * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential instance */ - ListDeviceRegistriesRequest.create = function create(properties) { - return new ListDeviceRegistriesRequest(properties); + RegistryCredential.create = function create(properties) { + return new RegistryCredential(properties); }; /** - * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesRequest.encode = function encode(message, writer) { + RegistryCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) + $root.google.cloud.iot.v1.PublicKeyCertificate.encode(message.publicKeyCertificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + RegistryCredential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. + * Decodes a RegistryCredential message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesRequest.decode = function decode(reader, length) { + RegistryCredential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.RegistryCredential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1669,126 +2482,122 @@ }; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. + * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesRequest.decodeDelimited = function decodeDelimited(reader) { + RegistryCredential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceRegistriesRequest message. + * Verifies a RegistryCredential message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceRegistriesRequest.verify = function verify(message) { + RegistryCredential.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"; + var properties = {}; + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { + properties.credential = 1; + { + var error = $root.google.cloud.iot.v1.PublicKeyCertificate.verify(message.publicKeyCertificate); + if (error) + return "publicKeyCertificate." + error; + } + } return null; }; /** - * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential */ - ListDeviceRegistriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesRequest) + RegistryCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.RegistryCredential) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.iot.v1.RegistryCredential(); + if (object.publicKeyCertificate != null) { + if (typeof object.publicKeyCertificate !== "object") + throw TypeError(".google.cloud.iot.v1.RegistryCredential.publicKeyCertificate: object expected"); + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.fromObject(object.publicKeyCertificate); + } return message; }; /** - * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.ListDeviceRegistriesRequest} message ListDeviceRegistriesRequest + * @param {google.cloud.iot.v1.RegistryCredential} message RegistryCredential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceRegistriesRequest.toObject = function toObject(message, options) { + RegistryCredential.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { + object.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.toObject(message.publicKeyCertificate, options); + if (options.oneofs) + object.credential = "publicKeyCertificate"; } - 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 ListDeviceRegistriesRequest to JSON. + * Converts this RegistryCredential to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.RegistryCredential * @instance * @returns {Object.} JSON object */ - ListDeviceRegistriesRequest.prototype.toJSON = function toJSON() { + RegistryCredential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceRegistriesRequest; + return RegistryCredential; })(); - v1.ListDeviceRegistriesResponse = (function() { + v1.X509CertificateDetails = (function() { /** - * Properties of a ListDeviceRegistriesResponse. + * Properties of a X509CertificateDetails. * @memberof google.cloud.iot.v1 - * @interface IListDeviceRegistriesResponse - * @property {Array.|null} [deviceRegistries] ListDeviceRegistriesResponse deviceRegistries - * @property {string|null} [nextPageToken] ListDeviceRegistriesResponse nextPageToken + * @interface IX509CertificateDetails + * @property {string|null} [issuer] X509CertificateDetails issuer + * @property {string|null} [subject] X509CertificateDetails subject + * @property {google.protobuf.ITimestamp|null} [startTime] X509CertificateDetails startTime + * @property {google.protobuf.ITimestamp|null} [expiryTime] X509CertificateDetails expiryTime + * @property {string|null} [signatureAlgorithm] X509CertificateDetails signatureAlgorithm + * @property {string|null} [publicKeyType] X509CertificateDetails publicKeyType */ /** - * Constructs a new ListDeviceRegistriesResponse. + * Constructs a new X509CertificateDetails. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceRegistriesResponse. - * @implements IListDeviceRegistriesResponse + * @classdesc Represents a X509CertificateDetails. + * @implements IX509CertificateDetails * @constructor - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set */ - function ListDeviceRegistriesResponse(properties) { - this.deviceRegistries = []; + function X509CertificateDetails(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1796,91 +2605,140 @@ } /** - * ListDeviceRegistriesResponse deviceRegistries. - * @member {Array.} deviceRegistries - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * X509CertificateDetails issuer. + * @member {string} issuer + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance */ - ListDeviceRegistriesResponse.prototype.deviceRegistries = $util.emptyArray; + X509CertificateDetails.prototype.issuer = ""; /** - * ListDeviceRegistriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * X509CertificateDetails subject. + * @member {string} subject + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance */ - ListDeviceRegistriesResponse.prototype.nextPageToken = ""; + X509CertificateDetails.prototype.subject = ""; /** - * Creates a new ListDeviceRegistriesResponse instance using the specified properties. + * X509CertificateDetails startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.startTime = null; + + /** + * X509CertificateDetails expiryTime. + * @member {google.protobuf.ITimestamp|null|undefined} expiryTime + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.expiryTime = null; + + /** + * X509CertificateDetails signatureAlgorithm. + * @member {string} signatureAlgorithm + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.signatureAlgorithm = ""; + + /** + * X509CertificateDetails publicKeyType. + * @member {string} publicKeyType + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.publicKeyType = ""; + + /** + * Creates a new X509CertificateDetails instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse instance + * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails instance */ - ListDeviceRegistriesResponse.create = function create(properties) { - return new ListDeviceRegistriesResponse(properties); + X509CertificateDetails.create = function create(properties) { + return new X509CertificateDetails(properties); }; /** - * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesResponse.encode = function encode(message, writer) { + X509CertificateDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceRegistries != null && message.deviceRegistries.length) - for (var i = 0; i < message.deviceRegistries.length; ++i) - $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistries[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.issuer != null && message.hasOwnProperty("issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.subject != null && message.hasOwnProperty("subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + $root.google.protobuf.Timestamp.encode(message.expiryTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signatureAlgorithm); + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.publicKeyType); return writer; }; /** - * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + X509CertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. + * Decodes a X509CertificateDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesResponse.decode = function decode(reader, length) { + X509CertificateDetails.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.X509CertificateDetails(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.deviceRegistries && message.deviceRegistries.length)) - message.deviceRegistries = []; - message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); + message.issuer = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.subject = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.signatureAlgorithm = reader.string(); + break; + case 6: + message.publicKeyType = reader.string(); break; default: reader.skipType(tag & 7); @@ -1891,134 +2749,160 @@ }; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. + * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesResponse.decodeDelimited = function decodeDelimited(reader) { + X509CertificateDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceRegistriesResponse message. + * Verifies a X509CertificateDetails message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceRegistriesResponse.verify = function verify(message) { + X509CertificateDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceRegistries != null && message.hasOwnProperty("deviceRegistries")) { - if (!Array.isArray(message.deviceRegistries)) - return "deviceRegistries: array expected"; - for (var i = 0; i < message.deviceRegistries.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistries[i]); - if (error) - return "deviceRegistries." + error; - } + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expiryTime); + if (error) + return "expiryTime." + error; + } + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + if (!$util.isString(message.signatureAlgorithm)) + return "signatureAlgorithm: string expected"; + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + if (!$util.isString(message.publicKeyType)) + return "publicKeyType: string expected"; return null; }; /** - * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails */ - ListDeviceRegistriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesResponse) + X509CertificateDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.X509CertificateDetails) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); - if (object.deviceRegistries) { - if (!Array.isArray(object.deviceRegistries)) - throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: array expected"); - message.deviceRegistries = []; - for (var i = 0; i < object.deviceRegistries.length; ++i) { - if (typeof object.deviceRegistries[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: object expected"); - message.deviceRegistries[i] = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistries[i]); - } + var message = new $root.google.cloud.iot.v1.X509CertificateDetails(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.subject != null) + message.subject = String(object.subject); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Timestamp.fromObject(object.expiryTime); + } + if (object.signatureAlgorithm != null) + message.signatureAlgorithm = String(object.signatureAlgorithm); + if (object.publicKeyType != null) + message.publicKeyType = String(object.publicKeyType); return message; }; /** - * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} message ListDeviceRegistriesResponse + * @param {google.cloud.iot.v1.X509CertificateDetails} message X509CertificateDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceRegistriesResponse.toObject = function toObject(message, options) { + X509CertificateDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceRegistries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.deviceRegistries && message.deviceRegistries.length) { - object.deviceRegistries = []; - for (var j = 0; j < message.deviceRegistries.length; ++j) - object.deviceRegistries[j] = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistries[j], options); + if (options.defaults) { + object.issuer = ""; + object.subject = ""; + object.startTime = null; + object.expiryTime = null; + object.signatureAlgorithm = ""; + object.publicKeyType = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + object.expiryTime = $root.google.protobuf.Timestamp.toObject(message.expiryTime, options); + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + object.signatureAlgorithm = message.signatureAlgorithm; + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + object.publicKeyType = message.publicKeyType; return object; }; /** - * Converts this ListDeviceRegistriesResponse to JSON. + * Converts this X509CertificateDetails to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance * @returns {Object.} JSON object */ - ListDeviceRegistriesResponse.prototype.toJSON = function toJSON() { + X509CertificateDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceRegistriesResponse; + return X509CertificateDetails; })(); - v1.CreateDeviceRequest = (function() { + v1.PublicKeyCertificate = (function() { /** - * Properties of a CreateDeviceRequest. + * Properties of a PublicKeyCertificate. * @memberof google.cloud.iot.v1 - * @interface ICreateDeviceRequest - * @property {string|null} [parent] CreateDeviceRequest parent - * @property {google.cloud.iot.v1.IDevice|null} [device] CreateDeviceRequest device + * @interface IPublicKeyCertificate + * @property {google.cloud.iot.v1.PublicKeyCertificateFormat|null} [format] PublicKeyCertificate format + * @property {string|null} [certificate] PublicKeyCertificate certificate + * @property {google.cloud.iot.v1.IX509CertificateDetails|null} [x509Details] PublicKeyCertificate x509Details */ /** - * Constructs a new CreateDeviceRequest. + * Constructs a new PublicKeyCertificate. * @memberof google.cloud.iot.v1 - * @classdesc Represents a CreateDeviceRequest. - * @implements ICreateDeviceRequest + * @classdesc Represents a PublicKeyCertificate. + * @implements IPublicKeyCertificate * @constructor - * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set */ - function CreateDeviceRequest(properties) { + function PublicKeyCertificate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2026,88 +2910,101 @@ } /** - * CreateDeviceRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * PublicKeyCertificate format. + * @member {google.cloud.iot.v1.PublicKeyCertificateFormat} format + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @instance */ - CreateDeviceRequest.prototype.parent = ""; + PublicKeyCertificate.prototype.format = 0; /** - * CreateDeviceRequest device. - * @member {google.cloud.iot.v1.IDevice|null|undefined} device - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * PublicKeyCertificate certificate. + * @member {string} certificate + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @instance */ - CreateDeviceRequest.prototype.device = null; + PublicKeyCertificate.prototype.certificate = ""; /** - * Creates a new CreateDeviceRequest instance using the specified properties. + * PublicKeyCertificate x509Details. + * @member {google.cloud.iot.v1.IX509CertificateDetails|null|undefined} x509Details + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.x509Details = null; + + /** + * Creates a new PublicKeyCertificate instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest instance + * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate instance */ - CreateDeviceRequest.create = function create(properties) { - return new CreateDeviceRequest(properties); + PublicKeyCertificate.create = function create(properties) { + return new PublicKeyCertificate(properties); }; /** - * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRequest.encode = function encode(message, writer) { + PublicKeyCertificate.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.device != null && message.hasOwnProperty("device")) - $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.certificate != null && message.hasOwnProperty("certificate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificate); + if (message.x509Details != null && message.hasOwnProperty("x509Details")) + $root.google.cloud.iot.v1.X509CertificateDetails.encode(message.x509Details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + PublicKeyCertificate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer. + * Decodes a PublicKeyCertificate message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRequest.decode = function decode(reader, length) { + PublicKeyCertificate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.format = reader.int32(); break; case 2: - message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + message.certificate = reader.string(); + break; + case 3: + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2118,122 +3015,157 @@ }; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + PublicKeyCertificate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDeviceRequest message. + * Verifies a PublicKeyCertificate message. * @function verify - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDeviceRequest.verify = function verify(message) { + PublicKeyCertificate.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.device != null && message.hasOwnProperty("device")) { - var error = $root.google.cloud.iot.v1.Device.verify(message.device); + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + break; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + if (!$util.isString(message.certificate)) + return "certificate: string expected"; + if (message.x509Details != null && message.hasOwnProperty("x509Details")) { + var error = $root.google.cloud.iot.v1.X509CertificateDetails.verify(message.x509Details); if (error) - return "device." + error; + return "x509Details." + error; } return null; }; /** - * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate */ - CreateDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRequest) + PublicKeyCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.PublicKeyCertificate) return object; - var message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.device != null) { - if (typeof object.device !== "object") - throw TypeError(".google.cloud.iot.v1.CreateDeviceRequest.device: object expected"); - message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); + var message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); + switch (object.format) { + case "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": + case 0: + message.format = 0; + break; + case "X509_CERTIFICATE_PEM": + case 1: + message.format = 1; + break; + } + if (object.certificate != null) + message.certificate = String(object.certificate); + if (object.x509Details != null) { + if (typeof object.x509Details !== "object") + throw TypeError(".google.cloud.iot.v1.PublicKeyCertificate.x509Details: object expected"); + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.fromObject(object.x509Details); } return message; }; /** - * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.CreateDeviceRequest} message CreateDeviceRequest + * @param {google.cloud.iot.v1.PublicKeyCertificate} message PublicKeyCertificate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDeviceRequest.toObject = function toObject(message, options) { + PublicKeyCertificate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.device = null; + object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT" : 0; + object.certificate = ""; + object.x509Details = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.device != null && message.hasOwnProperty("device")) - object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = message.certificate; + if (message.x509Details != null && message.hasOwnProperty("x509Details")) + object.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.toObject(message.x509Details, options); return object; }; /** - * Converts this CreateDeviceRequest to JSON. + * Converts this PublicKeyCertificate to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @instance * @returns {Object.} JSON object */ - CreateDeviceRequest.prototype.toJSON = function toJSON() { + PublicKeyCertificate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDeviceRequest; + return PublicKeyCertificate; })(); - v1.GetDeviceRequest = (function() { + /** + * PublicKeyCertificateFormat enum. + * @name google.cloud.iot.v1.PublicKeyCertificateFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value + * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value + */ + v1.PublicKeyCertificateFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; + values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; + return values; + })(); + + v1.DeviceCredential = (function() { /** - * Properties of a GetDeviceRequest. + * Properties of a DeviceCredential. * @memberof google.cloud.iot.v1 - * @interface IGetDeviceRequest - * @property {string|null} [name] GetDeviceRequest name - * @property {google.protobuf.IFieldMask|null} [fieldMask] GetDeviceRequest fieldMask + * @interface IDeviceCredential + * @property {google.cloud.iot.v1.IPublicKeyCredential|null} [publicKey] DeviceCredential publicKey + * @property {google.protobuf.ITimestamp|null} [expirationTime] DeviceCredential expirationTime */ /** - * Constructs a new GetDeviceRequest. + * Constructs a new DeviceCredential. * @memberof google.cloud.iot.v1 - * @classdesc Represents a GetDeviceRequest. - * @implements IGetDeviceRequest + * @classdesc Represents a DeviceCredential. + * @implements IDeviceCredential * @constructor - * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set */ - function GetDeviceRequest(properties) { + function DeviceCredential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2241,88 +3173,102 @@ } /** - * GetDeviceRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.GetDeviceRequest + * DeviceCredential publicKey. + * @member {google.cloud.iot.v1.IPublicKeyCredential|null|undefined} publicKey + * @memberof google.cloud.iot.v1.DeviceCredential * @instance */ - GetDeviceRequest.prototype.name = ""; + DeviceCredential.prototype.publicKey = null; /** - * GetDeviceRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.iot.v1.GetDeviceRequest + * DeviceCredential expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.cloud.iot.v1.DeviceCredential * @instance */ - GetDeviceRequest.prototype.fieldMask = null; + DeviceCredential.prototype.expirationTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new GetDeviceRequest instance using the specified properties. + * DeviceCredential credential. + * @member {"publicKey"|undefined} credential + * @memberof google.cloud.iot.v1.DeviceCredential + * @instance + */ + Object.defineProperty(DeviceCredential.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeviceCredential instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest instance + * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential instance */ - GetDeviceRequest.create = function create(properties) { - return new GetDeviceRequest(properties); + DeviceCredential.create = function create(properties) { + return new DeviceCredential(properties); }; /** - * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRequest.encode = function encode(message, writer) { + DeviceCredential.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.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + $root.google.cloud.iot.v1.PublicKeyCredential.encode(message.publicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeviceCredential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer. + * Decodes a DeviceCredential message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRequest.decode = function decode(reader, length) { + DeviceCredential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceCredential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; case 2: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); + break; + case 6: + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2333,122 +3279,132 @@ }; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + DeviceCredential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeviceRequest message. + * Verifies a DeviceCredential message. * @function verify - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeviceRequest.verify = function verify(message) { + DeviceCredential.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties.credential = 1; + { + var error = $root.google.cloud.iot.v1.PublicKeyCredential.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); if (error) - return "fieldMask." + error; + return "expirationTime." + error; } return null; }; /** - * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential */ - GetDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GetDeviceRequest) + DeviceCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceCredential) return object; - var message = new $root.google.cloud.iot.v1.GetDeviceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.iot.v1.GetDeviceRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + var message = new $root.google.cloud.iot.v1.DeviceCredential(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceCredential.publicKey: object expected"); + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.fromObject(object.publicKey); + } + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceCredential.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); } return message; }; /** - * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.GetDeviceRequest} message GetDeviceRequest + * @param {google.cloud.iot.v1.DeviceCredential} message DeviceCredential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeviceRequest.toObject = function toObject(message, options) { + DeviceCredential.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.fieldMask = null; + if (options.defaults) + object.expirationTime = null; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + object.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.toObject(message.publicKey, options); + if (options.oneofs) + object.credential = "publicKey"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); return object; }; /** - * Converts this GetDeviceRequest to JSON. + * Converts this DeviceCredential to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @instance * @returns {Object.} JSON object */ - GetDeviceRequest.prototype.toJSON = function toJSON() { + DeviceCredential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDeviceRequest; + return DeviceCredential; })(); - v1.UpdateDeviceRequest = (function() { + v1.PublicKeyCredential = (function() { /** - * Properties of an UpdateDeviceRequest. + * Properties of a PublicKeyCredential. * @memberof google.cloud.iot.v1 - * @interface IUpdateDeviceRequest - * @property {google.cloud.iot.v1.IDevice|null} [device] UpdateDeviceRequest device - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRequest updateMask + * @interface IPublicKeyCredential + * @property {google.cloud.iot.v1.PublicKeyFormat|null} [format] PublicKeyCredential format + * @property {string|null} [key] PublicKeyCredential key */ /** - * Constructs a new UpdateDeviceRequest. + * Constructs a new PublicKeyCredential. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UpdateDeviceRequest. - * @implements IUpdateDeviceRequest + * @classdesc Represents a PublicKeyCredential. + * @implements IPublicKeyCredential * @constructor - * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set */ - function UpdateDeviceRequest(properties) { + function PublicKeyCredential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2456,88 +3412,88 @@ } /** - * UpdateDeviceRequest device. - * @member {google.cloud.iot.v1.IDevice|null|undefined} device - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * PublicKeyCredential format. + * @member {google.cloud.iot.v1.PublicKeyFormat} format + * @memberof google.cloud.iot.v1.PublicKeyCredential * @instance */ - UpdateDeviceRequest.prototype.device = null; + PublicKeyCredential.prototype.format = 0; /** - * UpdateDeviceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * PublicKeyCredential key. + * @member {string} key + * @memberof google.cloud.iot.v1.PublicKeyCredential * @instance */ - UpdateDeviceRequest.prototype.updateMask = null; + PublicKeyCredential.prototype.key = ""; /** - * Creates a new UpdateDeviceRequest instance using the specified properties. + * Creates a new PublicKeyCredential instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest instance + * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential instance */ - UpdateDeviceRequest.create = function create(properties) { - return new UpdateDeviceRequest(properties); + PublicKeyCredential.create = function create(properties) { + return new PublicKeyCredential(properties); }; /** - * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRequest.encode = function encode(message, writer) { + PublicKeyCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.device != null && message.hasOwnProperty("device")) - $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); return writer; }; /** - * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + PublicKeyCredential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * Decodes a PublicKeyCredential message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRequest.decode = function decode(reader, length) { + PublicKeyCredential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCredential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + case 1: + message.format = reader.int32(); break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + case 2: + message.key = reader.string(); break; default: reader.skipType(tag & 7); @@ -2548,126 +3504,167 @@ }; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + PublicKeyCredential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDeviceRequest message. + * Verifies a PublicKeyCredential message. * @function verify - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDeviceRequest.verify = function verify(message) { + PublicKeyCredential.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.device != null && message.hasOwnProperty("device")) { - var error = $root.google.cloud.iot.v1.Device.verify(message.device); - if (error) - return "device." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 3: + case 1: + case 2: + case 4: + break; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; return null; }; /** - * Creates an UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential */ - UpdateDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRequest) + PublicKeyCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.PublicKeyCredential) return object; - var message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); - if (object.device != null) { - if (typeof object.device !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.device: object expected"); - message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.iot.v1.PublicKeyCredential(); + switch (object.format) { + case "UNSPECIFIED_PUBLIC_KEY_FORMAT": + case 0: + message.format = 0; + break; + case "RSA_PEM": + case 3: + message.format = 3; + break; + case "RSA_X509_PEM": + case 1: + message.format = 1; + break; + case "ES256_PEM": + case 2: + message.format = 2; + break; + case "ES256_X509_PEM": + case 4: + message.format = 4; + break; } + if (object.key != null) + message.key = String(object.key); return message; }; /** - * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.UpdateDeviceRequest} message UpdateDeviceRequest + * @param {google.cloud.iot.v1.PublicKeyCredential} message PublicKeyCredential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDeviceRequest.toObject = function toObject(message, options) { + PublicKeyCredential.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.device = null; - object.updateMask = null; + object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_FORMAT" : 0; + object.key = ""; } - if (message.device != null && message.hasOwnProperty("device")) - object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; return object; }; /** - * Converts this UpdateDeviceRequest to JSON. + * Converts this PublicKeyCredential to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.PublicKeyCredential * @instance * @returns {Object.} JSON object */ - UpdateDeviceRequest.prototype.toJSON = function toJSON() { + PublicKeyCredential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDeviceRequest; + return PublicKeyCredential; })(); - v1.DeleteDeviceRequest = (function() { + /** + * PublicKeyFormat enum. + * @name google.cloud.iot.v1.PublicKeyFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value + * @property {number} RSA_PEM=3 RSA_PEM value + * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value + * @property {number} ES256_PEM=2 ES256_PEM value + * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value + */ + v1.PublicKeyFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; + values[valuesById[3] = "RSA_PEM"] = 3; + values[valuesById[1] = "RSA_X509_PEM"] = 1; + values[valuesById[2] = "ES256_PEM"] = 2; + values[valuesById[4] = "ES256_X509_PEM"] = 4; + return values; + })(); + + v1.DeviceConfig = (function() { /** - * Properties of a DeleteDeviceRequest. + * Properties of a DeviceConfig. * @memberof google.cloud.iot.v1 - * @interface IDeleteDeviceRequest - * @property {string|null} [name] DeleteDeviceRequest name + * @interface IDeviceConfig + * @property {number|Long|null} [version] DeviceConfig version + * @property {google.protobuf.ITimestamp|null} [cloudUpdateTime] DeviceConfig cloudUpdateTime + * @property {google.protobuf.ITimestamp|null} [deviceAckTime] DeviceConfig deviceAckTime + * @property {Uint8Array|null} [binaryData] DeviceConfig binaryData */ /** - * Constructs a new DeleteDeviceRequest. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeleteDeviceRequest. - * @implements IDeleteDeviceRequest + * Constructs a new DeviceConfig. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceConfig. + * @implements IDeviceConfig * @constructor - * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set */ - function DeleteDeviceRequest(properties) { + function DeviceConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2675,75 +3672,114 @@ } /** - * DeleteDeviceRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * DeviceConfig version. + * @member {number|Long} version + * @memberof google.cloud.iot.v1.DeviceConfig * @instance */ - DeleteDeviceRequest.prototype.name = ""; + DeviceConfig.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DeleteDeviceRequest instance using the specified properties. + * DeviceConfig cloudUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} cloudUpdateTime + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.cloudUpdateTime = null; + + /** + * DeviceConfig deviceAckTime. + * @member {google.protobuf.ITimestamp|null|undefined} deviceAckTime + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.deviceAckTime = null; + + /** + * DeviceConfig binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new DeviceConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest instance + * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig instance */ - DeleteDeviceRequest.create = function create(properties) { - return new DeleteDeviceRequest(properties); + DeviceConfig.create = function create(properties) { + return new DeviceConfig(properties); }; /** - * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRequest.encode = function encode(message, writer) { + DeviceConfig.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.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.cloudUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + $root.google.protobuf.Timestamp.encode(message.deviceAckTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.binaryData); return writer; }; /** - * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeviceConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer. + * Decodes a DeviceConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRequest.decode = function decode(reader, length) { + DeviceConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.version = reader.int64(); + break; + case 2: + message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.binaryData = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -2754,283 +3790,255 @@ }; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + DeviceConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDeviceRequest message. + * Verifies a DeviceConfig message. * @function verify - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDeviceRequest.verify = function verify(message) { + DeviceConfig.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.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.cloudUpdateTime); + if (error) + return "cloudUpdateTime." + error; + } + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deviceAckTime); + if (error) + return "deviceAckTime." + error; + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; return null; }; /** - * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig */ - DeleteDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRequest) + DeviceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceConfig) return object; - var message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.iot.v1.DeviceConfig(); + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = false; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + if (object.cloudUpdateTime != null) { + if (typeof object.cloudUpdateTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceConfig.cloudUpdateTime: object expected"); + message.cloudUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.cloudUpdateTime); + } + if (object.deviceAckTime != null) { + if (typeof object.deviceAckTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceConfig.deviceAckTime: object expected"); + message.deviceAckTime = $root.google.protobuf.Timestamp.fromObject(object.deviceAckTime); + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; return message; }; /** - * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.DeleteDeviceRequest} message DeleteDeviceRequest + * @param {google.cloud.iot.v1.DeviceConfig} message DeviceConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDeviceRequest.toObject = function toObject(message, options) { + DeviceConfig.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 DeleteDeviceRequest to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.DeleteDeviceRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDeviceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteDeviceRequest; - })(); - - v1.ListDevicesRequest = (function() { - - /** - * Properties of a ListDevicesRequest. - * @memberof google.cloud.iot.v1 - * @interface IListDevicesRequest - * @property {string|null} [parent] ListDevicesRequest parent - * @property {Array.|null} [deviceNumIds] ListDevicesRequest deviceNumIds - * @property {Array.|null} [deviceIds] ListDevicesRequest deviceIds - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListDevicesRequest fieldMask - * @property {google.cloud.iot.v1.IGatewayListOptions|null} [gatewayListOptions] ListDevicesRequest gatewayListOptions - * @property {number|null} [pageSize] ListDevicesRequest pageSize - * @property {string|null} [pageToken] ListDevicesRequest pageToken - */ - - /** - * Constructs a new ListDevicesRequest. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDevicesRequest. - * @implements IListDevicesRequest - * @constructor - * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set - */ - function ListDevicesRequest(properties) { - this.deviceNumIds = []; - this.deviceIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + object.cloudUpdateTime = null; + object.deviceAckTime = null; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + object.cloudUpdateTime = $root.google.protobuf.Timestamp.toObject(message.cloudUpdateTime, options); + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + object.deviceAckTime = $root.google.protobuf.Timestamp.toObject(message.deviceAckTime, options); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + return object; + }; /** - * ListDevicesRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Converts this DeviceConfig to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.DeviceConfig * @instance + * @returns {Object.} JSON object */ - ListDevicesRequest.prototype.parent = ""; + DeviceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ListDevicesRequest deviceNumIds. - * @member {Array.} deviceNumIds - * @memberof google.cloud.iot.v1.ListDevicesRequest - * @instance - */ - ListDevicesRequest.prototype.deviceNumIds = $util.emptyArray; + return DeviceConfig; + })(); - /** - * ListDevicesRequest deviceIds. - * @member {Array.} deviceIds - * @memberof google.cloud.iot.v1.ListDevicesRequest - * @instance - */ - ListDevicesRequest.prototype.deviceIds = $util.emptyArray; + v1.DeviceState = (function() { /** - * ListDevicesRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.iot.v1.ListDevicesRequest - * @instance + * Properties of a DeviceState. + * @memberof google.cloud.iot.v1 + * @interface IDeviceState + * @property {google.protobuf.ITimestamp|null} [updateTime] DeviceState updateTime + * @property {Uint8Array|null} [binaryData] DeviceState binaryData */ - ListDevicesRequest.prototype.fieldMask = null; /** - * ListDevicesRequest gatewayListOptions. - * @member {google.cloud.iot.v1.IGatewayListOptions|null|undefined} gatewayListOptions - * @memberof google.cloud.iot.v1.ListDevicesRequest - * @instance + * Constructs a new DeviceState. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a DeviceState. + * @implements IDeviceState + * @constructor + * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set */ - ListDevicesRequest.prototype.gatewayListOptions = null; + function DeviceState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ListDevicesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.iot.v1.ListDevicesRequest + * DeviceState updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.iot.v1.DeviceState * @instance */ - ListDevicesRequest.prototype.pageSize = 0; + DeviceState.prototype.updateTime = null; /** - * ListDevicesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.iot.v1.ListDevicesRequest + * DeviceState binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.DeviceState * @instance */ - ListDevicesRequest.prototype.pageToken = ""; + DeviceState.prototype.binaryData = $util.newBuffer([]); /** - * Creates a new ListDevicesRequest instance using the specified properties. + * Creates a new DeviceState instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest instance + * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceState} DeviceState instance */ - ListDevicesRequest.create = function create(properties) { - return new ListDevicesRequest(properties); + DeviceState.create = function create(properties) { + return new DeviceState(properties); }; /** - * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDevicesRequest.encode = function encode(message, writer) { + DeviceState.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.deviceNumIds != null && message.deviceNumIds.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.deviceNumIds.length; ++i) - writer.uint64(message.deviceNumIds[i]); - writer.ldelim(); - } - if (message.deviceIds != null && message.deviceIds.length) - for (var i = 0; i < message.deviceIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceIds[i]); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) - $root.google.cloud.iot.v1.GatewayListOptions.encode(message.gatewayListOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 100, wireType 0 =*/800).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.pageToken); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); return writer; }; /** - * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeviceState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer. + * Decodes a DeviceState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @returns {google.cloud.iot.v1.DeviceState} DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDevicesRequest.decode = function decode(reader, length) { + DeviceState.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceState(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - if (!(message.deviceNumIds && message.deviceNumIds.length)) - message.deviceNumIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.deviceNumIds.push(reader.uint64()); - } else - message.deviceNumIds.push(reader.uint64()); - break; - case 3: - if (!(message.deviceIds && message.deviceIds.length)) - message.deviceIds = []; - message.deviceIds.push(reader.string()); - break; - case 4: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 6: - message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); - break; - case 100: - message.pageSize = reader.int32(); - break; - case 101: - message.pageToken = reader.string(); + message.binaryData = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -3041,968 +4049,793 @@ }; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @returns {google.cloud.iot.v1.DeviceState} DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDevicesRequest.decodeDelimited = function decodeDelimited(reader) { + DeviceState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDevicesRequest message. - * @function verify - * @memberof google.cloud.iot.v1.ListDevicesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDevicesRequest.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.deviceNumIds != null && message.hasOwnProperty("deviceNumIds")) { - if (!Array.isArray(message.deviceNumIds)) - return "deviceNumIds: array expected"; - for (var i = 0; i < message.deviceNumIds.length; ++i) - if (!$util.isInteger(message.deviceNumIds[i]) && !(message.deviceNumIds[i] && $util.isInteger(message.deviceNumIds[i].low) && $util.isInteger(message.deviceNumIds[i].high))) - return "deviceNumIds: integer|Long[] expected"; - } - if (message.deviceIds != null && message.hasOwnProperty("deviceIds")) { - if (!Array.isArray(message.deviceIds)) - return "deviceIds: array expected"; - for (var i = 0; i < message.deviceIds.length; ++i) - if (!$util.isString(message.deviceIds[i])) - return "deviceIds: string[] expected"; - } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); - if (error) - return "fieldMask." + error; - } - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) { - var error = $root.google.cloud.iot.v1.GatewayListOptions.verify(message.gatewayListOptions); - if (error) - return "gatewayListOptions." + 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 ListDevicesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.ListDevicesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest - */ - ListDevicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDevicesRequest) - return object; - var message = new $root.google.cloud.iot.v1.ListDevicesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deviceNumIds) { - if (!Array.isArray(object.deviceNumIds)) - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceNumIds: array expected"); - message.deviceNumIds = []; - for (var i = 0; i < object.deviceNumIds.length; ++i) - if ($util.Long) - (message.deviceNumIds[i] = $util.Long.fromValue(object.deviceNumIds[i])).unsigned = true; - else if (typeof object.deviceNumIds[i] === "string") - message.deviceNumIds[i] = parseInt(object.deviceNumIds[i], 10); - else if (typeof object.deviceNumIds[i] === "number") - message.deviceNumIds[i] = object.deviceNumIds[i]; - else if (typeof object.deviceNumIds[i] === "object") - message.deviceNumIds[i] = new $util.LongBits(object.deviceNumIds[i].low >>> 0, object.deviceNumIds[i].high >>> 0).toNumber(true); - } - if (object.deviceIds) { - if (!Array.isArray(object.deviceIds)) - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceIds: array expected"); - message.deviceIds = []; - for (var i = 0; i < object.deviceIds.length; ++i) - message.deviceIds[i] = String(object.deviceIds[i]); - } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + * Verifies a DeviceState message. + * @function verify + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } - if (object.gatewayListOptions != null) { - if (typeof object.gatewayListOptions !== "object") - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.gatewayListOptions: object expected"); - message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.fromObject(object.gatewayListOptions); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + return null; + }; + + /** + * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.DeviceState} DeviceState + */ + DeviceState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceState) + return object; + var message = new $root.google.cloud.iot.v1.DeviceState(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceState.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; return message; }; /** - * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeviceState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.ListDevicesRequest} message ListDevicesRequest + * @param {google.cloud.iot.v1.DeviceState} message DeviceState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDevicesRequest.toObject = function toObject(message, options) { + DeviceState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.deviceNumIds = []; - object.deviceIds = []; - } if (options.defaults) { - object.parent = ""; - object.fieldMask = null; - object.gatewayListOptions = null; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deviceNumIds && message.deviceNumIds.length) { - object.deviceNumIds = []; - for (var j = 0; j < message.deviceNumIds.length; ++j) - if (typeof message.deviceNumIds[j] === "number") - object.deviceNumIds[j] = options.longs === String ? String(message.deviceNumIds[j]) : message.deviceNumIds[j]; - else - object.deviceNumIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.deviceNumIds[j]) : options.longs === Number ? new $util.LongBits(message.deviceNumIds[j].low >>> 0, message.deviceNumIds[j].high >>> 0).toNumber(true) : message.deviceNumIds[j]; - } - if (message.deviceIds && message.deviceIds.length) { - object.deviceIds = []; - for (var j = 0; j < message.deviceIds.length; ++j) - object.deviceIds[j] = message.deviceIds[j]; + object.updateTime = null; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) - object.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.toObject(message.gatewayListOptions, 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.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; return object; }; /** - * Converts this ListDevicesRequest to JSON. + * Converts this DeviceState to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.DeviceState * @instance * @returns {Object.} JSON object */ - ListDevicesRequest.prototype.toJSON = function toJSON() { + DeviceState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDevicesRequest; + return DeviceState; })(); - v1.GatewayListOptions = (function() { + v1.DeviceManager = (function() { /** - * Properties of a GatewayListOptions. + * Constructs a new DeviceManager service. * @memberof google.cloud.iot.v1 - * @interface IGatewayListOptions - * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayListOptions gatewayType - * @property {string|null} [associationsGatewayId] GatewayListOptions associationsGatewayId - * @property {string|null} [associationsDeviceId] GatewayListOptions associationsDeviceId + * @classdesc Represents a DeviceManager + * @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 DeviceManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DeviceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceManager; /** - * Constructs a new GatewayListOptions. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a GatewayListOptions. - * @implements IGatewayListOptions - * @constructor - * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set + * Creates new DeviceManager service using the specified rpc implementation. + * @function create + * @memberof google.cloud.iot.v1.DeviceManager + * @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 {DeviceManager} RPC service. Useful where requests and/or responses are streamed. */ - function GatewayListOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + DeviceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * GatewayListOptions gatewayType. - * @member {google.cloud.iot.v1.GatewayType} gatewayType - * @memberof google.cloud.iot.v1.GatewayListOptions + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef CreateDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + */ + + /** + * Calls CreateDeviceRegistry. + * @function createDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.createDeviceRegistry = function createDeviceRegistry(request, callback) { + return this.rpcCall(createDeviceRegistry, $root.google.cloud.iot.v1.CreateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "CreateDeviceRegistry" }); + + /** + * Calls CreateDeviceRegistry. + * @function createDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + */ + + /** + * Calls GetDeviceRegistry. + * @function getDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.getDeviceRegistry = function getDeviceRegistry(request, callback) { + return this.rpcCall(getDeviceRegistry, $root.google.cloud.iot.v1.GetDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "GetDeviceRegistry" }); + + /** + * Calls GetDeviceRegistry. + * @function getDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UpdateDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry + */ + + /** + * Calls UpdateDeviceRegistry. + * @function updateDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.updateDeviceRegistry = function updateDeviceRegistry(request, callback) { + return this.rpcCall(updateDeviceRegistry, $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "UpdateDeviceRegistry" }); + + /** + * Calls UpdateDeviceRegistry. + * @function updateDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef DeleteDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GatewayListOptions.prototype.gatewayType = 0; /** - * GatewayListOptions associationsGatewayId. - * @member {string} associationsGatewayId - * @memberof google.cloud.iot.v1.GatewayListOptions + * Calls DeleteDeviceRegistry. + * @function deleteDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GatewayListOptions.prototype.associationsGatewayId = ""; + Object.defineProperty(DeviceManager.prototype.deleteDeviceRegistry = function deleteDeviceRegistry(request, callback) { + return this.rpcCall(deleteDeviceRegistry, $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDeviceRegistry" }); /** - * GatewayListOptions associationsDeviceId. - * @member {string} associationsDeviceId - * @memberof google.cloud.iot.v1.GatewayListOptions + * Calls DeleteDeviceRegistry. + * @function deleteDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayListOptions.prototype.associationsDeviceId = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceRegistriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} [response] ListDeviceRegistriesResponse + */ /** - * GatewayListOptions filter. - * @member {"gatewayType"|"associationsGatewayId"|"associationsDeviceId"|undefined} filter - * @memberof google.cloud.iot.v1.GatewayListOptions + * Calls ListDeviceRegistries. + * @function listDeviceRegistries + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback} callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse + * @returns {undefined} + * @variation 1 */ - Object.defineProperty(GatewayListOptions.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["gatewayType", "associationsGatewayId", "associationsDeviceId"]), - set: $util.oneOfSetter($oneOfFields) - }); + Object.defineProperty(DeviceManager.prototype.listDeviceRegistries = function listDeviceRegistries(request, callback) { + return this.rpcCall(listDeviceRegistries, $root.google.cloud.iot.v1.ListDeviceRegistriesRequest, $root.google.cloud.iot.v1.ListDeviceRegistriesResponse, request, callback); + }, "name", { value: "ListDeviceRegistries" }); /** - * Creates a new GatewayListOptions instance using the specified properties. - * @function create - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions instance + * Calls ListDeviceRegistries. + * @function listDeviceRegistries + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayListOptions.create = function create(properties) { - return new GatewayListOptions(properties); - }; /** - * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef CreateDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device */ - GatewayListOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.associationsGatewayId); - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.associationsDeviceId); - return writer; - }; /** - * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateDevice. + * @function createDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 */ - GatewayListOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DeviceManager.prototype.createDevice = function createDevice(request, callback) { + return this.rpcCall(createDevice, $root.google.cloud.iot.v1.CreateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "CreateDevice" }); /** - * Decodes a GatewayListOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateDevice. + * @function createDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayListOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayListOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gatewayType = reader.int32(); - break; - case 2: - message.associationsGatewayId = reader.string(); - break; - case 3: - message.associationsDeviceId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions - * @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.cloud.iot.v1.DeviceManager#getDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device */ - GatewayListOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GatewayListOptions message. - * @function verify - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetDevice. + * @function getDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 */ - GatewayListOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { - properties.filter = 1; - switch (message.gatewayType) { - default: - return "gatewayType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.associationsGatewayId)) - return "associationsGatewayId: string expected"; - } - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.associationsDeviceId)) - return "associationsDeviceId: string expected"; - } - return null; - }; + Object.defineProperty(DeviceManager.prototype.getDevice = function getDevice(request, callback) { + return this.rpcCall(getDevice, $root.google.cloud.iot.v1.GetDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "GetDevice" }); /** - * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions - */ - GatewayListOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GatewayListOptions) - return object; - var message = new $root.google.cloud.iot.v1.GatewayListOptions(); - switch (object.gatewayType) { - case "GATEWAY_TYPE_UNSPECIFIED": - case 0: - message.gatewayType = 0; - break; - case "GATEWAY": - case 1: - message.gatewayType = 1; - break; - case "NON_GATEWAY": - case 2: - message.gatewayType = 2; - break; - } - if (object.associationsGatewayId != null) - message.associationsGatewayId = String(object.associationsGatewayId); - if (object.associationsDeviceId != null) - message.associationsDeviceId = String(object.associationsDeviceId); - return message; - }; + * Calls GetDevice. + * @function getDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.GatewayListOptions - * @static - * @param {google.cloud.iot.v1.GatewayListOptions} message GatewayListOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UpdateDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device */ - GatewayListOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { - object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; - if (options.oneofs) - object.filter = "gatewayType"; - } - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { - object.associationsGatewayId = message.associationsGatewayId; - if (options.oneofs) - object.filter = "associationsGatewayId"; - } - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { - object.associationsDeviceId = message.associationsDeviceId; - if (options.oneofs) - object.filter = "associationsDeviceId"; - } - return object; - }; /** - * Converts this GatewayListOptions to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.GatewayListOptions + * Calls UpdateDevice. + * @function updateDevice + * @memberof google.cloud.iot.v1.DeviceManager * @instance - * @returns {Object.} JSON object + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 */ - GatewayListOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DeviceManager.prototype.updateDevice = function updateDevice(request, callback) { + return this.rpcCall(updateDevice, $root.google.cloud.iot.v1.UpdateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "UpdateDevice" }); - return GatewayListOptions; - })(); + /** + * Calls UpdateDevice. + * @function updateDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - v1.ListDevicesResponse = (function() { + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef DeleteDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ /** - * Properties of a ListDevicesResponse. - * @memberof google.cloud.iot.v1 - * @interface IListDevicesResponse - * @property {Array.|null} [devices] ListDevicesResponse devices - * @property {string|null} [nextPageToken] ListDevicesResponse nextPageToken + * Calls DeleteDevice. + * @function deleteDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ + Object.defineProperty(DeviceManager.prototype.deleteDevice = function deleteDevice(request, callback) { + return this.rpcCall(deleteDevice, $root.google.cloud.iot.v1.DeleteDeviceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDevice" }); /** - * Constructs a new ListDevicesResponse. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDevicesResponse. - * @implements IListDevicesResponse - * @constructor - * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set + * Calls DeleteDevice. + * @function deleteDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - function ListDevicesResponse(properties) { - this.devices = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * ListDevicesResponse devices. - * @member {Array.} devices - * @memberof google.cloud.iot.v1.ListDevicesResponse + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDevicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDevicesResponse} [response] ListDevicesResponse + */ + + /** + * Calls ListDevices. + * @function listDevices + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDevicesCallback} callback Node-style callback called with the error, if any, and ListDevicesResponse + * @returns {undefined} + * @variation 1 */ - ListDevicesResponse.prototype.devices = $util.emptyArray; + Object.defineProperty(DeviceManager.prototype.listDevices = function listDevices(request, callback) { + return this.rpcCall(listDevices, $root.google.cloud.iot.v1.ListDevicesRequest, $root.google.cloud.iot.v1.ListDevicesResponse, request, callback); + }, "name", { value: "ListDevices" }); /** - * ListDevicesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.iot.v1.ListDevicesResponse + * Calls ListDevices. + * @function listDevices + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDevicesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListDevicesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ModifyCloudToDeviceConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceConfig} [response] DeviceConfig */ - ListDevicesResponse.create = function create(properties) { - return new ListDevicesResponse(properties); - }; /** - * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ModifyCloudToDeviceConfig. + * @function modifyCloudToDeviceConfig + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback} callback Node-style callback called with the error, if any, and DeviceConfig + * @returns {undefined} + * @variation 1 */ - ListDevicesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.devices != null && message.devices.length) - for (var i = 0; i < message.devices.length; ++i) - $root.google.cloud.iot.v1.Device.encode(message.devices[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; - }; + Object.defineProperty(DeviceManager.prototype.modifyCloudToDeviceConfig = function modifyCloudToDeviceConfig(request, callback) { + return this.rpcCall(modifyCloudToDeviceConfig, $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, $root.google.cloud.iot.v1.DeviceConfig, request, callback); + }, "name", { value: "ModifyCloudToDeviceConfig" }); /** - * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ModifyCloudToDeviceConfig. + * @function modifyCloudToDeviceConfig + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse - * @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.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceConfigVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} [response] ListDeviceConfigVersionsResponse + */ + + /** + * Calls ListDeviceConfigVersions. + * @function listDeviceConfigVersions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback} callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.listDeviceConfigVersions = function listDeviceConfigVersions(request, callback) { + return this.rpcCall(listDeviceConfigVersions, $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest, $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse, request, callback); + }, "name", { value: "ListDeviceConfigVersions" }); + + /** + * Calls ListDeviceConfigVersions. + * @function listDeviceConfigVersions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDevicesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.devices && message.devices.length)) - message.devices = []; - message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse - * @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.cloud.iot.v1.DeviceManager#listDeviceStates}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceStatesResponse} [response] ListDeviceStatesResponse */ - ListDevicesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListDevicesResponse message. - * @function verify - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListDeviceStates. + * @function listDeviceStates + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback} callback Node-style callback called with the error, if any, and ListDeviceStatesResponse + * @returns {undefined} + * @variation 1 */ - ListDevicesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.devices != null && message.hasOwnProperty("devices")) { - if (!Array.isArray(message.devices)) - return "devices: array expected"; - for (var i = 0; i < message.devices.length; ++i) { - var error = $root.google.cloud.iot.v1.Device.verify(message.devices[i]); - if (error) - return "devices." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(DeviceManager.prototype.listDeviceStates = function listDeviceStates(request, callback) { + return this.rpcCall(listDeviceStates, $root.google.cloud.iot.v1.ListDeviceStatesRequest, $root.google.cloud.iot.v1.ListDeviceStatesResponse, request, callback); + }, "name", { value: "ListDeviceStates" }); /** - * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * Calls ListDeviceStates. + * @function listDeviceStates + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDevicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDevicesResponse) - return object; - var message = new $root.google.cloud.iot.v1.ListDevicesResponse(); - if (object.devices) { - if (!Array.isArray(object.devices)) - throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: array expected"); - message.devices = []; - for (var i = 0; i < object.devices.length; ++i) { - if (typeof object.devices[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: object expected"); - message.devices[i] = $root.google.cloud.iot.v1.Device.fromObject(object.devices[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.ListDevicesResponse - * @static - * @param {google.cloud.iot.v1.ListDevicesResponse} message ListDevicesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - ListDevicesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.devices = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.devices && message.devices.length) { - object.devices = []; - for (var j = 0; j < message.devices.length; ++j) - object.devices[j] = $root.google.cloud.iot.v1.Device.toObject(message.devices[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListDevicesResponse to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.ListDevicesResponse + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager * @instance - * @returns {Object.} JSON object + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - ListDevicesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListDevicesResponse; - })(); + Object.defineProperty(DeviceManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); - v1.ModifyCloudToDeviceConfigRequest = (function() { + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a ModifyCloudToDeviceConfigRequest. - * @memberof google.cloud.iot.v1 - * @interface IModifyCloudToDeviceConfigRequest - * @property {string|null} [name] ModifyCloudToDeviceConfigRequest name - * @property {number|Long|null} [versionToUpdate] ModifyCloudToDeviceConfigRequest versionToUpdate - * @property {Uint8Array|null} [binaryData] ModifyCloudToDeviceConfigRequest binaryData + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ /** - * Constructs a new ModifyCloudToDeviceConfigRequest. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a ModifyCloudToDeviceConfigRequest. - * @implements IModifyCloudToDeviceConfigRequest - * @constructor - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - function ModifyCloudToDeviceConfigRequest(properties) { - if (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(DeviceManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); /** - * ModifyCloudToDeviceConfigRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ModifyCloudToDeviceConfigRequest.prototype.name = ""; /** - * ModifyCloudToDeviceConfigRequest versionToUpdate. - * @member {number|Long} versionToUpdate - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - ModifyCloudToDeviceConfigRequest.prototype.versionToUpdate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(DeviceManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * ModifyCloudToDeviceConfigRequest binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ModifyCloudToDeviceConfigRequest.prototype.binaryData = $util.newBuffer([]); /** - * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef SendCommandToDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} [response] SendCommandToDeviceResponse */ - ModifyCloudToDeviceConfigRequest.create = function create(properties) { - return new ModifyCloudToDeviceConfigRequest(properties); - }; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SendCommandToDevice. + * @function sendCommandToDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback} callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse + * @returns {undefined} + * @variation 1 */ - ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.versionToUpdate); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.binaryData); - return writer; - }; + Object.defineProperty(DeviceManager.prototype.sendCommandToDevice = function sendCommandToDevice(request, callback) { + return this.rpcCall(sendCommandToDevice, $root.google.cloud.iot.v1.SendCommandToDeviceRequest, $root.google.cloud.iot.v1.SendCommandToDeviceResponse, request, callback); + }, "name", { value: "SendCommandToDevice" }); /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SendCommandToDevice. + * @function sendCommandToDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ModifyCloudToDeviceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest - * @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.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef BindDeviceToGatewayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} [response] BindDeviceToGatewayResponse */ - ModifyCloudToDeviceConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.versionToUpdate = reader.int64(); - break; - case 3: - message.binaryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BindDeviceToGateway. + * @function bindDeviceToGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback} callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse + * @returns {undefined} + * @variation 1 */ - ModifyCloudToDeviceConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DeviceManager.prototype.bindDeviceToGateway = function bindDeviceToGateway(request, callback) { + return this.rpcCall(bindDeviceToGateway, $root.google.cloud.iot.v1.BindDeviceToGatewayRequest, $root.google.cloud.iot.v1.BindDeviceToGatewayResponse, request, callback); + }, "name", { value: "BindDeviceToGateway" }); /** - * Verifies a ModifyCloudToDeviceConfigRequest message. - * @function verify - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls BindDeviceToGateway. + * @function bindDeviceToGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) - if (!$util.isInteger(message.versionToUpdate) && !(message.versionToUpdate && $util.isInteger(message.versionToUpdate.low) && $util.isInteger(message.versionToUpdate.high))) - return "versionToUpdate: integer|Long expected"; - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; - return null; - }; /** - * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UnbindDeviceFromGatewayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} [response] UnbindDeviceFromGatewayResponse */ - ModifyCloudToDeviceConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest) - return object; - var message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.versionToUpdate != null) - if ($util.Long) - (message.versionToUpdate = $util.Long.fromValue(object.versionToUpdate)).unsigned = false; - else if (typeof object.versionToUpdate === "string") - message.versionToUpdate = parseInt(object.versionToUpdate, 10); - else if (typeof object.versionToUpdate === "number") - message.versionToUpdate = object.versionToUpdate; - else if (typeof object.versionToUpdate === "object") - message.versionToUpdate = new $util.LongBits(object.versionToUpdate.low >>> 0, object.versionToUpdate.high >>> 0).toNumber(); - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; - return message; - }; /** - * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @static - * @param {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UnbindDeviceFromGateway. + * @function unbindDeviceFromGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback} callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse + * @returns {undefined} + * @variation 1 */ - ModifyCloudToDeviceConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionToUpdate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionToUpdate = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) - if (typeof message.versionToUpdate === "number") - object.versionToUpdate = options.longs === String ? String(message.versionToUpdate) : message.versionToUpdate; - else - object.versionToUpdate = options.longs === String ? $util.Long.prototype.toString.call(message.versionToUpdate) : options.longs === Number ? new $util.LongBits(message.versionToUpdate.low >>> 0, message.versionToUpdate.high >>> 0).toNumber() : message.versionToUpdate; - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; - return object; - }; + Object.defineProperty(DeviceManager.prototype.unbindDeviceFromGateway = function unbindDeviceFromGateway(request, callback) { + return this.rpcCall(unbindDeviceFromGateway, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, request, callback); + }, "name", { value: "UnbindDeviceFromGateway" }); /** - * Converts this ModifyCloudToDeviceConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * Calls UnbindDeviceFromGateway. + * @function unbindDeviceFromGateway + * @memberof google.cloud.iot.v1.DeviceManager * @instance - * @returns {Object.} JSON object + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ModifyCloudToDeviceConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return ModifyCloudToDeviceConfigRequest; + return DeviceManager; })(); - v1.ListDeviceConfigVersionsRequest = (function() { + v1.CreateDeviceRegistryRequest = (function() { /** - * Properties of a ListDeviceConfigVersionsRequest. + * Properties of a CreateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IListDeviceConfigVersionsRequest - * @property {string|null} [name] ListDeviceConfigVersionsRequest name - * @property {number|null} [numVersions] ListDeviceConfigVersionsRequest numVersions + * @interface ICreateDeviceRegistryRequest + * @property {string|null} [parent] CreateDeviceRegistryRequest parent + * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] CreateDeviceRegistryRequest deviceRegistry */ /** - * Constructs a new ListDeviceConfigVersionsRequest. + * Constructs a new CreateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceConfigVersionsRequest. - * @implements IListDeviceConfigVersionsRequest + * @classdesc Represents a CreateDeviceRegistryRequest. + * @implements ICreateDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set */ - function ListDeviceConfigVersionsRequest(properties) { + function CreateDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4010,88 +4843,88 @@ } /** - * ListDeviceConfigVersionsRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * CreateDeviceRegistryRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @instance */ - ListDeviceConfigVersionsRequest.prototype.name = ""; + CreateDeviceRegistryRequest.prototype.parent = ""; /** - * ListDeviceConfigVersionsRequest numVersions. - * @member {number} numVersions - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * CreateDeviceRegistryRequest deviceRegistry. + * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @instance */ - ListDeviceConfigVersionsRequest.prototype.numVersions = 0; + CreateDeviceRegistryRequest.prototype.deviceRegistry = null; /** - * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. + * Creates a new CreateDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest instance */ - ListDeviceConfigVersionsRequest.create = function create(properties) { - return new ListDeviceConfigVersionsRequest(properties); + CreateDeviceRegistryRequest.create = function create(properties) { + return new CreateDeviceRegistryRequest(properties); }; /** - * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsRequest.encode = function encode(message, writer) { + CreateDeviceRegistryRequest.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.numVersions != null && message.hasOwnProperty("numVersions")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numVersions); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsRequest.decode = function decode(reader, length) { + CreateDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); 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.numVersions = reader.int32(); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4102,117 +4935,121 @@ }; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceConfigVersionsRequest message. + * Verifies a CreateDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceConfigVersionsRequest.verify = function verify(message) { + CreateDeviceRegistryRequest.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.numVersions != null && message.hasOwnProperty("numVersions")) - if (!$util.isInteger(message.numVersions)) - return "numVersions: integer expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); + if (error) + return "deviceRegistry." + error; + } return null; }; /** - * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest */ - ListDeviceConfigVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest) + CreateDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.numVersions != null) - message.numVersions = object.numVersions | 0; + var message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deviceRegistry != null) { + if (typeof object.deviceRegistry !== "object") + throw TypeError(".google.cloud.iot.v1.CreateDeviceRegistryRequest.deviceRegistry: object expected"); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); + } return message; }; /** - * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest + * @param {google.cloud.iot.v1.CreateDeviceRegistryRequest} message CreateDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceConfigVersionsRequest.toObject = function toObject(message, options) { + CreateDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.numVersions = 0; + object.parent = ""; + object.deviceRegistry = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.numVersions != null && message.hasOwnProperty("numVersions")) - object.numVersions = message.numVersions; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); return object; }; /** - * Converts this ListDeviceConfigVersionsRequest to JSON. + * Converts this CreateDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - ListDeviceConfigVersionsRequest.prototype.toJSON = function toJSON() { + CreateDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceConfigVersionsRequest; + return CreateDeviceRegistryRequest; })(); - v1.ListDeviceConfigVersionsResponse = (function() { + v1.GetDeviceRegistryRequest = (function() { /** - * Properties of a ListDeviceConfigVersionsResponse. + * Properties of a GetDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IListDeviceConfigVersionsResponse - * @property {Array.|null} [deviceConfigs] ListDeviceConfigVersionsResponse deviceConfigs + * @interface IGetDeviceRegistryRequest + * @property {string|null} [name] GetDeviceRegistryRequest name */ /** - * Constructs a new ListDeviceConfigVersionsResponse. + * Constructs a new GetDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceConfigVersionsResponse. - * @implements IListDeviceConfigVersionsResponse + * @classdesc Represents a GetDeviceRegistryRequest. + * @implements IGetDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set */ - function ListDeviceConfigVersionsResponse(properties) { - this.deviceConfigs = []; + function GetDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4220,78 +5057,75 @@ } /** - * ListDeviceConfigVersionsResponse deviceConfigs. - * @member {Array.} deviceConfigs - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * GetDeviceRegistryRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @instance */ - ListDeviceConfigVersionsResponse.prototype.deviceConfigs = $util.emptyArray; + GetDeviceRegistryRequest.prototype.name = ""; /** - * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. + * Creates a new GetDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest instance */ - ListDeviceConfigVersionsResponse.create = function create(properties) { - return new ListDeviceConfigVersionsResponse(properties); + GetDeviceRegistryRequest.create = function create(properties) { + return new GetDeviceRegistryRequest(properties); }; /** - * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsResponse.encode = function encode(message, writer) { + GetDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceConfigs != null && message.deviceConfigs.length) - for (var i = 0; i < message.deviceConfigs.length; ++i) - $root.google.cloud.iot.v1.DeviceConfig.encode(message.deviceConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsResponse.decode = function decode(reader, length) { + GetDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.deviceConfigs && message.deviceConfigs.length)) - message.deviceConfigs = []; - message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -4302,125 +5136,107 @@ }; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + GetDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceConfigVersionsResponse message. + * Verifies a GetDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceConfigVersionsResponse.verify = function verify(message) { + GetDeviceRegistryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceConfigs != null && message.hasOwnProperty("deviceConfigs")) { - if (!Array.isArray(message.deviceConfigs)) - return "deviceConfigs: array expected"; - for (var i = 0; i < message.deviceConfigs.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.deviceConfigs[i]); - if (error) - return "deviceConfigs." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest */ - ListDeviceConfigVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse) + GetDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GetDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); - if (object.deviceConfigs) { - if (!Array.isArray(object.deviceConfigs)) - throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: array expected"); - message.deviceConfigs = []; - for (var i = 0; i < object.deviceConfigs.length; ++i) { - if (typeof object.deviceConfigs[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: object expected"); - message.deviceConfigs[i] = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.deviceConfigs[i]); - } - } + var message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse + * @param {google.cloud.iot.v1.GetDeviceRegistryRequest} message GetDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceConfigVersionsResponse.toObject = function toObject(message, options) { + GetDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceConfigs = []; - if (message.deviceConfigs && message.deviceConfigs.length) { - object.deviceConfigs = []; - for (var j = 0; j < message.deviceConfigs.length; ++j) - object.deviceConfigs[j] = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.deviceConfigs[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListDeviceConfigVersionsResponse to JSON. + * Converts this GetDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - ListDeviceConfigVersionsResponse.prototype.toJSON = function toJSON() { + GetDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceConfigVersionsResponse; + return GetDeviceRegistryRequest; })(); - v1.ListDeviceStatesRequest = (function() { + v1.DeleteDeviceRegistryRequest = (function() { /** - * Properties of a ListDeviceStatesRequest. + * Properties of a DeleteDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IListDeviceStatesRequest - * @property {string|null} [name] ListDeviceStatesRequest name - * @property {number|null} [numStates] ListDeviceStatesRequest numStates + * @interface IDeleteDeviceRegistryRequest + * @property {string|null} [name] DeleteDeviceRegistryRequest name */ /** - * Constructs a new ListDeviceStatesRequest. + * Constructs a new DeleteDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceStatesRequest. - * @implements IListDeviceStatesRequest + * @classdesc Represents a DeleteDeviceRegistryRequest. + * @implements IDeleteDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set */ - function ListDeviceStatesRequest(properties) { + function DeleteDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4428,89 +5244,76 @@ } /** - * ListDeviceStatesRequest name. + * DeleteDeviceRegistryRequest name. * @member {string} name - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest - * @instance - */ - ListDeviceStatesRequest.prototype.name = ""; - - /** - * ListDeviceStatesRequest numStates. - * @member {number} numStates - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @instance */ - ListDeviceStatesRequest.prototype.numStates = 0; + DeleteDeviceRegistryRequest.prototype.name = ""; /** - * Creates a new ListDeviceStatesRequest instance using the specified properties. + * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest instance */ - ListDeviceStatesRequest.create = function create(properties) { - return new ListDeviceStatesRequest(properties); + DeleteDeviceRegistryRequest.create = function create(properties) { + return new DeleteDeviceRegistryRequest(properties); }; /** - * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesRequest.encode = function encode(message, writer) { + DeleteDeviceRegistryRequest.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.numStates != null && message.hasOwnProperty("numStates")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numStates); return writer; }; /** - * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesRequest.decode = function decode(reader, length) { + DeleteDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.numStates = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -4520,117 +5323,108 @@ }; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceStatesRequest message. + * Verifies a DeleteDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceStatesRequest.verify = function verify(message) { + DeleteDeviceRegistryRequest.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.numStates != null && message.hasOwnProperty("numStates")) - if (!$util.isInteger(message.numStates)) - return "numStates: integer expected"; return null; }; /** - * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest */ - ListDeviceStatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesRequest) + DeleteDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); + var message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); if (object.name != null) message.name = String(object.name); - if (object.numStates != null) - message.numStates = object.numStates | 0; return message; }; /** - * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.ListDeviceStatesRequest} message ListDeviceStatesRequest + * @param {google.cloud.iot.v1.DeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceStatesRequest.toObject = function toObject(message, options) { + DeleteDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.numStates = 0; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.numStates != null && message.hasOwnProperty("numStates")) - object.numStates = message.numStates; return object; }; /** - * Converts this ListDeviceStatesRequest to JSON. + * Converts this DeleteDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - ListDeviceStatesRequest.prototype.toJSON = function toJSON() { + DeleteDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceStatesRequest; + return DeleteDeviceRegistryRequest; })(); - v1.ListDeviceStatesResponse = (function() { + v1.UpdateDeviceRegistryRequest = (function() { /** - * Properties of a ListDeviceStatesResponse. + * Properties of an UpdateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IListDeviceStatesResponse - * @property {Array.|null} [deviceStates] ListDeviceStatesResponse deviceStates + * @interface IUpdateDeviceRegistryRequest + * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] UpdateDeviceRegistryRequest deviceRegistry + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRegistryRequest updateMask */ /** - * Constructs a new ListDeviceStatesResponse. + * Constructs a new UpdateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceStatesResponse. - * @implements IListDeviceStatesResponse + * @classdesc Represents an UpdateDeviceRegistryRequest. + * @implements IUpdateDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set */ - function ListDeviceStatesResponse(properties) { - this.deviceStates = []; + function UpdateDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4638,78 +5432,88 @@ } /** - * ListDeviceStatesResponse deviceStates. - * @member {Array.} deviceStates - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * UpdateDeviceRegistryRequest deviceRegistry. + * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @instance */ - ListDeviceStatesResponse.prototype.deviceStates = $util.emptyArray; + UpdateDeviceRegistryRequest.prototype.deviceRegistry = null; /** - * Creates a new ListDeviceStatesResponse instance using the specified properties. + * UpdateDeviceRegistryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @instance + */ + UpdateDeviceRegistryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest instance */ - ListDeviceStatesResponse.create = function create(properties) { - return new ListDeviceStatesResponse(properties); + UpdateDeviceRegistryRequest.create = function create(properties) { + return new UpdateDeviceRegistryRequest(properties); }; /** - * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesResponse.encode = function encode(message, writer) { + UpdateDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceStates != null && message.deviceStates.length) - for (var i = 0; i < message.deviceStates.length; ++i) - $root.google.cloud.iot.v1.DeviceState.encode(message.deviceStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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 ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesResponse.decode = function decode(reader, length) { + UpdateDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.deviceStates && message.deviceStates.length)) - message.deviceStates = []; - message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4720,126 +5524,128 @@ }; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceStatesResponse message. + * Verifies an UpdateDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceStatesResponse.verify = function verify(message) { + UpdateDeviceRegistryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceStates != null && message.hasOwnProperty("deviceStates")) { - if (!Array.isArray(message.deviceStates)) - return "deviceStates: array expected"; - for (var i = 0; i < message.deviceStates.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceState.verify(message.deviceStates[i]); - if (error) - return "deviceStates." + error; - } + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); + if (error) + return "deviceRegistry." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest */ - ListDeviceStatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesResponse) + UpdateDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); - if (object.deviceStates) { - if (!Array.isArray(object.deviceStates)) - throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: array expected"); - message.deviceStates = []; - for (var i = 0; i < object.deviceStates.length; ++i) { - if (typeof object.deviceStates[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: object expected"); - message.deviceStates[i] = $root.google.cloud.iot.v1.DeviceState.fromObject(object.deviceStates[i]); - } + var message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); + if (object.deviceRegistry != null) { + if (typeof object.deviceRegistry !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.deviceRegistry: object expected"); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.ListDeviceStatesResponse} message ListDeviceStatesResponse + * @param {google.cloud.iot.v1.UpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceStatesResponse.toObject = function toObject(message, options) { + UpdateDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceStates = []; - if (message.deviceStates && message.deviceStates.length) { - object.deviceStates = []; - for (var j = 0; j < message.deviceStates.length; ++j) - object.deviceStates[j] = $root.google.cloud.iot.v1.DeviceState.toObject(message.deviceStates[j], options); + if (options.defaults) { + object.deviceRegistry = null; + object.updateMask = null; } + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListDeviceStatesResponse to JSON. + * Converts this UpdateDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - ListDeviceStatesResponse.prototype.toJSON = function toJSON() { + UpdateDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceStatesResponse; + return UpdateDeviceRegistryRequest; })(); - v1.SendCommandToDeviceRequest = (function() { + v1.ListDeviceRegistriesRequest = (function() { /** - * Properties of a SendCommandToDeviceRequest. + * Properties of a ListDeviceRegistriesRequest. * @memberof google.cloud.iot.v1 - * @interface ISendCommandToDeviceRequest - * @property {string|null} [name] SendCommandToDeviceRequest name - * @property {Uint8Array|null} [binaryData] SendCommandToDeviceRequest binaryData - * @property {string|null} [subfolder] SendCommandToDeviceRequest subfolder + * @interface IListDeviceRegistriesRequest + * @property {string|null} [parent] ListDeviceRegistriesRequest parent + * @property {number|null} [pageSize] ListDeviceRegistriesRequest pageSize + * @property {string|null} [pageToken] ListDeviceRegistriesRequest pageToken */ /** - * Constructs a new SendCommandToDeviceRequest. + * Constructs a new ListDeviceRegistriesRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a SendCommandToDeviceRequest. - * @implements ISendCommandToDeviceRequest + * @classdesc Represents a ListDeviceRegistriesRequest. + * @implements IListDeviceRegistriesRequest * @constructor - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set */ - function SendCommandToDeviceRequest(properties) { + function ListDeviceRegistriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4847,101 +5653,101 @@ } /** - * SendCommandToDeviceRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * ListDeviceRegistriesRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance */ - SendCommandToDeviceRequest.prototype.name = ""; + ListDeviceRegistriesRequest.prototype.parent = ""; /** - * SendCommandToDeviceRequest binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * ListDeviceRegistriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance */ - SendCommandToDeviceRequest.prototype.binaryData = $util.newBuffer([]); + ListDeviceRegistriesRequest.prototype.pageSize = 0; /** - * SendCommandToDeviceRequest subfolder. - * @member {string} subfolder - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * ListDeviceRegistriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance */ - SendCommandToDeviceRequest.prototype.subfolder = ""; + ListDeviceRegistriesRequest.prototype.pageToken = ""; /** - * Creates a new SendCommandToDeviceRequest instance using the specified properties. + * Creates a new ListDeviceRegistriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest instance */ - SendCommandToDeviceRequest.create = function create(properties) { - return new SendCommandToDeviceRequest(properties); + ListDeviceRegistriesRequest.create = function create(properties) { + return new ListDeviceRegistriesRequest(properties); }; /** - * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceRequest.encode = function encode(message, writer) { + ListDeviceRegistriesRequest.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.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); - if (message.subfolder != null && message.hasOwnProperty("subfolder")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subfolder); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceRegistriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceRequest.decode = function decode(reader, length) { + ListDeviceRegistriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); 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.binaryData = reader.bytes(); + message.pageSize = reader.int32(); break; case 3: - message.subfolder = reader.string(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4952,132 +5758,126 @@ }; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeviceRegistriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SendCommandToDeviceRequest message. + * Verifies a ListDeviceRegistriesRequest message. * @function verify - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SendCommandToDeviceRequest.verify = function verify(message) { + ListDeviceRegistriesRequest.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.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; - if (message.subfolder != null && message.hasOwnProperty("subfolder")) - if (!$util.isString(message.subfolder)) - return "subfolder: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest */ - SendCommandToDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceRequest) + ListDeviceRegistriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesRequest) return object; - var message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; - if (object.subfolder != null) - message.subfolder = String(object.subfolder); + var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); + 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 SendCommandToDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.SendCommandToDeviceRequest} message SendCommandToDeviceRequest + * @param {google.cloud.iot.v1.ListDeviceRegistriesRequest} message ListDeviceRegistriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SendCommandToDeviceRequest.toObject = function toObject(message, options) { + ListDeviceRegistriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } - object.subfolder = ""; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; - if (message.subfolder != null && message.hasOwnProperty("subfolder")) - object.subfolder = message.subfolder; + 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 SendCommandToDeviceRequest to JSON. + * Converts this ListDeviceRegistriesRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance * @returns {Object.} JSON object */ - SendCommandToDeviceRequest.prototype.toJSON = function toJSON() { + ListDeviceRegistriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SendCommandToDeviceRequest; + return ListDeviceRegistriesRequest; })(); - v1.SendCommandToDeviceResponse = (function() { + v1.ListDeviceRegistriesResponse = (function() { /** - * Properties of a SendCommandToDeviceResponse. + * Properties of a ListDeviceRegistriesResponse. * @memberof google.cloud.iot.v1 - * @interface ISendCommandToDeviceResponse + * @interface IListDeviceRegistriesResponse + * @property {Array.|null} [deviceRegistries] ListDeviceRegistriesResponse deviceRegistries + * @property {string|null} [nextPageToken] ListDeviceRegistriesResponse nextPageToken */ /** - * Constructs a new SendCommandToDeviceResponse. + * Constructs a new ListDeviceRegistriesResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a SendCommandToDeviceResponse. - * @implements ISendCommandToDeviceResponse + * @classdesc Represents a ListDeviceRegistriesResponse. + * @implements IListDeviceRegistriesResponse * @constructor - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set */ - function SendCommandToDeviceResponse(properties) { + function ListDeviceRegistriesResponse(properties) { + this.deviceRegistries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5085,63 +5885,92 @@ } /** - * Creates a new SendCommandToDeviceResponse instance using the specified properties. + * ListDeviceRegistriesResponse deviceRegistries. + * @member {Array.} deviceRegistries + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @instance + */ + ListDeviceRegistriesResponse.prototype.deviceRegistries = $util.emptyArray; + + /** + * ListDeviceRegistriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @instance + */ + ListDeviceRegistriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDeviceRegistriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse instance */ - SendCommandToDeviceResponse.create = function create(properties) { - return new SendCommandToDeviceResponse(properties); + ListDeviceRegistriesResponse.create = function create(properties) { + return new ListDeviceRegistriesResponse(properties); }; /** - * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceResponse.encode = function encode(message, writer) { + ListDeviceRegistriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.deviceRegistries != null && message.deviceRegistries.length) + for (var i = 0; i < message.deviceRegistries.length; ++i) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistries[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 SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceRegistriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceResponse.decode = function decode(reader, length) { + ListDeviceRegistriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.deviceRegistries && message.deviceRegistries.length)) + message.deviceRegistries = []; + message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -5151,96 +5980,134 @@ }; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceResponse.decodeDelimited = function decodeDelimited(reader) { + ListDeviceRegistriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SendCommandToDeviceResponse message. + * Verifies a ListDeviceRegistriesResponse message. * @function verify - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SendCommandToDeviceResponse.verify = function verify(message) { + ListDeviceRegistriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.deviceRegistries != null && message.hasOwnProperty("deviceRegistries")) { + if (!Array.isArray(message.deviceRegistries)) + return "deviceRegistries: array expected"; + for (var i = 0; i < message.deviceRegistries.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistries[i]); + if (error) + return "deviceRegistries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse */ - SendCommandToDeviceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceResponse) + ListDeviceRegistriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesResponse) return object; - return new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); + var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); + if (object.deviceRegistries) { + if (!Array.isArray(object.deviceRegistries)) + throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: array expected"); + message.deviceRegistries = []; + for (var i = 0; i < object.deviceRegistries.length; ++i) { + if (typeof object.deviceRegistries[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: object expected"); + message.deviceRegistries[i] = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; }; /** - * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} message SendCommandToDeviceResponse + * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} message ListDeviceRegistriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SendCommandToDeviceResponse.toObject = function toObject() { - return {}; + ListDeviceRegistriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceRegistries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.deviceRegistries && message.deviceRegistries.length) { + object.deviceRegistries = []; + for (var j = 0; j < message.deviceRegistries.length; ++j) + object.deviceRegistries[j] = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; }; /** - * Converts this SendCommandToDeviceResponse to JSON. + * Converts this ListDeviceRegistriesResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @instance * @returns {Object.} JSON object */ - SendCommandToDeviceResponse.prototype.toJSON = function toJSON() { + ListDeviceRegistriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SendCommandToDeviceResponse; + return ListDeviceRegistriesResponse; })(); - v1.BindDeviceToGatewayRequest = (function() { + v1.CreateDeviceRequest = (function() { /** - * Properties of a BindDeviceToGatewayRequest. + * Properties of a CreateDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IBindDeviceToGatewayRequest - * @property {string|null} [parent] BindDeviceToGatewayRequest parent - * @property {string|null} [gatewayId] BindDeviceToGatewayRequest gatewayId - * @property {string|null} [deviceId] BindDeviceToGatewayRequest deviceId + * @interface ICreateDeviceRequest + * @property {string|null} [parent] CreateDeviceRequest parent + * @property {google.cloud.iot.v1.IDevice|null} [device] CreateDeviceRequest device */ /** - * Constructs a new BindDeviceToGatewayRequest. + * Constructs a new CreateDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a BindDeviceToGatewayRequest. - * @implements IBindDeviceToGatewayRequest + * @classdesc Represents a CreateDeviceRequest. + * @implements ICreateDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set */ - function BindDeviceToGatewayRequest(properties) { + function CreateDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5248,90 +6115,80 @@ } /** - * BindDeviceToGatewayRequest parent. + * CreateDeviceRequest parent. * @member {string} parent - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest - * @instance - */ - BindDeviceToGatewayRequest.prototype.parent = ""; - - /** - * BindDeviceToGatewayRequest gatewayId. - * @member {string} gatewayId - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @instance */ - BindDeviceToGatewayRequest.prototype.gatewayId = ""; + CreateDeviceRequest.prototype.parent = ""; /** - * BindDeviceToGatewayRequest deviceId. - * @member {string} deviceId - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * CreateDeviceRequest device. + * @member {google.cloud.iot.v1.IDevice|null|undefined} device + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @instance */ - BindDeviceToGatewayRequest.prototype.deviceId = ""; + CreateDeviceRequest.prototype.device = null; /** - * Creates a new BindDeviceToGatewayRequest instance using the specified properties. + * Creates a new CreateDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest instance */ - BindDeviceToGatewayRequest.create = function create(properties) { - return new BindDeviceToGatewayRequest(properties); + CreateDeviceRequest.create = function create(properties) { + return new CreateDeviceRequest(properties); }; /** - * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayRequest.encode = function encode(message, writer) { + CreateDeviceRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); + if (message.device != null && message.hasOwnProperty("device")) + $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. + * Decodes a CreateDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayRequest.decode = function decode(reader, length) { + CreateDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5339,10 +6196,7 @@ message.parent = reader.string(); break; case 2: - message.gatewayId = reader.string(); - break; - case 3: - message.deviceId = reader.string(); + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5353,123 +6207,122 @@ }; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayRequest.decodeDelimited = function decodeDelimited(reader) { + CreateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BindDeviceToGatewayRequest message. + * Verifies a CreateDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BindDeviceToGatewayRequest.verify = function verify(message) { + CreateDeviceRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - if (!$util.isString(message.gatewayId)) - return "gatewayId: string expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - if (!$util.isString(message.deviceId)) - return "deviceId: string expected"; + if (message.device != null && message.hasOwnProperty("device")) { + var error = $root.google.cloud.iot.v1.Device.verify(message.device); + if (error) + return "device." + error; + } return null; }; /** - * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest */ - BindDeviceToGatewayRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayRequest) + CreateDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); + var message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.gatewayId != null) - message.gatewayId = String(object.gatewayId); - if (object.deviceId != null) - message.deviceId = String(object.deviceId); + if (object.device != null) { + if (typeof object.device !== "object") + throw TypeError(".google.cloud.iot.v1.CreateDeviceRequest.device: object expected"); + message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); + } return message; }; /** - * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.BindDeviceToGatewayRequest} message BindDeviceToGatewayRequest + * @param {google.cloud.iot.v1.CreateDeviceRequest} message CreateDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindDeviceToGatewayRequest.toObject = function toObject(message, options) { + CreateDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.gatewayId = ""; - object.deviceId = ""; + object.device = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) - object.gatewayId = message.gatewayId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - object.deviceId = message.deviceId; + if (message.device != null && message.hasOwnProperty("device")) + object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); return object; }; /** - * Converts this BindDeviceToGatewayRequest to JSON. + * Converts this CreateDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @instance * @returns {Object.} JSON object */ - BindDeviceToGatewayRequest.prototype.toJSON = function toJSON() { + CreateDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BindDeviceToGatewayRequest; + return CreateDeviceRequest; })(); - v1.BindDeviceToGatewayResponse = (function() { + v1.GetDeviceRequest = (function() { /** - * Properties of a BindDeviceToGatewayResponse. + * Properties of a GetDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IBindDeviceToGatewayResponse + * @interface IGetDeviceRequest + * @property {string|null} [name] GetDeviceRequest name + * @property {google.protobuf.IFieldMask|null} [fieldMask] GetDeviceRequest fieldMask */ /** - * Constructs a new BindDeviceToGatewayResponse. + * Constructs a new GetDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a BindDeviceToGatewayResponse. - * @implements IBindDeviceToGatewayResponse + * @classdesc Represents a GetDeviceRequest. + * @implements IGetDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set */ - function BindDeviceToGatewayResponse(properties) { + function GetDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5477,63 +6330,89 @@ } /** - * Creates a new BindDeviceToGatewayResponse instance using the specified properties. + * GetDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @instance + */ + GetDeviceRequest.prototype.name = ""; + + /** + * GetDeviceRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @instance + */ + GetDeviceRequest.prototype.fieldMask = null; + + /** + * Creates a new GetDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse instance + * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest instance */ - BindDeviceToGatewayResponse.create = function create(properties) { - return new BindDeviceToGatewayResponse(properties); + GetDeviceRequest.create = function create(properties) { + return new GetDeviceRequest(properties); }; /** - * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayResponse.encode = function encode(message, writer) { + GetDeviceRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. + * Decodes a GetDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayResponse.decode = function decode(reader, length) { + GetDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -5543,96 +6422,122 @@ }; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayResponse.decodeDelimited = function decodeDelimited(reader) { + GetDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BindDeviceToGatewayResponse message. + * Verifies a GetDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BindDeviceToGatewayResponse.verify = function verify(message) { + GetDeviceRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } return null; }; /** - * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest */ - BindDeviceToGatewayResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayResponse) + GetDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GetDeviceRequest) return object; - return new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); + var message = new $root.google.cloud.iot.v1.GetDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.iot.v1.GetDeviceRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + return message; }; /** - * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} message BindDeviceToGatewayResponse + * @param {google.cloud.iot.v1.GetDeviceRequest} message GetDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindDeviceToGatewayResponse.toObject = function toObject() { - return {}; + GetDeviceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.fieldMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + return object; }; /** - * Converts this BindDeviceToGatewayResponse to JSON. + * Converts this GetDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.GetDeviceRequest * @instance * @returns {Object.} JSON object */ - BindDeviceToGatewayResponse.prototype.toJSON = function toJSON() { + GetDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BindDeviceToGatewayResponse; + return GetDeviceRequest; })(); - v1.UnbindDeviceFromGatewayRequest = (function() { + v1.UpdateDeviceRequest = (function() { /** - * Properties of an UnbindDeviceFromGatewayRequest. + * Properties of an UpdateDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IUnbindDeviceFromGatewayRequest - * @property {string|null} [parent] UnbindDeviceFromGatewayRequest parent - * @property {string|null} [gatewayId] UnbindDeviceFromGatewayRequest gatewayId - * @property {string|null} [deviceId] UnbindDeviceFromGatewayRequest deviceId + * @interface IUpdateDeviceRequest + * @property {google.cloud.iot.v1.IDevice|null} [device] UpdateDeviceRequest device + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRequest updateMask */ /** - * Constructs a new UnbindDeviceFromGatewayRequest. + * Constructs a new UpdateDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UnbindDeviceFromGatewayRequest. - * @implements IUnbindDeviceFromGatewayRequest + * @classdesc Represents an UpdateDeviceRequest. + * @implements IUpdateDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set */ - function UnbindDeviceFromGatewayRequest(properties) { + function UpdateDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5640,101 +6545,88 @@ } /** - * UnbindDeviceFromGatewayRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest - * @instance - */ - UnbindDeviceFromGatewayRequest.prototype.parent = ""; - - /** - * UnbindDeviceFromGatewayRequest gatewayId. - * @member {string} gatewayId - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * UpdateDeviceRequest device. + * @member {google.cloud.iot.v1.IDevice|null|undefined} device + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @instance */ - UnbindDeviceFromGatewayRequest.prototype.gatewayId = ""; + UpdateDeviceRequest.prototype.device = null; /** - * UnbindDeviceFromGatewayRequest deviceId. - * @member {string} deviceId - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * UpdateDeviceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @instance */ - UnbindDeviceFromGatewayRequest.prototype.deviceId = ""; + UpdateDeviceRequest.prototype.updateMask = null; /** - * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. + * Creates a new UpdateDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest instance */ - UnbindDeviceFromGatewayRequest.create = function create(properties) { - return new UnbindDeviceFromGatewayRequest(properties); + UpdateDeviceRequest.create = function create(properties) { + return new UpdateDeviceRequest(properties); }; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayRequest.encode = function encode(message, writer) { + UpdateDeviceRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); + if (message.device != null && message.hasOwnProperty("device")) + $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. + * Decodes an UpdateDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayRequest.decode = function decode(reader, length) { + UpdateDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; case 2: - message.gatewayId = reader.string(); + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); break; case 3: - message.deviceId = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5745,123 +6637,126 @@ }; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UnbindDeviceFromGatewayRequest message. + * Verifies an UpdateDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UnbindDeviceFromGatewayRequest.verify = function verify(message) { + UpdateDeviceRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - if (!$util.isString(message.gatewayId)) - return "gatewayId: string expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - if (!$util.isString(message.deviceId)) - return "deviceId: string expected"; + if (message.device != null && message.hasOwnProperty("device")) { + var error = $root.google.cloud.iot.v1.Device.verify(message.device); + if (error) + return "device." + 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 UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest */ - UnbindDeviceFromGatewayRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) + UpdateDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.gatewayId != null) - message.gatewayId = String(object.gatewayId); - if (object.deviceId != null) - message.deviceId = String(object.deviceId); + var message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); + if (object.device != null) { + if (typeof object.device !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.device: object expected"); + message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest + * @param {google.cloud.iot.v1.UpdateDeviceRequest} message UpdateDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UnbindDeviceFromGatewayRequest.toObject = function toObject(message, options) { + UpdateDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.gatewayId = ""; - object.deviceId = ""; + object.device = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) - object.gatewayId = message.gatewayId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - object.deviceId = message.deviceId; + if (message.device != null && message.hasOwnProperty("device")) + object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UnbindDeviceFromGatewayRequest to JSON. + * Converts this UpdateDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @instance * @returns {Object.} JSON object */ - UnbindDeviceFromGatewayRequest.prototype.toJSON = function toJSON() { + UpdateDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UnbindDeviceFromGatewayRequest; + return UpdateDeviceRequest; })(); - v1.UnbindDeviceFromGatewayResponse = (function() { + v1.DeleteDeviceRequest = (function() { /** - * Properties of an UnbindDeviceFromGatewayResponse. + * Properties of a DeleteDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IUnbindDeviceFromGatewayResponse + * @interface IDeleteDeviceRequest + * @property {string|null} [name] DeleteDeviceRequest name */ /** - * Constructs a new UnbindDeviceFromGatewayResponse. + * Constructs a new DeleteDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UnbindDeviceFromGatewayResponse. - * @implements IUnbindDeviceFromGatewayResponse + * @classdesc Represents a DeleteDeviceRequest. + * @implements IDeleteDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set */ - function UnbindDeviceFromGatewayResponse(properties) { + function DeleteDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5869,63 +6764,76 @@ } /** - * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. + * DeleteDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @instance + */ + DeleteDeviceRequest.prototype.name = ""; + + /** + * Creates a new DeleteDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest instance */ - UnbindDeviceFromGatewayResponse.create = function create(properties) { - return new UnbindDeviceFromGatewayResponse(properties); + DeleteDeviceRequest.create = function create(properties) { + return new DeleteDeviceRequest(properties); }; /** - * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayResponse.encode = function encode(message, writer) { + DeleteDeviceRequest.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 UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayResponse.decode = function decode(reader, length) { + DeleteDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -5935,112 +6843,115 @@ }; /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UnbindDeviceFromGatewayResponse message. + * Verifies a DeleteDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UnbindDeviceFromGatewayResponse.verify = function verify(message) { + DeleteDeviceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest */ - UnbindDeviceFromGatewayResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) + DeleteDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRequest) return object; - return new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); + var message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse + * @param {google.cloud.iot.v1.DeleteDeviceRequest} message DeleteDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UnbindDeviceFromGatewayResponse.toObject = function toObject() { - return {}; + DeleteDeviceRequest.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 UnbindDeviceFromGatewayResponse to JSON. + * Converts this DeleteDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @instance * @returns {Object.} JSON object */ - UnbindDeviceFromGatewayResponse.prototype.toJSON = function toJSON() { + DeleteDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UnbindDeviceFromGatewayResponse; + return DeleteDeviceRequest; })(); - v1.Device = (function() { + v1.ListDevicesRequest = (function() { /** - * Properties of a Device. + * Properties of a ListDevicesRequest. * @memberof google.cloud.iot.v1 - * @interface IDevice - * @property {string|null} [id] Device id - * @property {string|null} [name] Device name - * @property {number|Long|null} [numId] Device numId - * @property {Array.|null} [credentials] Device credentials - * @property {google.protobuf.ITimestamp|null} [lastHeartbeatTime] Device lastHeartbeatTime - * @property {google.protobuf.ITimestamp|null} [lastEventTime] Device lastEventTime - * @property {google.protobuf.ITimestamp|null} [lastStateTime] Device lastStateTime - * @property {google.protobuf.ITimestamp|null} [lastConfigAckTime] Device lastConfigAckTime - * @property {google.protobuf.ITimestamp|null} [lastConfigSendTime] Device lastConfigSendTime - * @property {boolean|null} [blocked] Device blocked - * @property {google.protobuf.ITimestamp|null} [lastErrorTime] Device lastErrorTime - * @property {google.rpc.IStatus|null} [lastErrorStatus] Device lastErrorStatus - * @property {google.cloud.iot.v1.IDeviceConfig|null} [config] Device config - * @property {google.cloud.iot.v1.IDeviceState|null} [state] Device state - * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] Device logLevel - * @property {Object.|null} [metadata] Device metadata - * @property {google.cloud.iot.v1.IGatewayConfig|null} [gatewayConfig] Device gatewayConfig + * @interface IListDevicesRequest + * @property {string|null} [parent] ListDevicesRequest parent + * @property {Array.|null} [deviceNumIds] ListDevicesRequest deviceNumIds + * @property {Array.|null} [deviceIds] ListDevicesRequest deviceIds + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListDevicesRequest fieldMask + * @property {google.cloud.iot.v1.IGatewayListOptions|null} [gatewayListOptions] ListDevicesRequest gatewayListOptions + * @property {number|null} [pageSize] ListDevicesRequest pageSize + * @property {string|null} [pageToken] ListDevicesRequest pageToken */ /** - * Constructs a new Device. + * Constructs a new ListDevicesRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a Device. - * @implements IDevice + * @classdesc Represents a ListDevicesRequest. + * @implements IListDevicesRequest * @constructor - * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set */ - function Device(properties) { - this.credentials = []; - this.metadata = {}; + function ListDevicesRequest(properties) { + this.deviceNumIds = []; + this.deviceIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6048,292 +6959,167 @@ } /** - * Device id. - * @member {string} id - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.id = ""; - - /** - * Device name. - * @member {string} name - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.name = ""; - - /** - * Device numId. - * @member {number|Long} numId - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.numId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Device credentials. - * @member {Array.} credentials - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.credentials = $util.emptyArray; - - /** - * Device lastHeartbeatTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastHeartbeatTime - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.lastHeartbeatTime = null; - - /** - * Device lastEventTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastEventTime - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.lastEventTime = null; - - /** - * Device lastStateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastStateTime - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.lastStateTime = null; - - /** - * Device lastConfigAckTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastConfigAckTime - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.lastConfigAckTime = null; - - /** - * Device lastConfigSendTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastConfigSendTime - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.lastConfigSendTime = null; - - /** - * Device blocked. - * @member {boolean} blocked - * @memberof google.cloud.iot.v1.Device - * @instance - */ - Device.prototype.blocked = false; - - /** - * Device lastErrorTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastErrorTime - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.lastErrorTime = null; + ListDevicesRequest.prototype.parent = ""; /** - * Device lastErrorStatus. - * @member {google.rpc.IStatus|null|undefined} lastErrorStatus - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest deviceNumIds. + * @member {Array.} deviceNumIds + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.lastErrorStatus = null; + ListDevicesRequest.prototype.deviceNumIds = $util.emptyArray; /** - * Device config. - * @member {google.cloud.iot.v1.IDeviceConfig|null|undefined} config - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest deviceIds. + * @member {Array.} deviceIds + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.config = null; + ListDevicesRequest.prototype.deviceIds = $util.emptyArray; /** - * Device state. - * @member {google.cloud.iot.v1.IDeviceState|null|undefined} state - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.state = null; + ListDevicesRequest.prototype.fieldMask = null; /** - * Device logLevel. - * @member {google.cloud.iot.v1.LogLevel} logLevel - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest gatewayListOptions. + * @member {google.cloud.iot.v1.IGatewayListOptions|null|undefined} gatewayListOptions + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.logLevel = 0; + ListDevicesRequest.prototype.gatewayListOptions = null; /** - * Device metadata. - * @member {Object.} metadata - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.metadata = $util.emptyObject; + ListDevicesRequest.prototype.pageSize = 0; /** - * Device gatewayConfig. - * @member {google.cloud.iot.v1.IGatewayConfig|null|undefined} gatewayConfig - * @memberof google.cloud.iot.v1.Device + * ListDevicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - Device.prototype.gatewayConfig = null; + ListDevicesRequest.prototype.pageToken = ""; /** - * Creates a new Device instance using the specified properties. + * Creates a new ListDevicesRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set - * @returns {google.cloud.iot.v1.Device} Device instance + * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest instance */ - Device.create = function create(properties) { - return new Device(properties); + ListDevicesRequest.create = function create(properties) { + return new ListDevicesRequest(properties); }; /** - * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode + * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Device.encode = function encode(message, writer) { + ListDevicesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.numId != null && message.hasOwnProperty("numId")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.numId); - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) - $root.google.protobuf.Timestamp.encode(message.lastHeartbeatTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) - $root.google.protobuf.Timestamp.encode(message.lastEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) - $root.google.protobuf.Timestamp.encode(message.lastErrorTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) - $root.google.rpc.Status.encode(message.lastErrorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.credentials != null && message.credentials.length) - for (var i = 0; i < message.credentials.length; ++i) - $root.google.cloud.iot.v1.DeviceCredential.encode(message.credentials[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.config != null && message.hasOwnProperty("config")) - $root.google.cloud.iot.v1.DeviceConfig.encode(message.config, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) - $root.google.protobuf.Timestamp.encode(message.lastConfigAckTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.state != null && message.hasOwnProperty("state")) - $root.google.cloud.iot.v1.DeviceState.encode(message.state, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) - $root.google.protobuf.Timestamp.encode(message.lastConfigSendTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.blocked != null && message.hasOwnProperty("blocked")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.blocked); - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) - $root.google.protobuf.Timestamp.encode(message.lastStateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.logLevel); - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) - $root.google.cloud.iot.v1.GatewayConfig.encode(message.gatewayConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deviceNumIds != null && message.deviceNumIds.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.deviceNumIds.length; ++i) + writer.uint64(message.deviceNumIds[i]); + writer.ldelim(); + } + if (message.deviceIds != null && message.deviceIds.length) + for (var i = 0; i < message.deviceIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceIds[i]); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + $root.google.cloud.iot.v1.GatewayListOptions.encode(message.gatewayListOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 100, wireType 0 =*/800).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.pageToken); return writer; }; /** - * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode + * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Device.encodeDelimited = function encodeDelimited(message, writer) { + ListDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Device message from the specified reader or buffer. + * Decodes a ListDevicesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.Device} Device + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Device.decode = function decode(reader, length) { + ListDevicesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.parent = reader.string(); break; case 2: - message.name = reader.string(); + if (!(message.deviceNumIds && message.deviceNumIds.length)) + message.deviceNumIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.deviceNumIds.push(reader.uint64()); + } else + message.deviceNumIds.push(reader.uint64()); break; case 3: - message.numId = reader.uint64(); - break; - case 12: - if (!(message.credentials && message.credentials.length)) - message.credentials = []; - message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); - break; - case 7: - message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 20: - message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 18: - message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 19: - message.blocked = reader.bool(); - break; - case 10: - message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 13: - message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); + if (!(message.deviceIds && message.deviceIds.length)) + message.deviceIds = []; + message.deviceIds.push(reader.string()); break; - case 16: - message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); + case 4: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; - case 21: - message.logLevel = reader.int32(); + case 6: + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); break; - case 17: - reader.skip().pos++; - if (message.metadata === $util.emptyObject) - message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); + case 100: + message.pageSize = reader.int32(); break; - case 24: - message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); + case 101: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6344,364 +7130,204 @@ }; /** - * Decodes a Device message from the specified reader or buffer, length delimited. + * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.Device} Device + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Device.decodeDelimited = function decodeDelimited(reader) { + ListDevicesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Device message. + * Verifies a ListDevicesRequest message. * @function verify - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Device.verify = function verify(message) { + ListDevicesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.numId != null && message.hasOwnProperty("numId")) - if (!$util.isInteger(message.numId) && !(message.numId && $util.isInteger(message.numId.low) && $util.isInteger(message.numId.high))) - return "numId: integer|Long expected"; - if (message.credentials != null && message.hasOwnProperty("credentials")) { - if (!Array.isArray(message.credentials)) - return "credentials: array expected"; - for (var i = 0; i < message.credentials.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceCredential.verify(message.credentials[i]); - if (error) - return "credentials." + error; - } - } - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastHeartbeatTime); - if (error) - return "lastHeartbeatTime." + error; - } - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastEventTime); - if (error) - return "lastEventTime." + error; - } - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastStateTime); - if (error) - return "lastStateTime." + error; - } - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastConfigAckTime); - if (error) - return "lastConfigAckTime." + error; - } - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastConfigSendTime); - if (error) - return "lastConfigSendTime." + error; - } - if (message.blocked != null && message.hasOwnProperty("blocked")) - if (typeof message.blocked !== "boolean") - return "blocked: boolean expected"; - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastErrorTime); - if (error) - return "lastErrorTime." + error; - } - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) { - var error = $root.google.rpc.Status.verify(message.lastErrorStatus); - if (error) - return "lastErrorStatus." + error; - } - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.state != null && message.hasOwnProperty("state")) { - var error = $root.google.cloud.iot.v1.DeviceState.verify(message.state); - if (error) - return "state." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deviceNumIds != null && message.hasOwnProperty("deviceNumIds")) { + if (!Array.isArray(message.deviceNumIds)) + return "deviceNumIds: array expected"; + for (var i = 0; i < message.deviceNumIds.length; ++i) + if (!$util.isInteger(message.deviceNumIds[i]) && !(message.deviceNumIds[i] && $util.isInteger(message.deviceNumIds[i].low) && $util.isInteger(message.deviceNumIds[i].high))) + return "deviceNumIds: integer|Long[] expected"; } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - switch (message.logLevel) { - default: - return "logLevel: enum value expected"; - case 0: - case 10: - case 20: - case 30: - case 40: - break; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.deviceIds != null && message.hasOwnProperty("deviceIds")) { + if (!Array.isArray(message.deviceIds)) + return "deviceIds: array expected"; + for (var i = 0; i < message.deviceIds.length; ++i) + if (!$util.isString(message.deviceIds[i])) + return "deviceIds: string[] expected"; } - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) { - var error = $root.google.cloud.iot.v1.GatewayConfig.verify(message.gatewayConfig); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) - return "gatewayConfig." + error; + return "fieldMask." + error; + } + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) { + var error = $root.google.cloud.iot.v1.GatewayListOptions.verify(message.gatewayListOptions); + if (error) + return "gatewayListOptions." + 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 Device message from a plain object. Also converts values to their respective internal types. + * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.Device} Device + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest */ - Device.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.Device) + ListDevicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDevicesRequest) return object; - var message = new $root.google.cloud.iot.v1.Device(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.numId != null) - if ($util.Long) - (message.numId = $util.Long.fromValue(object.numId)).unsigned = true; - else if (typeof object.numId === "string") - message.numId = parseInt(object.numId, 10); - else if (typeof object.numId === "number") - message.numId = object.numId; - else if (typeof object.numId === "object") - message.numId = new $util.LongBits(object.numId.low >>> 0, object.numId.high >>> 0).toNumber(true); - if (object.credentials) { - if (!Array.isArray(object.credentials)) - throw TypeError(".google.cloud.iot.v1.Device.credentials: array expected"); - message.credentials = []; - for (var i = 0; i < object.credentials.length; ++i) { - if (typeof object.credentials[i] !== "object") - throw TypeError(".google.cloud.iot.v1.Device.credentials: object expected"); - message.credentials[i] = $root.google.cloud.iot.v1.DeviceCredential.fromObject(object.credentials[i]); - } - } - if (object.lastHeartbeatTime != null) { - if (typeof object.lastHeartbeatTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastHeartbeatTime: object expected"); - message.lastHeartbeatTime = $root.google.protobuf.Timestamp.fromObject(object.lastHeartbeatTime); - } - if (object.lastEventTime != null) { - if (typeof object.lastEventTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastEventTime: object expected"); - message.lastEventTime = $root.google.protobuf.Timestamp.fromObject(object.lastEventTime); - } - if (object.lastStateTime != null) { - if (typeof object.lastStateTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastStateTime: object expected"); - message.lastStateTime = $root.google.protobuf.Timestamp.fromObject(object.lastStateTime); - } - if (object.lastConfigAckTime != null) { - if (typeof object.lastConfigAckTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastConfigAckTime: object expected"); - message.lastConfigAckTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigAckTime); - } - if (object.lastConfigSendTime != null) { - if (typeof object.lastConfigSendTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastConfigSendTime: object expected"); - message.lastConfigSendTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigSendTime); - } - if (object.blocked != null) - message.blocked = Boolean(object.blocked); - if (object.lastErrorTime != null) { - if (typeof object.lastErrorTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastErrorTime: object expected"); - message.lastErrorTime = $root.google.protobuf.Timestamp.fromObject(object.lastErrorTime); - } - if (object.lastErrorStatus != null) { - if (typeof object.lastErrorStatus !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastErrorStatus: object expected"); - message.lastErrorStatus = $root.google.rpc.Status.fromObject(object.lastErrorStatus); - } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.iot.v1.Device.config: object expected"); - message.config = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.config); - } - if (object.state != null) { - if (typeof object.state !== "object") - throw TypeError(".google.cloud.iot.v1.Device.state: object expected"); - message.state = $root.google.cloud.iot.v1.DeviceState.fromObject(object.state); + var message = new $root.google.cloud.iot.v1.ListDevicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deviceNumIds) { + if (!Array.isArray(object.deviceNumIds)) + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceNumIds: array expected"); + message.deviceNumIds = []; + for (var i = 0; i < object.deviceNumIds.length; ++i) + if ($util.Long) + (message.deviceNumIds[i] = $util.Long.fromValue(object.deviceNumIds[i])).unsigned = true; + else if (typeof object.deviceNumIds[i] === "string") + message.deviceNumIds[i] = parseInt(object.deviceNumIds[i], 10); + else if (typeof object.deviceNumIds[i] === "number") + message.deviceNumIds[i] = object.deviceNumIds[i]; + else if (typeof object.deviceNumIds[i] === "object") + message.deviceNumIds[i] = new $util.LongBits(object.deviceNumIds[i].low >>> 0, object.deviceNumIds[i].high >>> 0).toNumber(true); } - switch (object.logLevel) { - case "LOG_LEVEL_UNSPECIFIED": - case 0: - message.logLevel = 0; - break; - case "NONE": - case 10: - message.logLevel = 10; - break; - case "ERROR": - case 20: - message.logLevel = 20; - break; - case "INFO": - case 30: - message.logLevel = 30; - break; - case "DEBUG": - case 40: - message.logLevel = 40; - break; + if (object.deviceIds) { + if (!Array.isArray(object.deviceIds)) + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceIds: array expected"); + message.deviceIds = []; + for (var i = 0; i < object.deviceIds.length; ++i) + message.deviceIds[i] = String(object.deviceIds[i]); } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.iot.v1.Device.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); } - if (object.gatewayConfig != null) { - if (typeof object.gatewayConfig !== "object") - throw TypeError(".google.cloud.iot.v1.Device.gatewayConfig: object expected"); - message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.fromObject(object.gatewayConfig); + if (object.gatewayListOptions != null) { + if (typeof object.gatewayListOptions !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.gatewayListOptions: object expected"); + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.fromObject(object.gatewayListOptions); } + 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 Device message. Also converts values to other types if specified. + * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.Device} message Device + * @param {google.cloud.iot.v1.ListDevicesRequest} message ListDevicesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Device.toObject = function toObject(message, options) { + ListDevicesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.credentials = []; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.id = ""; - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.numId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numId = options.longs === String ? "0" : 0; - object.lastHeartbeatTime = null; - object.lastEventTime = null; - object.lastErrorTime = null; - object.lastErrorStatus = null; - object.config = null; - object.lastConfigAckTime = null; - object.state = null; - object.lastConfigSendTime = null; - object.blocked = false; - object.lastStateTime = null; - object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; - object.gatewayConfig = null; + if (options.arrays || options.defaults) { + object.deviceNumIds = []; + object.deviceIds = []; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.numId != null && message.hasOwnProperty("numId")) - if (typeof message.numId === "number") - object.numId = options.longs === String ? String(message.numId) : message.numId; - else - object.numId = options.longs === String ? $util.Long.prototype.toString.call(message.numId) : options.longs === Number ? new $util.LongBits(message.numId.low >>> 0, message.numId.high >>> 0).toNumber(true) : message.numId; - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) - object.lastHeartbeatTime = $root.google.protobuf.Timestamp.toObject(message.lastHeartbeatTime, options); - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) - object.lastEventTime = $root.google.protobuf.Timestamp.toObject(message.lastEventTime, options); - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) - object.lastErrorTime = $root.google.protobuf.Timestamp.toObject(message.lastErrorTime, options); - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) - object.lastErrorStatus = $root.google.rpc.Status.toObject(message.lastErrorStatus, options); - if (message.credentials && message.credentials.length) { - object.credentials = []; - for (var j = 0; j < message.credentials.length; ++j) - object.credentials[j] = $root.google.cloud.iot.v1.DeviceCredential.toObject(message.credentials[j], options); + if (options.defaults) { + object.parent = ""; + object.fieldMask = null; + object.gatewayListOptions = null; + object.pageSize = 0; + object.pageToken = ""; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.config, options); - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) - object.lastConfigAckTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigAckTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = $root.google.cloud.iot.v1.DeviceState.toObject(message.state, options); - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deviceNumIds && message.deviceNumIds.length) { + object.deviceNumIds = []; + for (var j = 0; j < message.deviceNumIds.length; ++j) + if (typeof message.deviceNumIds[j] === "number") + object.deviceNumIds[j] = options.longs === String ? String(message.deviceNumIds[j]) : message.deviceNumIds[j]; + else + object.deviceNumIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.deviceNumIds[j]) : options.longs === Number ? new $util.LongBits(message.deviceNumIds[j].low >>> 0, message.deviceNumIds[j].high >>> 0).toNumber(true) : message.deviceNumIds[j]; } - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) - object.lastConfigSendTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigSendTime, options); - if (message.blocked != null && message.hasOwnProperty("blocked")) - object.blocked = message.blocked; - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) - object.lastStateTime = $root.google.protobuf.Timestamp.toObject(message.lastStateTime, options); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) - object.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.toObject(message.gatewayConfig, options); + if (message.deviceIds && message.deviceIds.length) { + object.deviceIds = []; + for (var j = 0; j < message.deviceIds.length; ++j) + object.deviceIds[j] = message.deviceIds[j]; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + object.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.toObject(message.gatewayListOptions, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this Device to JSON. + * Converts this ListDevicesRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.Device + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance * @returns {Object.} JSON object */ - Device.prototype.toJSON = function toJSON() { + ListDevicesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Device; + return ListDevicesRequest; })(); - v1.GatewayConfig = (function() { + v1.GatewayListOptions = (function() { /** - * Properties of a GatewayConfig. + * Properties of a GatewayListOptions. * @memberof google.cloud.iot.v1 - * @interface IGatewayConfig - * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayConfig gatewayType - * @property {google.cloud.iot.v1.GatewayAuthMethod|null} [gatewayAuthMethod] GatewayConfig gatewayAuthMethod - * @property {string|null} [lastAccessedGatewayId] GatewayConfig lastAccessedGatewayId - * @property {google.protobuf.ITimestamp|null} [lastAccessedGatewayTime] GatewayConfig lastAccessedGatewayTime + * @interface IGatewayListOptions + * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayListOptions gatewayType + * @property {string|null} [associationsGatewayId] GatewayListOptions associationsGatewayId + * @property {string|null} [associationsDeviceId] GatewayListOptions associationsDeviceId */ /** - * Constructs a new GatewayConfig. + * Constructs a new GatewayListOptions. * @memberof google.cloud.iot.v1 - * @classdesc Represents a GatewayConfig. - * @implements IGatewayConfig + * @classdesc Represents a GatewayListOptions. + * @implements IGatewayListOptions * @constructor - * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set */ - function GatewayConfig(properties) { + function GatewayListOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6709,100 +7335,104 @@ } /** - * GatewayConfig gatewayType. + * GatewayListOptions gatewayType. * @member {google.cloud.iot.v1.GatewayType} gatewayType - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayConfig.prototype.gatewayType = 0; + GatewayListOptions.prototype.gatewayType = 0; /** - * GatewayConfig gatewayAuthMethod. - * @member {google.cloud.iot.v1.GatewayAuthMethod} gatewayAuthMethod - * @memberof google.cloud.iot.v1.GatewayConfig + * GatewayListOptions associationsGatewayId. + * @member {string} associationsGatewayId + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayConfig.prototype.gatewayAuthMethod = 0; + GatewayListOptions.prototype.associationsGatewayId = ""; /** - * GatewayConfig lastAccessedGatewayId. - * @member {string} lastAccessedGatewayId - * @memberof google.cloud.iot.v1.GatewayConfig + * GatewayListOptions associationsDeviceId. + * @member {string} associationsDeviceId + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayConfig.prototype.lastAccessedGatewayId = ""; + GatewayListOptions.prototype.associationsDeviceId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * GatewayConfig lastAccessedGatewayTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastAccessedGatewayTime - * @memberof google.cloud.iot.v1.GatewayConfig + * GatewayListOptions filter. + * @member {"gatewayType"|"associationsGatewayId"|"associationsDeviceId"|undefined} filter + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayConfig.prototype.lastAccessedGatewayTime = null; + Object.defineProperty(GatewayListOptions.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["gatewayType", "associationsGatewayId", "associationsDeviceId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GatewayConfig instance using the specified properties. + * Creates a new GatewayListOptions instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static - * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig instance + * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions instance */ - GatewayConfig.create = function create(properties) { - return new GatewayConfig(properties); + GatewayListOptions.create = function create(properties) { + return new GatewayListOptions(properties); }; /** - * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static - * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode + * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GatewayConfig.encode = function encode(message, writer) { + GatewayListOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gatewayAuthMethod); - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAccessedGatewayId); - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) - $root.google.protobuf.Timestamp.encode(message.lastAccessedGatewayTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.associationsGatewayId); + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.associationsDeviceId); return writer; }; /** - * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static - * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode + * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GatewayConfig.encodeDelimited = function encodeDelimited(message, writer) { + GatewayListOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GatewayConfig message from the specified reader or buffer. + * Decodes a GatewayListOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GatewayConfig.decode = function decode(reader, length) { + GatewayListOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayListOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6810,13 +7440,10 @@ message.gatewayType = reader.int32(); break; case 2: - message.gatewayAuthMethod = reader.int32(); + message.associationsGatewayId = reader.string(); break; case 3: - message.lastAccessedGatewayId = reader.string(); - break; - case 4: - message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.associationsDeviceId = reader.string(); break; default: reader.skipType(tag & 7); @@ -6827,33 +7454,35 @@ }; /** - * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. + * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GatewayConfig.decodeDelimited = function decodeDelimited(reader) { + GatewayListOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GatewayConfig message. + * Verifies a GatewayListOptions message. * @function verify - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GatewayConfig.verify = function verify(message) { + GatewayListOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + var properties = {}; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { + properties.filter = 1; switch (message.gatewayType) { default: return "gatewayType: enum value expected"; @@ -6862,39 +7491,36 @@ case 2: break; } - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - switch (message.gatewayAuthMethod) { - default: - return "gatewayAuthMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) - if (!$util.isString(message.lastAccessedGatewayId)) - return "lastAccessedGatewayId: string expected"; - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastAccessedGatewayTime); - if (error) - return "lastAccessedGatewayTime." + error; + } + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.associationsGatewayId)) + return "associationsGatewayId: string expected"; + } + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.associationsDeviceId)) + return "associationsDeviceId: string expected"; } return null; }; /** - * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions */ - GatewayConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GatewayConfig) + GatewayListOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GatewayListOptions) return object; - var message = new $root.google.cloud.iot.v1.GatewayConfig(); + var message = new $root.google.cloud.iot.v1.GatewayListOptions(); switch (object.gatewayType) { case "GATEWAY_TYPE_UNSPECIFIED": case 0: @@ -6909,105 +7535,78 @@ message.gatewayType = 2; break; } - switch (object.gatewayAuthMethod) { - case "GATEWAY_AUTH_METHOD_UNSPECIFIED": - case 0: - message.gatewayAuthMethod = 0; - break; - case "ASSOCIATION_ONLY": - case 1: - message.gatewayAuthMethod = 1; - break; - case "DEVICE_AUTH_TOKEN_ONLY": - case 2: - message.gatewayAuthMethod = 2; - break; - case "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": - case 3: - message.gatewayAuthMethod = 3; - break; - } - if (object.lastAccessedGatewayId != null) - message.lastAccessedGatewayId = String(object.lastAccessedGatewayId); - if (object.lastAccessedGatewayTime != null) { - if (typeof object.lastAccessedGatewayTime !== "object") - throw TypeError(".google.cloud.iot.v1.GatewayConfig.lastAccessedGatewayTime: object expected"); - message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.fromObject(object.lastAccessedGatewayTime); - } + if (object.associationsGatewayId != null) + message.associationsGatewayId = String(object.associationsGatewayId); + if (object.associationsDeviceId != null) + message.associationsDeviceId = String(object.associationsDeviceId); return message; }; /** - * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. + * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @static - * @param {google.cloud.iot.v1.GatewayConfig} message GatewayConfig + * @param {google.cloud.iot.v1.GatewayListOptions} message GatewayListOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GatewayConfig.toObject = function toObject(message, options) { + GatewayListOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.gatewayType = options.enums === String ? "GATEWAY_TYPE_UNSPECIFIED" : 0; - object.gatewayAuthMethod = options.enums === String ? "GATEWAY_AUTH_METHOD_UNSPECIFIED" : 0; - object.lastAccessedGatewayId = ""; - object.lastAccessedGatewayTime = null; - } - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) - object.lastAccessedGatewayId = message.lastAccessedGatewayId; - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) - object.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.toObject(message.lastAccessedGatewayTime, options); + if (options.oneofs) + object.filter = "gatewayType"; + } + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { + object.associationsGatewayId = message.associationsGatewayId; + if (options.oneofs) + object.filter = "associationsGatewayId"; + } + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { + object.associationsDeviceId = message.associationsDeviceId; + if (options.oneofs) + object.filter = "associationsDeviceId"; + } return object; }; /** - * Converts this GatewayConfig to JSON. + * Converts this GatewayListOptions to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.GatewayConfig + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance * @returns {Object.} JSON object */ - GatewayConfig.prototype.toJSON = function toJSON() { + GatewayListOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GatewayConfig; + return GatewayListOptions; })(); - v1.DeviceRegistry = (function() { + v1.ListDevicesResponse = (function() { /** - * Properties of a DeviceRegistry. + * Properties of a ListDevicesResponse. * @memberof google.cloud.iot.v1 - * @interface IDeviceRegistry - * @property {string|null} [id] DeviceRegistry id - * @property {string|null} [name] DeviceRegistry name - * @property {Array.|null} [eventNotificationConfigs] DeviceRegistry eventNotificationConfigs - * @property {google.cloud.iot.v1.IStateNotificationConfig|null} [stateNotificationConfig] DeviceRegistry stateNotificationConfig - * @property {google.cloud.iot.v1.IMqttConfig|null} [mqttConfig] DeviceRegistry mqttConfig - * @property {google.cloud.iot.v1.IHttpConfig|null} [httpConfig] DeviceRegistry httpConfig - * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] DeviceRegistry logLevel - * @property {Array.|null} [credentials] DeviceRegistry credentials + * @interface IListDevicesResponse + * @property {Array.|null} [devices] ListDevicesResponse devices + * @property {string|null} [nextPageToken] ListDevicesResponse nextPageToken */ /** - * Constructs a new DeviceRegistry. + * Constructs a new ListDevicesResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceRegistry. - * @implements IDeviceRegistry + * @classdesc Represents a ListDevicesResponse. + * @implements IListDevicesResponse * @constructor - * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set */ - function DeviceRegistry(properties) { - this.eventNotificationConfigs = []; - this.credentials = []; + function ListDevicesResponse(properties) { + this.devices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7015,172 +7614,91 @@ } /** - * DeviceRegistry id. - * @member {string} id - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance - */ - DeviceRegistry.prototype.id = ""; - - /** - * DeviceRegistry name. - * @member {string} name - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance - */ - DeviceRegistry.prototype.name = ""; - - /** - * DeviceRegistry eventNotificationConfigs. - * @member {Array.} eventNotificationConfigs - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance - */ - DeviceRegistry.prototype.eventNotificationConfigs = $util.emptyArray; - - /** - * DeviceRegistry stateNotificationConfig. - * @member {google.cloud.iot.v1.IStateNotificationConfig|null|undefined} stateNotificationConfig - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance - */ - DeviceRegistry.prototype.stateNotificationConfig = null; - - /** - * DeviceRegistry mqttConfig. - * @member {google.cloud.iot.v1.IMqttConfig|null|undefined} mqttConfig - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance - */ - DeviceRegistry.prototype.mqttConfig = null; - - /** - * DeviceRegistry httpConfig. - * @member {google.cloud.iot.v1.IHttpConfig|null|undefined} httpConfig - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance - */ - DeviceRegistry.prototype.httpConfig = null; - - /** - * DeviceRegistry logLevel. - * @member {google.cloud.iot.v1.LogLevel} logLevel - * @memberof google.cloud.iot.v1.DeviceRegistry + * ListDevicesResponse devices. + * @member {Array.} devices + * @memberof google.cloud.iot.v1.ListDevicesResponse * @instance */ - DeviceRegistry.prototype.logLevel = 0; + ListDevicesResponse.prototype.devices = $util.emptyArray; /** - * DeviceRegistry credentials. - * @member {Array.} credentials - * @memberof google.cloud.iot.v1.DeviceRegistry + * ListDevicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iot.v1.ListDevicesResponse * @instance */ - DeviceRegistry.prototype.credentials = $util.emptyArray; + ListDevicesResponse.prototype.nextPageToken = ""; /** - * Creates a new DeviceRegistry instance using the specified properties. + * Creates a new ListDevicesResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static - * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry instance + * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse instance */ - DeviceRegistry.create = function create(properties) { - return new DeviceRegistry(properties); + ListDevicesResponse.create = function create(properties) { + return new ListDevicesResponse(properties); }; /** - * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static - * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode + * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceRegistry.encode = function encode(message, writer) { + ListDevicesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) - $root.google.cloud.iot.v1.MqttConfig.encode(message.mqttConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) - $root.google.cloud.iot.v1.StateNotificationConfig.encode(message.stateNotificationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.credentials != null && message.credentials.length) - for (var i = 0; i < message.credentials.length; ++i) - $root.google.cloud.iot.v1.RegistryCredential.encode(message.credentials[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) - $root.google.cloud.iot.v1.HttpConfig.encode(message.httpConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.eventNotificationConfigs != null && message.eventNotificationConfigs.length) - for (var i = 0; i < message.eventNotificationConfigs.length; ++i) - $root.google.cloud.iot.v1.EventNotificationConfig.encode(message.eventNotificationConfigs[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logLevel); + if (message.devices != null && message.devices.length) + for (var i = 0; i < message.devices.length; ++i) + $root.google.cloud.iot.v1.Device.encode(message.devices[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 DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static - * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode + * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceRegistry.encodeDelimited = function encodeDelimited(message, writer) { + ListDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceRegistry message from the specified reader or buffer. + * Decodes a ListDevicesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceRegistry.decode = function decode(reader, length) { + ListDevicesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceRegistry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + if (!(message.devices && message.devices.length)) + message.devices = []; + message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); break; case 2: - message.name = reader.string(); - break; - case 10: - if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) - message.eventNotificationConfigs = []; - message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); - break; - case 7: - message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); - break; - case 4: - message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); - break; - case 9: - message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); - break; - case 11: - message.logLevel = reader.int32(); - break; - case 8: - if (!(message.credentials && message.credentials.length)) - message.credentials = []; - message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -7191,243 +7709,135 @@ }; /** - * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. + * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceRegistry.decodeDelimited = function decodeDelimited(reader) { + ListDevicesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceRegistry message. + * Verifies a ListDevicesResponse message. * @function verify - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeviceRegistry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.eventNotificationConfigs != null && message.hasOwnProperty("eventNotificationConfigs")) { - if (!Array.isArray(message.eventNotificationConfigs)) - return "eventNotificationConfigs: array expected"; - for (var i = 0; i < message.eventNotificationConfigs.length; ++i) { - var error = $root.google.cloud.iot.v1.EventNotificationConfig.verify(message.eventNotificationConfigs[i]); - if (error) - return "eventNotificationConfigs." + error; - } - } - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) { - var error = $root.google.cloud.iot.v1.StateNotificationConfig.verify(message.stateNotificationConfig); - if (error) - return "stateNotificationConfig." + error; - } - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) { - var error = $root.google.cloud.iot.v1.MqttConfig.verify(message.mqttConfig); - if (error) - return "mqttConfig." + error; - } - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) { - var error = $root.google.cloud.iot.v1.HttpConfig.verify(message.httpConfig); - if (error) - return "httpConfig." + error; - } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - switch (message.logLevel) { - default: - return "logLevel: enum value expected"; - case 0: - case 10: - case 20: - case 30: - case 40: - break; - } - if (message.credentials != null && message.hasOwnProperty("credentials")) { - if (!Array.isArray(message.credentials)) - return "credentials: array expected"; - for (var i = 0; i < message.credentials.length; ++i) { - var error = $root.google.cloud.iot.v1.RegistryCredential.verify(message.credentials[i]); + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDevicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.devices != null && message.hasOwnProperty("devices")) { + if (!Array.isArray(message.devices)) + return "devices: array expected"; + for (var i = 0; i < message.devices.length; ++i) { + var error = $root.google.cloud.iot.v1.Device.verify(message.devices[i]); if (error) - return "credentials." + error; + return "devices." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. + * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse */ - DeviceRegistry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceRegistry) + ListDevicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDevicesResponse) return object; - var message = new $root.google.cloud.iot.v1.DeviceRegistry(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.eventNotificationConfigs) { - if (!Array.isArray(object.eventNotificationConfigs)) - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: array expected"); - message.eventNotificationConfigs = []; - for (var i = 0; i < object.eventNotificationConfigs.length; ++i) { - if (typeof object.eventNotificationConfigs[i] !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: object expected"); - message.eventNotificationConfigs[i] = $root.google.cloud.iot.v1.EventNotificationConfig.fromObject(object.eventNotificationConfigs[i]); - } - } - if (object.stateNotificationConfig != null) { - if (typeof object.stateNotificationConfig !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.stateNotificationConfig: object expected"); - message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.fromObject(object.stateNotificationConfig); - } - if (object.mqttConfig != null) { - if (typeof object.mqttConfig !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.mqttConfig: object expected"); - message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.fromObject(object.mqttConfig); - } - if (object.httpConfig != null) { - if (typeof object.httpConfig !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.httpConfig: object expected"); - message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.fromObject(object.httpConfig); - } - switch (object.logLevel) { - case "LOG_LEVEL_UNSPECIFIED": - case 0: - message.logLevel = 0; - break; - case "NONE": - case 10: - message.logLevel = 10; - break; - case "ERROR": - case 20: - message.logLevel = 20; - break; - case "INFO": - case 30: - message.logLevel = 30; - break; - case "DEBUG": - case 40: - message.logLevel = 40; - break; - } - if (object.credentials) { - if (!Array.isArray(object.credentials)) - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: array expected"); - message.credentials = []; - for (var i = 0; i < object.credentials.length; ++i) { - if (typeof object.credentials[i] !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: object expected"); - message.credentials[i] = $root.google.cloud.iot.v1.RegistryCredential.fromObject(object.credentials[i]); + var message = new $root.google.cloud.iot.v1.ListDevicesResponse(); + if (object.devices) { + if (!Array.isArray(object.devices)) + throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: array expected"); + message.devices = []; + for (var i = 0; i < object.devices.length; ++i) { + if (typeof object.devices[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: object expected"); + message.devices[i] = $root.google.cloud.iot.v1.Device.fromObject(object.devices[i]); } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. + * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @static - * @param {google.cloud.iot.v1.DeviceRegistry} message DeviceRegistry + * @param {google.cloud.iot.v1.ListDevicesResponse} message ListDevicesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceRegistry.toObject = function toObject(message, options) { + ListDevicesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.credentials = []; - object.eventNotificationConfigs = []; - } - if (options.defaults) { - object.id = ""; - object.name = ""; - object.mqttConfig = null; - object.stateNotificationConfig = null; - object.httpConfig = null; - object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) - object.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.toObject(message.mqttConfig, options); - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) - object.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.toObject(message.stateNotificationConfig, options); - if (message.credentials && message.credentials.length) { - object.credentials = []; - for (var j = 0; j < message.credentials.length; ++j) - object.credentials[j] = $root.google.cloud.iot.v1.RegistryCredential.toObject(message.credentials[j], options); - } - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) - object.httpConfig = $root.google.cloud.iot.v1.HttpConfig.toObject(message.httpConfig, options); - if (message.eventNotificationConfigs && message.eventNotificationConfigs.length) { - object.eventNotificationConfigs = []; - for (var j = 0; j < message.eventNotificationConfigs.length; ++j) - object.eventNotificationConfigs[j] = $root.google.cloud.iot.v1.EventNotificationConfig.toObject(message.eventNotificationConfigs[j], options); + if (options.arrays || options.defaults) + object.devices = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.devices && message.devices.length) { + object.devices = []; + for (var j = 0; j < message.devices.length; ++j) + object.devices[j] = $root.google.cloud.iot.v1.Device.toObject(message.devices[j], options); } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeviceRegistry to JSON. + * Converts this ListDevicesResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeviceRegistry + * @memberof google.cloud.iot.v1.ListDevicesResponse * @instance * @returns {Object.} JSON object */ - DeviceRegistry.prototype.toJSON = function toJSON() { + ListDevicesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceRegistry; + return ListDevicesResponse; })(); - v1.MqttConfig = (function() { + v1.ModifyCloudToDeviceConfigRequest = (function() { /** - * Properties of a MqttConfig. + * Properties of a ModifyCloudToDeviceConfigRequest. * @memberof google.cloud.iot.v1 - * @interface IMqttConfig - * @property {google.cloud.iot.v1.MqttState|null} [mqttEnabledState] MqttConfig mqttEnabledState + * @interface IModifyCloudToDeviceConfigRequest + * @property {string|null} [name] ModifyCloudToDeviceConfigRequest name + * @property {number|Long|null} [versionToUpdate] ModifyCloudToDeviceConfigRequest versionToUpdate + * @property {Uint8Array|null} [binaryData] ModifyCloudToDeviceConfigRequest binaryData */ /** - * Constructs a new MqttConfig. + * Constructs a new ModifyCloudToDeviceConfigRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a MqttConfig. - * @implements IMqttConfig + * @classdesc Represents a ModifyCloudToDeviceConfigRequest. + * @implements IModifyCloudToDeviceConfigRequest * @constructor - * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set */ - function MqttConfig(properties) { + function ModifyCloudToDeviceConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7435,75 +7845,101 @@ } /** - * MqttConfig mqttEnabledState. - * @member {google.cloud.iot.v1.MqttState} mqttEnabledState - * @memberof google.cloud.iot.v1.MqttConfig + * ModifyCloudToDeviceConfigRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @instance */ - MqttConfig.prototype.mqttEnabledState = 0; + ModifyCloudToDeviceConfigRequest.prototype.name = ""; /** - * Creates a new MqttConfig instance using the specified properties. + * ModifyCloudToDeviceConfigRequest versionToUpdate. + * @member {number|Long} versionToUpdate + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance + */ + ModifyCloudToDeviceConfigRequest.prototype.versionToUpdate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ModifyCloudToDeviceConfigRequest binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance + */ + ModifyCloudToDeviceConfigRequest.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static - * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest instance */ - MqttConfig.create = function create(properties) { - return new MqttConfig(properties); + ModifyCloudToDeviceConfigRequest.create = function create(properties) { + return new ModifyCloudToDeviceConfigRequest(properties); }; /** - * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static - * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MqttConfig.encode = function encode(message, writer) { + ModifyCloudToDeviceConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mqttEnabledState); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.versionToUpdate); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.binaryData); return writer; }; /** - * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static - * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MqttConfig.encodeDelimited = function encodeDelimited(message, writer) { + ModifyCloudToDeviceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MqttConfig message from the specified reader or buffer. + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MqttConfig.decode = function decode(reader, length) { + ModifyCloudToDeviceConfigRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.MqttConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mqttEnabledState = reader.int32(); + message.name = reader.string(); + break; + case 2: + message.versionToUpdate = reader.int64(); + break; + case 3: + message.binaryData = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -7514,141 +7950,148 @@ }; /** - * Decodes a MqttConfig message from the specified reader or buffer, length delimited. + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MqttConfig.decodeDelimited = function decodeDelimited(reader) { + ModifyCloudToDeviceConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MqttConfig message. + * Verifies a ModifyCloudToDeviceConfigRequest message. * @function verify - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MqttConfig.verify = function verify(message) { + ModifyCloudToDeviceConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - switch (message.mqttEnabledState) { - default: - return "mqttEnabledState: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (!$util.isInteger(message.versionToUpdate) && !(message.versionToUpdate && $util.isInteger(message.versionToUpdate.low) && $util.isInteger(message.versionToUpdate.high))) + return "versionToUpdate: integer|Long expected"; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; return null; }; /** - * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest */ - MqttConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.MqttConfig) + ModifyCloudToDeviceConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest) return object; - var message = new $root.google.cloud.iot.v1.MqttConfig(); - switch (object.mqttEnabledState) { - case "MQTT_STATE_UNSPECIFIED": - case 0: - message.mqttEnabledState = 0; - break; - case "MQTT_ENABLED": - case 1: - message.mqttEnabledState = 1; - break; - case "MQTT_DISABLED": - case 2: - message.mqttEnabledState = 2; - break; - } + var message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.versionToUpdate != null) + if ($util.Long) + (message.versionToUpdate = $util.Long.fromValue(object.versionToUpdate)).unsigned = false; + else if (typeof object.versionToUpdate === "string") + message.versionToUpdate = parseInt(object.versionToUpdate, 10); + else if (typeof object.versionToUpdate === "number") + message.versionToUpdate = object.versionToUpdate; + else if (typeof object.versionToUpdate === "object") + message.versionToUpdate = new $util.LongBits(object.versionToUpdate.low >>> 0, object.versionToUpdate.high >>> 0).toNumber(); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; return message; }; /** - * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. + * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @static - * @param {google.cloud.iot.v1.MqttConfig} message MqttConfig + * @param {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MqttConfig.toObject = function toObject(message, options) { + ModifyCloudToDeviceConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.mqttEnabledState = options.enums === String ? "MQTT_STATE_UNSPECIFIED" : 0; - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionToUpdate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionToUpdate = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (typeof message.versionToUpdate === "number") + object.versionToUpdate = options.longs === String ? String(message.versionToUpdate) : message.versionToUpdate; + else + object.versionToUpdate = options.longs === String ? $util.Long.prototype.toString.call(message.versionToUpdate) : options.longs === Number ? new $util.LongBits(message.versionToUpdate.low >>> 0, message.versionToUpdate.high >>> 0).toNumber() : message.versionToUpdate; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; return object; }; /** - * Converts this MqttConfig to JSON. + * Converts this ModifyCloudToDeviceConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @instance * @returns {Object.} JSON object */ - MqttConfig.prototype.toJSON = function toJSON() { + ModifyCloudToDeviceConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MqttConfig; - })(); - - /** - * MqttState enum. - * @name google.cloud.iot.v1.MqttState - * @enum {string} - * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value - * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value - * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value - */ - v1.MqttState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MQTT_ENABLED"] = 1; - values[valuesById[2] = "MQTT_DISABLED"] = 2; - return values; + return ModifyCloudToDeviceConfigRequest; })(); - v1.HttpConfig = (function() { + v1.ListDeviceConfigVersionsRequest = (function() { /** - * Properties of a HttpConfig. + * Properties of a ListDeviceConfigVersionsRequest. * @memberof google.cloud.iot.v1 - * @interface IHttpConfig - * @property {google.cloud.iot.v1.HttpState|null} [httpEnabledState] HttpConfig httpEnabledState + * @interface IListDeviceConfigVersionsRequest + * @property {string|null} [name] ListDeviceConfigVersionsRequest name + * @property {number|null} [numVersions] ListDeviceConfigVersionsRequest numVersions */ /** - * Constructs a new HttpConfig. + * Constructs a new ListDeviceConfigVersionsRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a HttpConfig. - * @implements IHttpConfig + * @classdesc Represents a ListDeviceConfigVersionsRequest. + * @implements IListDeviceConfigVersionsRequest * @constructor - * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set */ - function HttpConfig(properties) { + function ListDeviceConfigVersionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7656,75 +8099,88 @@ } /** - * HttpConfig httpEnabledState. - * @member {google.cloud.iot.v1.HttpState} httpEnabledState - * @memberof google.cloud.iot.v1.HttpConfig + * ListDeviceConfigVersionsRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @instance */ - HttpConfig.prototype.httpEnabledState = 0; + ListDeviceConfigVersionsRequest.prototype.name = ""; /** - * Creates a new HttpConfig instance using the specified properties. + * ListDeviceConfigVersionsRequest numVersions. + * @member {number} numVersions + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @instance + */ + ListDeviceConfigVersionsRequest.prototype.numVersions = 0; + + /** + * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest instance */ - HttpConfig.create = function create(properties) { - return new HttpConfig(properties); + ListDeviceConfigVersionsRequest.create = function create(properties) { + return new ListDeviceConfigVersionsRequest(properties); }; /** - * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpConfig.encode = function encode(message, writer) { + ListDeviceConfigVersionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.httpEnabledState); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.numVersions != null && message.hasOwnProperty("numVersions")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numVersions); return writer; }; /** - * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceConfigVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpConfig message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpConfig.decode = function decode(reader, length) { + ListDeviceConfigVersionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.HttpConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.httpEnabledState = reader.int32(); + message.name = reader.string(); + break; + case 2: + message.numVersions = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7735,196 +8191,117 @@ }; /** - * Decodes a HttpConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpConfig.decodeDelimited = function decodeDelimited(reader) { + ListDeviceConfigVersionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpConfig message. + * Verifies a ListDeviceConfigVersionsRequest message. * @function verify - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpConfig.verify = function verify(message) { + ListDeviceConfigVersionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - switch (message.httpEnabledState) { - default: - return "httpEnabledState: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.numVersions != null && message.hasOwnProperty("numVersions")) + if (!$util.isInteger(message.numVersions)) + return "numVersions: integer expected"; return null; }; /** - * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig - */ - HttpConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.HttpConfig) + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + */ + ListDeviceConfigVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest) return object; - var message = new $root.google.cloud.iot.v1.HttpConfig(); - switch (object.httpEnabledState) { - case "HTTP_STATE_UNSPECIFIED": - case 0: - message.httpEnabledState = 0; - break; - case "HTTP_ENABLED": - case 1: - message.httpEnabledState = 1; - break; - case "HTTP_DISABLED": - case 2: - message.httpEnabledState = 2; - break; - } + var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.numVersions != null) + message.numVersions = object.numVersions | 0; return message; }; /** - * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.HttpConfig} message HttpConfig + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpConfig.toObject = function toObject(message, options) { + ListDeviceConfigVersionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.httpEnabledState = options.enums === String ? "HTTP_STATE_UNSPECIFIED" : 0; - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; + if (options.defaults) { + object.name = ""; + object.numVersions = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numVersions != null && message.hasOwnProperty("numVersions")) + object.numVersions = message.numVersions; return object; }; /** - * Converts this HttpConfig to JSON. + * Converts this ListDeviceConfigVersionsRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @instance * @returns {Object.} JSON object */ - HttpConfig.prototype.toJSON = function toJSON() { + ListDeviceConfigVersionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpConfig; - })(); - - /** - * HttpState enum. - * @name google.cloud.iot.v1.HttpState - * @enum {string} - * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value - * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value - * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value - */ - v1.HttpState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTP_ENABLED"] = 1; - values[valuesById[2] = "HTTP_DISABLED"] = 2; - return values; - })(); - - /** - * LogLevel enum. - * @name google.cloud.iot.v1.LogLevel - * @enum {string} - * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value - * @property {number} NONE=10 NONE value - * @property {number} ERROR=20 ERROR value - * @property {number} INFO=30 INFO value - * @property {number} DEBUG=40 DEBUG value - */ - v1.LogLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[10] = "NONE"] = 10; - values[valuesById[20] = "ERROR"] = 20; - values[valuesById[30] = "INFO"] = 30; - values[valuesById[40] = "DEBUG"] = 40; - return values; - })(); - - /** - * GatewayType enum. - * @name google.cloud.iot.v1.GatewayType - * @enum {string} - * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value - * @property {number} GATEWAY=1 GATEWAY value - * @property {number} NON_GATEWAY=2 NON_GATEWAY value - */ - v1.GatewayType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GATEWAY"] = 1; - values[valuesById[2] = "NON_GATEWAY"] = 2; - return values; - })(); - - /** - * GatewayAuthMethod enum. - * @name google.cloud.iot.v1.GatewayAuthMethod - * @enum {string} - * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value - * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value - * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value - * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value - */ - v1.GatewayAuthMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; - values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; - values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; - return values; + return ListDeviceConfigVersionsRequest; })(); - v1.EventNotificationConfig = (function() { + v1.ListDeviceConfigVersionsResponse = (function() { /** - * Properties of an EventNotificationConfig. + * Properties of a ListDeviceConfigVersionsResponse. * @memberof google.cloud.iot.v1 - * @interface IEventNotificationConfig - * @property {string|null} [subfolderMatches] EventNotificationConfig subfolderMatches - * @property {string|null} [pubsubTopicName] EventNotificationConfig pubsubTopicName + * @interface IListDeviceConfigVersionsResponse + * @property {Array.|null} [deviceConfigs] ListDeviceConfigVersionsResponse deviceConfigs */ /** - * Constructs a new EventNotificationConfig. + * Constructs a new ListDeviceConfigVersionsResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents an EventNotificationConfig. - * @implements IEventNotificationConfig + * @classdesc Represents a ListDeviceConfigVersionsResponse. + * @implements IListDeviceConfigVersionsResponse * @constructor - * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set */ - function EventNotificationConfig(properties) { + function ListDeviceConfigVersionsResponse(properties) { + this.deviceConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7932,88 +8309,78 @@ } /** - * EventNotificationConfig subfolderMatches. - * @member {string} subfolderMatches - * @memberof google.cloud.iot.v1.EventNotificationConfig - * @instance - */ - EventNotificationConfig.prototype.subfolderMatches = ""; - - /** - * EventNotificationConfig pubsubTopicName. - * @member {string} pubsubTopicName - * @memberof google.cloud.iot.v1.EventNotificationConfig + * ListDeviceConfigVersionsResponse deviceConfigs. + * @member {Array.} deviceConfigs + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @instance */ - EventNotificationConfig.prototype.pubsubTopicName = ""; + ListDeviceConfigVersionsResponse.prototype.deviceConfigs = $util.emptyArray; /** - * Creates a new EventNotificationConfig instance using the specified properties. + * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse instance */ - EventNotificationConfig.create = function create(properties) { - return new EventNotificationConfig(properties); + ListDeviceConfigVersionsResponse.create = function create(properties) { + return new ListDeviceConfigVersionsResponse(properties); }; /** - * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventNotificationConfig.encode = function encode(message, writer) { + ListDeviceConfigVersionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subfolderMatches); + if (message.deviceConfigs != null && message.deviceConfigs.length) + for (var i = 0; i < message.deviceConfigs.length; ++i) + $root.google.cloud.iot.v1.DeviceConfig.encode(message.deviceConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceConfigVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventNotificationConfig.decode = function decode(reader, length) { + ListDeviceConfigVersionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.EventNotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.subfolderMatches = reader.string(); - break; case 1: - message.pubsubTopicName = reader.string(); + if (!(message.deviceConfigs && message.deviceConfigs.length)) + message.deviceConfigs = []; + message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -8024,116 +8391,125 @@ }; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventNotificationConfig.decodeDelimited = function decodeDelimited(reader) { + ListDeviceConfigVersionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventNotificationConfig message. + * Verifies a ListDeviceConfigVersionsResponse message. * @function verify - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventNotificationConfig.verify = function verify(message) { + ListDeviceConfigVersionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) - if (!$util.isString(message.subfolderMatches)) - return "subfolderMatches: string expected"; - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - if (!$util.isString(message.pubsubTopicName)) - return "pubsubTopicName: string expected"; + if (message.deviceConfigs != null && message.hasOwnProperty("deviceConfigs")) { + if (!Array.isArray(message.deviceConfigs)) + return "deviceConfigs: array expected"; + for (var i = 0; i < message.deviceConfigs.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.deviceConfigs[i]); + if (error) + return "deviceConfigs." + error; + } + } return null; }; /** - * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse */ - EventNotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.EventNotificationConfig) + ListDeviceConfigVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse) return object; - var message = new $root.google.cloud.iot.v1.EventNotificationConfig(); - if (object.subfolderMatches != null) - message.subfolderMatches = String(object.subfolderMatches); - if (object.pubsubTopicName != null) - message.pubsubTopicName = String(object.pubsubTopicName); + var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); + if (object.deviceConfigs) { + if (!Array.isArray(object.deviceConfigs)) + throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: array expected"); + message.deviceConfigs = []; + for (var i = 0; i < object.deviceConfigs.length; ++i) { + if (typeof object.deviceConfigs[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: object expected"); + message.deviceConfigs[i] = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.deviceConfigs[i]); + } + } return message; }; /** - * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.EventNotificationConfig} message EventNotificationConfig + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventNotificationConfig.toObject = function toObject(message, options) { + ListDeviceConfigVersionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pubsubTopicName = ""; - object.subfolderMatches = ""; + if (options.arrays || options.defaults) + object.deviceConfigs = []; + if (message.deviceConfigs && message.deviceConfigs.length) { + object.deviceConfigs = []; + for (var j = 0; j < message.deviceConfigs.length; ++j) + object.deviceConfigs[j] = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.deviceConfigs[j], options); } - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - object.pubsubTopicName = message.pubsubTopicName; - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) - object.subfolderMatches = message.subfolderMatches; return object; }; /** - * Converts this EventNotificationConfig to JSON. + * Converts this ListDeviceConfigVersionsResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @instance * @returns {Object.} JSON object */ - EventNotificationConfig.prototype.toJSON = function toJSON() { + ListDeviceConfigVersionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EventNotificationConfig; + return ListDeviceConfigVersionsResponse; })(); - v1.StateNotificationConfig = (function() { + v1.ListDeviceStatesRequest = (function() { /** - * Properties of a StateNotificationConfig. + * Properties of a ListDeviceStatesRequest. * @memberof google.cloud.iot.v1 - * @interface IStateNotificationConfig - * @property {string|null} [pubsubTopicName] StateNotificationConfig pubsubTopicName + * @interface IListDeviceStatesRequest + * @property {string|null} [name] ListDeviceStatesRequest name + * @property {number|null} [numStates] ListDeviceStatesRequest numStates */ /** - * Constructs a new StateNotificationConfig. + * Constructs a new ListDeviceStatesRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a StateNotificationConfig. - * @implements IStateNotificationConfig + * @classdesc Represents a ListDeviceStatesRequest. + * @implements IListDeviceStatesRequest * @constructor - * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set */ - function StateNotificationConfig(properties) { + function ListDeviceStatesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8141,75 +8517,88 @@ } /** - * StateNotificationConfig pubsubTopicName. - * @member {string} pubsubTopicName - * @memberof google.cloud.iot.v1.StateNotificationConfig + * ListDeviceStatesRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @instance */ - StateNotificationConfig.prototype.pubsubTopicName = ""; + ListDeviceStatesRequest.prototype.name = ""; /** - * Creates a new StateNotificationConfig instance using the specified properties. + * ListDeviceStatesRequest numStates. + * @member {number} numStates + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @instance + */ + ListDeviceStatesRequest.prototype.numStates = 0; + + /** + * Creates a new ListDeviceStatesRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest instance */ - StateNotificationConfig.create = function create(properties) { - return new StateNotificationConfig(properties); + ListDeviceStatesRequest.create = function create(properties) { + return new ListDeviceStatesRequest(properties); }; /** - * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StateNotificationConfig.encode = function encode(message, writer) { + ListDeviceStatesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.numStates != null && message.hasOwnProperty("numStates")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numStates); return writer; }; /** - * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StateNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StateNotificationConfig.decode = function decode(reader, length) { + ListDeviceStatesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.StateNotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pubsubTopicName = reader.string(); + message.name = reader.string(); + break; + case 2: + message.numStates = reader.int32(); break; default: reader.skipType(tag & 7); @@ -8220,107 +8609,117 @@ }; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StateNotificationConfig.decodeDelimited = function decodeDelimited(reader) { + ListDeviceStatesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StateNotificationConfig message. + * Verifies a ListDeviceStatesRequest message. * @function verify - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StateNotificationConfig.verify = function verify(message) { + ListDeviceStatesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - if (!$util.isString(message.pubsubTopicName)) - return "pubsubTopicName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.numStates != null && message.hasOwnProperty("numStates")) + if (!$util.isInteger(message.numStates)) + return "numStates: integer expected"; return null; }; /** - * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest */ - StateNotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.StateNotificationConfig) + ListDeviceStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesRequest) return object; - var message = new $root.google.cloud.iot.v1.StateNotificationConfig(); - if (object.pubsubTopicName != null) - message.pubsubTopicName = String(object.pubsubTopicName); + var message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.numStates != null) + message.numStates = object.numStates | 0; return message; }; /** - * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.StateNotificationConfig} message StateNotificationConfig + * @param {google.cloud.iot.v1.ListDeviceStatesRequest} message ListDeviceStatesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StateNotificationConfig.toObject = function toObject(message, options) { + ListDeviceStatesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.pubsubTopicName = ""; - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - object.pubsubTopicName = message.pubsubTopicName; + if (options.defaults) { + object.name = ""; + object.numStates = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numStates != null && message.hasOwnProperty("numStates")) + object.numStates = message.numStates; return object; }; /** - * Converts this StateNotificationConfig to JSON. + * Converts this ListDeviceStatesRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @instance * @returns {Object.} JSON object */ - StateNotificationConfig.prototype.toJSON = function toJSON() { + ListDeviceStatesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StateNotificationConfig; + return ListDeviceStatesRequest; })(); - v1.RegistryCredential = (function() { + v1.ListDeviceStatesResponse = (function() { /** - * Properties of a RegistryCredential. + * Properties of a ListDeviceStatesResponse. * @memberof google.cloud.iot.v1 - * @interface IRegistryCredential - * @property {google.cloud.iot.v1.IPublicKeyCertificate|null} [publicKeyCertificate] RegistryCredential publicKeyCertificate + * @interface IListDeviceStatesResponse + * @property {Array.|null} [deviceStates] ListDeviceStatesResponse deviceStates */ /** - * Constructs a new RegistryCredential. + * Constructs a new ListDeviceStatesResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a RegistryCredential. - * @implements IRegistryCredential + * @classdesc Represents a ListDeviceStatesResponse. + * @implements IListDeviceStatesResponse * @constructor - * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set */ - function RegistryCredential(properties) { + function ListDeviceStatesResponse(properties) { + this.deviceStates = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8328,89 +8727,78 @@ } /** - * RegistryCredential publicKeyCertificate. - * @member {google.cloud.iot.v1.IPublicKeyCertificate|null|undefined} publicKeyCertificate - * @memberof google.cloud.iot.v1.RegistryCredential - * @instance - */ - RegistryCredential.prototype.publicKeyCertificate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RegistryCredential credential. - * @member {"publicKeyCertificate"|undefined} credential - * @memberof google.cloud.iot.v1.RegistryCredential + * ListDeviceStatesResponse deviceStates. + * @member {Array.} deviceStates + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @instance */ - Object.defineProperty(RegistryCredential.prototype, "credential", { - get: $util.oneOfGetter($oneOfFields = ["publicKeyCertificate"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListDeviceStatesResponse.prototype.deviceStates = $util.emptyArray; /** - * Creates a new RegistryCredential instance using the specified properties. + * Creates a new ListDeviceStatesResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential instance + * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse instance */ - RegistryCredential.create = function create(properties) { - return new RegistryCredential(properties); + ListDeviceStatesResponse.create = function create(properties) { + return new ListDeviceStatesResponse(properties); }; /** - * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegistryCredential.encode = function encode(message, writer) { + ListDeviceStatesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) - $root.google.cloud.iot.v1.PublicKeyCertificate.encode(message.publicKeyCertificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceStates != null && message.deviceStates.length) + for (var i = 0; i < message.deviceStates.length; ++i) + $root.google.cloud.iot.v1.DeviceState.encode(message.deviceStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegistryCredential.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RegistryCredential message from the specified reader or buffer. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegistryCredential.decode = function decode(reader, length) { + ListDeviceStatesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.RegistryCredential(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); + if (!(message.deviceStates && message.deviceStates.length)) + message.deviceStates = []; + message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -8421,122 +8809,126 @@ }; /** - * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegistryCredential.decodeDelimited = function decodeDelimited(reader) { + ListDeviceStatesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RegistryCredential message. + * Verifies a ListDeviceStatesResponse message. * @function verify - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RegistryCredential.verify = function verify(message) { + ListDeviceStatesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { - properties.credential = 1; - { - var error = $root.google.cloud.iot.v1.PublicKeyCertificate.verify(message.publicKeyCertificate); + if (message.deviceStates != null && message.hasOwnProperty("deviceStates")) { + if (!Array.isArray(message.deviceStates)) + return "deviceStates: array expected"; + for (var i = 0; i < message.deviceStates.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceState.verify(message.deviceStates[i]); if (error) - return "publicKeyCertificate." + error; + return "deviceStates." + error; } } return null; }; /** - * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse */ - RegistryCredential.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.RegistryCredential) + ListDeviceStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesResponse) return object; - var message = new $root.google.cloud.iot.v1.RegistryCredential(); - if (object.publicKeyCertificate != null) { - if (typeof object.publicKeyCertificate !== "object") - throw TypeError(".google.cloud.iot.v1.RegistryCredential.publicKeyCertificate: object expected"); - message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.fromObject(object.publicKeyCertificate); + var message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); + if (object.deviceStates) { + if (!Array.isArray(object.deviceStates)) + throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: array expected"); + message.deviceStates = []; + for (var i = 0; i < object.deviceStates.length; ++i) { + if (typeof object.deviceStates[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: object expected"); + message.deviceStates[i] = $root.google.cloud.iot.v1.DeviceState.fromObject(object.deviceStates[i]); + } } return message; }; /** - * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.RegistryCredential} message RegistryCredential + * @param {google.cloud.iot.v1.ListDeviceStatesResponse} message ListDeviceStatesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RegistryCredential.toObject = function toObject(message, options) { + ListDeviceStatesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { - object.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.toObject(message.publicKeyCertificate, options); - if (options.oneofs) - object.credential = "publicKeyCertificate"; + if (options.arrays || options.defaults) + object.deviceStates = []; + if (message.deviceStates && message.deviceStates.length) { + object.deviceStates = []; + for (var j = 0; j < message.deviceStates.length; ++j) + object.deviceStates[j] = $root.google.cloud.iot.v1.DeviceState.toObject(message.deviceStates[j], options); } return object; }; /** - * Converts this RegistryCredential to JSON. + * Converts this ListDeviceStatesResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @instance * @returns {Object.} JSON object */ - RegistryCredential.prototype.toJSON = function toJSON() { + ListDeviceStatesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RegistryCredential; + return ListDeviceStatesResponse; })(); - v1.X509CertificateDetails = (function() { + v1.SendCommandToDeviceRequest = (function() { /** - * Properties of a X509CertificateDetails. + * Properties of a SendCommandToDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IX509CertificateDetails - * @property {string|null} [issuer] X509CertificateDetails issuer - * @property {string|null} [subject] X509CertificateDetails subject - * @property {google.protobuf.ITimestamp|null} [startTime] X509CertificateDetails startTime - * @property {google.protobuf.ITimestamp|null} [expiryTime] X509CertificateDetails expiryTime - * @property {string|null} [signatureAlgorithm] X509CertificateDetails signatureAlgorithm - * @property {string|null} [publicKeyType] X509CertificateDetails publicKeyType + * @interface ISendCommandToDeviceRequest + * @property {string|null} [name] SendCommandToDeviceRequest name + * @property {Uint8Array|null} [binaryData] SendCommandToDeviceRequest binaryData + * @property {string|null} [subfolder] SendCommandToDeviceRequest subfolder */ /** - * Constructs a new X509CertificateDetails. + * Constructs a new SendCommandToDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a X509CertificateDetails. - * @implements IX509CertificateDetails + * @classdesc Represents a SendCommandToDeviceRequest. + * @implements ISendCommandToDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set */ - function X509CertificateDetails(properties) { + function SendCommandToDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8544,140 +8936,101 @@ } /** - * X509CertificateDetails issuer. - * @member {string} issuer - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.issuer = ""; - - /** - * X509CertificateDetails subject. - * @member {string} subject - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.subject = ""; - - /** - * X509CertificateDetails startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.startTime = null; - - /** - * X509CertificateDetails expiryTime. - * @member {google.protobuf.ITimestamp|null|undefined} expiryTime - * @memberof google.cloud.iot.v1.X509CertificateDetails + * SendCommandToDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance */ - X509CertificateDetails.prototype.expiryTime = null; + SendCommandToDeviceRequest.prototype.name = ""; /** - * X509CertificateDetails signatureAlgorithm. - * @member {string} signatureAlgorithm - * @memberof google.cloud.iot.v1.X509CertificateDetails + * SendCommandToDeviceRequest binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance */ - X509CertificateDetails.prototype.signatureAlgorithm = ""; + SendCommandToDeviceRequest.prototype.binaryData = $util.newBuffer([]); /** - * X509CertificateDetails publicKeyType. - * @member {string} publicKeyType - * @memberof google.cloud.iot.v1.X509CertificateDetails + * SendCommandToDeviceRequest subfolder. + * @member {string} subfolder + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance */ - X509CertificateDetails.prototype.publicKeyType = ""; + SendCommandToDeviceRequest.prototype.subfolder = ""; /** - * Creates a new X509CertificateDetails instance using the specified properties. + * Creates a new SendCommandToDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest instance */ - X509CertificateDetails.create = function create(properties) { - return new X509CertificateDetails(properties); + SendCommandToDeviceRequest.create = function create(properties) { + return new SendCommandToDeviceRequest(properties); }; /** - * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - X509CertificateDetails.encode = function encode(message, writer) { + SendCommandToDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issuer != null && message.hasOwnProperty("issuer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); - if (message.subject != null && message.hasOwnProperty("subject")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) - $root.google.protobuf.Timestamp.encode(message.expiryTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signatureAlgorithm); - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.publicKeyType); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subfolder); return writer; }; /** - * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - X509CertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { + SendCommandToDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - X509CertificateDetails.decode = function decode(reader, length) { + SendCommandToDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.X509CertificateDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.issuer = reader.string(); + message.name = reader.string(); break; case 2: - message.subject = reader.string(); + message.binaryData = reader.bytes(); break; case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.signatureAlgorithm = reader.string(); - break; - case 6: - message.publicKeyType = reader.string(); + message.subfolder = reader.string(); break; default: reader.skipType(tag & 7); @@ -8688,160 +9041,132 @@ }; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - X509CertificateDetails.decodeDelimited = function decodeDelimited(reader) { + SendCommandToDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a X509CertificateDetails message. + * Verifies a SendCommandToDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - X509CertificateDetails.verify = function verify(message) { + SendCommandToDeviceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.subject != null && message.hasOwnProperty("subject")) - if (!$util.isString(message.subject)) - return "subject: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expiryTime); - if (error) - return "expiryTime." + error; - } - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - if (!$util.isString(message.signatureAlgorithm)) - return "signatureAlgorithm: string expected"; - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) - if (!$util.isString(message.publicKeyType)) - return "publicKeyType: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + if (!$util.isString(message.subfolder)) + return "subfolder: string expected"; return null; }; /** - * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest */ - X509CertificateDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.X509CertificateDetails) + SendCommandToDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.X509CertificateDetails(); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.subject != null) - message.subject = String(object.subject); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.expiryTime != null) { - if (typeof object.expiryTime !== "object") - throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.expiryTime: object expected"); - message.expiryTime = $root.google.protobuf.Timestamp.fromObject(object.expiryTime); - } - if (object.signatureAlgorithm != null) - message.signatureAlgorithm = String(object.signatureAlgorithm); - if (object.publicKeyType != null) - message.publicKeyType = String(object.publicKeyType); + var message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + if (object.subfolder != null) + message.subfolder = String(object.subfolder); return message; }; /** - * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. + * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.X509CertificateDetails} message X509CertificateDetails + * @param {google.cloud.iot.v1.SendCommandToDeviceRequest} message SendCommandToDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - X509CertificateDetails.toObject = function toObject(message, options) { + SendCommandToDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.issuer = ""; - object.subject = ""; - object.startTime = null; - object.expiryTime = null; - object.signatureAlgorithm = ""; - object.publicKeyType = ""; + object.name = ""; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + object.subfolder = ""; } - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.subject != null && message.hasOwnProperty("subject")) - object.subject = message.subject; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) - object.expiryTime = $root.google.protobuf.Timestamp.toObject(message.expiryTime, options); - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - object.signatureAlgorithm = message.signatureAlgorithm; - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) - object.publicKeyType = message.publicKeyType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + object.subfolder = message.subfolder; return object; }; /** - * Converts this X509CertificateDetails to JSON. + * Converts this SendCommandToDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance * @returns {Object.} JSON object */ - X509CertificateDetails.prototype.toJSON = function toJSON() { + SendCommandToDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return X509CertificateDetails; + return SendCommandToDeviceRequest; })(); - v1.PublicKeyCertificate = (function() { + v1.SendCommandToDeviceResponse = (function() { /** - * Properties of a PublicKeyCertificate. + * Properties of a SendCommandToDeviceResponse. * @memberof google.cloud.iot.v1 - * @interface IPublicKeyCertificate - * @property {google.cloud.iot.v1.PublicKeyCertificateFormat|null} [format] PublicKeyCertificate format - * @property {string|null} [certificate] PublicKeyCertificate certificate - * @property {google.cloud.iot.v1.IX509CertificateDetails|null} [x509Details] PublicKeyCertificate x509Details + * @interface ISendCommandToDeviceResponse */ /** - * Constructs a new PublicKeyCertificate. + * Constructs a new SendCommandToDeviceResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a PublicKeyCertificate. - * @implements IPublicKeyCertificate + * @classdesc Represents a SendCommandToDeviceResponse. + * @implements ISendCommandToDeviceResponse * @constructor - * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set */ - function PublicKeyCertificate(properties) { + function SendCommandToDeviceResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8849,102 +9174,63 @@ } /** - * PublicKeyCertificate format. - * @member {google.cloud.iot.v1.PublicKeyCertificateFormat} format - * @memberof google.cloud.iot.v1.PublicKeyCertificate - * @instance - */ - PublicKeyCertificate.prototype.format = 0; - - /** - * PublicKeyCertificate certificate. - * @member {string} certificate - * @memberof google.cloud.iot.v1.PublicKeyCertificate - * @instance - */ - PublicKeyCertificate.prototype.certificate = ""; - - /** - * PublicKeyCertificate x509Details. - * @member {google.cloud.iot.v1.IX509CertificateDetails|null|undefined} x509Details - * @memberof google.cloud.iot.v1.PublicKeyCertificate - * @instance - */ - PublicKeyCertificate.prototype.x509Details = null; - - /** - * Creates a new PublicKeyCertificate instance using the specified properties. + * Creates a new SendCommandToDeviceResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse instance */ - PublicKeyCertificate.create = function create(properties) { - return new PublicKeyCertificate(properties); + SendCommandToDeviceResponse.create = function create(properties) { + return new SendCommandToDeviceResponse(properties); }; /** - * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCertificate.encode = function encode(message, writer) { + SendCommandToDeviceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && message.hasOwnProperty("format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.certificate != null && message.hasOwnProperty("certificate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificate); - if (message.x509Details != null && message.hasOwnProperty("x509Details")) - $root.google.cloud.iot.v1.X509CertificateDetails.encode(message.x509Details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCertificate.encodeDelimited = function encodeDelimited(message, writer) { + SendCommandToDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCertificate.decode = function decode(reader, length) { + SendCommandToDeviceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; - case 2: - message.certificate = reader.string(); - break; - case 3: - message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -8954,157 +9240,96 @@ }; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCertificate.decodeDelimited = function decodeDelimited(reader) { + SendCommandToDeviceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PublicKeyCertificate message. + * Verifies a SendCommandToDeviceResponse message. * @function verify - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PublicKeyCertificate.verify = function verify(message) { + SendCommandToDeviceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - break; - } - if (message.certificate != null && message.hasOwnProperty("certificate")) - if (!$util.isString(message.certificate)) - return "certificate: string expected"; - if (message.x509Details != null && message.hasOwnProperty("x509Details")) { - var error = $root.google.cloud.iot.v1.X509CertificateDetails.verify(message.x509Details); - if (error) - return "x509Details." + error; - } return null; }; /** - * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse */ - PublicKeyCertificate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.PublicKeyCertificate) + SendCommandToDeviceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceResponse) return object; - var message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); - switch (object.format) { - case "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": - case 0: - message.format = 0; - break; - case "X509_CERTIFICATE_PEM": - case 1: - message.format = 1; - break; - } - if (object.certificate != null) - message.certificate = String(object.certificate); - if (object.x509Details != null) { - if (typeof object.x509Details !== "object") - throw TypeError(".google.cloud.iot.v1.PublicKeyCertificate.x509Details: object expected"); - message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.fromObject(object.x509Details); - } - return message; + return new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); }; /** - * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. + * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.PublicKeyCertificate} message PublicKeyCertificate + * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} message SendCommandToDeviceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PublicKeyCertificate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT" : 0; - object.certificate = ""; - object.x509Details = null; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; - if (message.certificate != null && message.hasOwnProperty("certificate")) - object.certificate = message.certificate; - if (message.x509Details != null && message.hasOwnProperty("x509Details")) - object.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.toObject(message.x509Details, options); - return object; + SendCommandToDeviceResponse.toObject = function toObject() { + return {}; }; /** - * Converts this PublicKeyCertificate to JSON. + * Converts this SendCommandToDeviceResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @instance * @returns {Object.} JSON object */ - PublicKeyCertificate.prototype.toJSON = function toJSON() { + SendCommandToDeviceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PublicKeyCertificate; - })(); - - /** - * PublicKeyCertificateFormat enum. - * @name google.cloud.iot.v1.PublicKeyCertificateFormat - * @enum {string} - * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value - * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value - */ - v1.PublicKeyCertificateFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; - values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; - return values; + return SendCommandToDeviceResponse; })(); - v1.DeviceCredential = (function() { + v1.BindDeviceToGatewayRequest = (function() { /** - * Properties of a DeviceCredential. + * Properties of a BindDeviceToGatewayRequest. * @memberof google.cloud.iot.v1 - * @interface IDeviceCredential - * @property {google.cloud.iot.v1.IPublicKeyCredential|null} [publicKey] DeviceCredential publicKey - * @property {google.protobuf.ITimestamp|null} [expirationTime] DeviceCredential expirationTime + * @interface IBindDeviceToGatewayRequest + * @property {string|null} [parent] BindDeviceToGatewayRequest parent + * @property {string|null} [gatewayId] BindDeviceToGatewayRequest gatewayId + * @property {string|null} [deviceId] BindDeviceToGatewayRequest deviceId */ /** - * Constructs a new DeviceCredential. + * Constructs a new BindDeviceToGatewayRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceCredential. - * @implements IDeviceCredential + * @classdesc Represents a BindDeviceToGatewayRequest. + * @implements IBindDeviceToGatewayRequest * @constructor - * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set */ - function DeviceCredential(properties) { + function BindDeviceToGatewayRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9112,102 +9337,101 @@ } /** - * DeviceCredential publicKey. - * @member {google.cloud.iot.v1.IPublicKeyCredential|null|undefined} publicKey - * @memberof google.cloud.iot.v1.DeviceCredential + * BindDeviceToGatewayRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance */ - DeviceCredential.prototype.publicKey = null; + BindDeviceToGatewayRequest.prototype.parent = ""; /** - * DeviceCredential expirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} expirationTime - * @memberof google.cloud.iot.v1.DeviceCredential + * BindDeviceToGatewayRequest gatewayId. + * @member {string} gatewayId + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance */ - DeviceCredential.prototype.expirationTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BindDeviceToGatewayRequest.prototype.gatewayId = ""; /** - * DeviceCredential credential. - * @member {"publicKey"|undefined} credential - * @memberof google.cloud.iot.v1.DeviceCredential + * BindDeviceToGatewayRequest deviceId. + * @member {string} deviceId + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance */ - Object.defineProperty(DeviceCredential.prototype, "credential", { - get: $util.oneOfGetter($oneOfFields = ["publicKey"]), - set: $util.oneOfSetter($oneOfFields) - }); + BindDeviceToGatewayRequest.prototype.deviceId = ""; /** - * Creates a new DeviceCredential instance using the specified properties. + * Creates a new BindDeviceToGatewayRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest instance */ - DeviceCredential.create = function create(properties) { - return new DeviceCredential(properties); + BindDeviceToGatewayRequest.create = function create(properties) { + return new BindDeviceToGatewayRequest(properties); }; /** - * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCredential.encode = function encode(message, writer) { + BindDeviceToGatewayRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - $root.google.cloud.iot.v1.PublicKeyCredential.encode(message.publicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) - $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); return writer; }; /** - * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCredential.encodeDelimited = function encodeDelimited(message, writer) { + BindDeviceToGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceCredential message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCredential.decode = function decode(reader, length) { + BindDeviceToGatewayRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceCredential(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; case 2: - message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); + message.gatewayId = reader.string(); break; - case 6: - message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: + message.deviceId = reader.string(); break; default: reader.skipType(tag & 7); @@ -9218,132 +9442,123 @@ }; /** - * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCredential.decodeDelimited = function decodeDelimited(reader) { + BindDeviceToGatewayRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceCredential message. + * Verifies a BindDeviceToGatewayRequest message. * @function verify - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceCredential.verify = function verify(message) { + BindDeviceToGatewayRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - properties.credential = 1; - { - var error = $root.google.cloud.iot.v1.PublicKeyCredential.verify(message.publicKey); - if (error) - return "publicKey." + error; - } - } - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); - if (error) - return "expirationTime." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (!$util.isString(message.gatewayId)) + return "gatewayId: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; return null; }; /** - * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest */ - DeviceCredential.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceCredential) + BindDeviceToGatewayRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayRequest) return object; - var message = new $root.google.cloud.iot.v1.DeviceCredential(); - if (object.publicKey != null) { - if (typeof object.publicKey !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceCredential.publicKey: object expected"); - message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.fromObject(object.publicKey); - } - if (object.expirationTime != null) { - if (typeof object.expirationTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceCredential.expirationTime: object expected"); - message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); - } + var message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gatewayId != null) + message.gatewayId = String(object.gatewayId); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); return message; }; /** - * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. + * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.DeviceCredential} message DeviceCredential + * @param {google.cloud.iot.v1.BindDeviceToGatewayRequest} message BindDeviceToGatewayRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - DeviceCredential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.expirationTime = null; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - object.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.toObject(message.publicKey, options); - if (options.oneofs) - object.credential = "publicKey"; + */ + BindDeviceToGatewayRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.gatewayId = ""; + object.deviceId = ""; } - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) - object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + object.gatewayId = message.gatewayId; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; return object; }; /** - * Converts this DeviceCredential to JSON. + * Converts this BindDeviceToGatewayRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance * @returns {Object.} JSON object */ - DeviceCredential.prototype.toJSON = function toJSON() { + BindDeviceToGatewayRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceCredential; + return BindDeviceToGatewayRequest; })(); - v1.PublicKeyCredential = (function() { + v1.BindDeviceToGatewayResponse = (function() { /** - * Properties of a PublicKeyCredential. + * Properties of a BindDeviceToGatewayResponse. * @memberof google.cloud.iot.v1 - * @interface IPublicKeyCredential - * @property {google.cloud.iot.v1.PublicKeyFormat|null} [format] PublicKeyCredential format - * @property {string|null} [key] PublicKeyCredential key + * @interface IBindDeviceToGatewayResponse */ /** - * Constructs a new PublicKeyCredential. + * Constructs a new BindDeviceToGatewayResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a PublicKeyCredential. - * @implements IPublicKeyCredential + * @classdesc Represents a BindDeviceToGatewayResponse. + * @implements IBindDeviceToGatewayResponse * @constructor - * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set */ - function PublicKeyCredential(properties) { + function BindDeviceToGatewayResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9351,89 +9566,63 @@ } /** - * PublicKeyCredential format. - * @member {google.cloud.iot.v1.PublicKeyFormat} format - * @memberof google.cloud.iot.v1.PublicKeyCredential - * @instance - */ - PublicKeyCredential.prototype.format = 0; - - /** - * PublicKeyCredential key. - * @member {string} key - * @memberof google.cloud.iot.v1.PublicKeyCredential - * @instance - */ - PublicKeyCredential.prototype.key = ""; - - /** - * Creates a new PublicKeyCredential instance using the specified properties. + * Creates a new BindDeviceToGatewayResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse instance */ - PublicKeyCredential.create = function create(properties) { - return new PublicKeyCredential(properties); + BindDeviceToGatewayResponse.create = function create(properties) { + return new BindDeviceToGatewayResponse(properties); }; /** - * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCredential.encode = function encode(message, writer) { + BindDeviceToGatewayResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && message.hasOwnProperty("format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.key != null && message.hasOwnProperty("key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); return writer; }; /** - * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCredential.encodeDelimited = function encodeDelimited(message, writer) { + BindDeviceToGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCredential.decode = function decode(reader, length) { + BindDeviceToGatewayResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCredential(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; - case 2: - message.key = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -9443,282 +9632,198 @@ }; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCredential.decodeDelimited = function decodeDelimited(reader) { + BindDeviceToGatewayResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PublicKeyCredential message. + * Verifies a BindDeviceToGatewayResponse message. * @function verify - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PublicKeyCredential.verify = function verify(message) { + BindDeviceToGatewayResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 3: - case 1: - case 2: - case 4: - break; - } - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; return null; }; /** - * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse */ - PublicKeyCredential.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.PublicKeyCredential) + BindDeviceToGatewayResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayResponse) return object; - var message = new $root.google.cloud.iot.v1.PublicKeyCredential(); - switch (object.format) { - case "UNSPECIFIED_PUBLIC_KEY_FORMAT": - case 0: - message.format = 0; - break; - case "RSA_PEM": - case 3: - message.format = 3; - break; - case "RSA_X509_PEM": - case 1: - message.format = 1; - break; - case "ES256_PEM": - case 2: - message.format = 2; - break; - case "ES256_X509_PEM": - case 4: - message.format = 4; - break; - } - if (object.key != null) - message.key = String(object.key); - return message; + return new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); }; /** - * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. + * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.PublicKeyCredential} message PublicKeyCredential + * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} message BindDeviceToGatewayResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PublicKeyCredential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_FORMAT" : 0; - object.key = ""; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - return object; + BindDeviceToGatewayResponse.toObject = function toObject() { + return {}; }; /** - * Converts this PublicKeyCredential to JSON. + * Converts this BindDeviceToGatewayResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @instance * @returns {Object.} JSON object */ - PublicKeyCredential.prototype.toJSON = function toJSON() { + BindDeviceToGatewayResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PublicKeyCredential; - })(); - - /** - * PublicKeyFormat enum. - * @name google.cloud.iot.v1.PublicKeyFormat - * @enum {string} - * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value - * @property {number} RSA_PEM=3 RSA_PEM value - * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value - * @property {number} ES256_PEM=2 ES256_PEM value - * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value - */ - v1.PublicKeyFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; - values[valuesById[3] = "RSA_PEM"] = 3; - values[valuesById[1] = "RSA_X509_PEM"] = 1; - values[valuesById[2] = "ES256_PEM"] = 2; - values[valuesById[4] = "ES256_X509_PEM"] = 4; - return values; + return BindDeviceToGatewayResponse; })(); - v1.DeviceConfig = (function() { + v1.UnbindDeviceFromGatewayRequest = (function() { /** - * Properties of a DeviceConfig. + * Properties of an UnbindDeviceFromGatewayRequest. * @memberof google.cloud.iot.v1 - * @interface IDeviceConfig - * @property {number|Long|null} [version] DeviceConfig version - * @property {google.protobuf.ITimestamp|null} [cloudUpdateTime] DeviceConfig cloudUpdateTime - * @property {google.protobuf.ITimestamp|null} [deviceAckTime] DeviceConfig deviceAckTime - * @property {Uint8Array|null} [binaryData] DeviceConfig binaryData + * @interface IUnbindDeviceFromGatewayRequest + * @property {string|null} [parent] UnbindDeviceFromGatewayRequest parent + * @property {string|null} [gatewayId] UnbindDeviceFromGatewayRequest gatewayId + * @property {string|null} [deviceId] UnbindDeviceFromGatewayRequest deviceId */ /** - * Constructs a new DeviceConfig. + * Constructs a new UnbindDeviceFromGatewayRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceConfig. - * @implements IDeviceConfig + * @classdesc Represents an UnbindDeviceFromGatewayRequest. + * @implements IUnbindDeviceFromGatewayRequest * @constructor - * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set */ - function DeviceConfig(properties) { + function UnbindDeviceFromGatewayRequest(properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeviceConfig version. - * @member {number|Long} version - * @memberof google.cloud.iot.v1.DeviceConfig - * @instance - */ - DeviceConfig.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * DeviceConfig cloudUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} cloudUpdateTime - * @memberof google.cloud.iot.v1.DeviceConfig + * UnbindDeviceFromGatewayRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance */ - DeviceConfig.prototype.cloudUpdateTime = null; + UnbindDeviceFromGatewayRequest.prototype.parent = ""; /** - * DeviceConfig deviceAckTime. - * @member {google.protobuf.ITimestamp|null|undefined} deviceAckTime - * @memberof google.cloud.iot.v1.DeviceConfig + * UnbindDeviceFromGatewayRequest gatewayId. + * @member {string} gatewayId + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance */ - DeviceConfig.prototype.deviceAckTime = null; + UnbindDeviceFromGatewayRequest.prototype.gatewayId = ""; /** - * DeviceConfig binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.DeviceConfig + * UnbindDeviceFromGatewayRequest deviceId. + * @member {string} deviceId + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance */ - DeviceConfig.prototype.binaryData = $util.newBuffer([]); + UnbindDeviceFromGatewayRequest.prototype.deviceId = ""; /** - * Creates a new DeviceConfig instance using the specified properties. + * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest instance */ - DeviceConfig.create = function create(properties) { - return new DeviceConfig(properties); + UnbindDeviceFromGatewayRequest.create = function create(properties) { + return new UnbindDeviceFromGatewayRequest(properties); }; /** - * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceConfig.encode = function encode(message, writer) { + UnbindDeviceFromGatewayRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.cloudUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) - $root.google.protobuf.Timestamp.encode(message.deviceAckTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.binaryData); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); return writer; }; /** - * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceConfig.encodeDelimited = function encodeDelimited(message, writer) { + UnbindDeviceFromGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceConfig message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceConfig.decode = function decode(reader, length) { + UnbindDeviceFromGatewayRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.int64(); + message.parent = reader.string(); break; case 2: - message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.gatewayId = reader.string(); break; case 3: - message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.binaryData = reader.bytes(); + message.deviceId = reader.string(); break; default: reader.skipType(tag & 7); @@ -9729,256 +9834,187 @@ }; /** - * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceConfig.decodeDelimited = function decodeDelimited(reader) { + UnbindDeviceFromGatewayRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceConfig message. + * Verifies an UnbindDeviceFromGatewayRequest message. * @function verify - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceConfig.verify = function verify(message) { + UnbindDeviceFromGatewayRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) - return "version: integer|Long expected"; - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.cloudUpdateTime); - if (error) - return "cloudUpdateTime." + error; - } - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deviceAckTime); - if (error) - return "deviceAckTime." + error; - } - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (!$util.isString(message.gatewayId)) + return "gatewayId: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; return null; }; /** - * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest */ - DeviceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceConfig) + UnbindDeviceFromGatewayRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) return object; - var message = new $root.google.cloud.iot.v1.DeviceConfig(); - if (object.version != null) - if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; - else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); - else if (typeof object.version === "number") - message.version = object.version; - else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); - if (object.cloudUpdateTime != null) { - if (typeof object.cloudUpdateTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceConfig.cloudUpdateTime: object expected"); - message.cloudUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.cloudUpdateTime); - } - if (object.deviceAckTime != null) { - if (typeof object.deviceAckTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceConfig.deviceAckTime: object expected"); - message.deviceAckTime = $root.google.protobuf.Timestamp.fromObject(object.deviceAckTime); - } - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; + var message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gatewayId != null) + message.gatewayId = String(object.gatewayId); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); return message; }; /** - * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. + * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.DeviceConfig} message DeviceConfig + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceConfig.toObject = function toObject(message, options) { + UnbindDeviceFromGatewayRequest.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.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.version = options.longs === String ? "0" : 0; - object.cloudUpdateTime = null; - object.deviceAckTime = null; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } + object.parent = ""; + object.gatewayId = ""; + object.deviceId = ""; } - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; - else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) - object.cloudUpdateTime = $root.google.protobuf.Timestamp.toObject(message.cloudUpdateTime, options); - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) - object.deviceAckTime = $root.google.protobuf.Timestamp.toObject(message.deviceAckTime, options); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + object.gatewayId = message.gatewayId; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; return object; }; /** - * Converts this DeviceConfig to JSON. + * Converts this UnbindDeviceFromGatewayRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance * @returns {Object.} JSON object */ - DeviceConfig.prototype.toJSON = function toJSON() { + UnbindDeviceFromGatewayRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceConfig; + return UnbindDeviceFromGatewayRequest; })(); - v1.DeviceState = (function() { + v1.UnbindDeviceFromGatewayResponse = (function() { /** - * Properties of a DeviceState. + * Properties of an UnbindDeviceFromGatewayResponse. * @memberof google.cloud.iot.v1 - * @interface IDeviceState - * @property {google.protobuf.ITimestamp|null} [updateTime] DeviceState updateTime - * @property {Uint8Array|null} [binaryData] DeviceState binaryData + * @interface IUnbindDeviceFromGatewayResponse */ /** - * Constructs a new DeviceState. + * Constructs a new UnbindDeviceFromGatewayResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceState. - * @implements IDeviceState + * @classdesc Represents an UnbindDeviceFromGatewayResponse. + * @implements IUnbindDeviceFromGatewayResponse * @constructor - * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set */ - function DeviceState(properties) { + function UnbindDeviceFromGatewayResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeviceState updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.iot.v1.DeviceState - * @instance - */ - DeviceState.prototype.updateTime = null; - - /** - * DeviceState binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.DeviceState - * @instance - */ - DeviceState.prototype.binaryData = $util.newBuffer([]); + this[keys[i]] = properties[keys[i]]; + } /** - * Creates a new DeviceState instance using the specified properties. + * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceState} DeviceState instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse instance */ - DeviceState.create = function create(properties) { - return new DeviceState(properties); + UnbindDeviceFromGatewayResponse.create = function create(properties) { + return new UnbindDeviceFromGatewayResponse(properties); }; /** - * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceState.encode = function encode(message, writer) { + UnbindDeviceFromGatewayResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); return writer; }; /** - * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceState.encodeDelimited = function encodeDelimited(message, writer) { + UnbindDeviceFromGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceState message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceState.decode = function decode(reader, length) { + UnbindDeviceFromGatewayResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceState(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.binaryData = reader.bytes(); - break; default: reader.skipType(tag & 7); break; @@ -9988,110 +10024,74 @@ }; /** - * Decodes a DeviceState message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceState.decodeDelimited = function decodeDelimited(reader) { + UnbindDeviceFromGatewayResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceState message. + * Verifies an UnbindDeviceFromGatewayResponse message. * @function verify - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceState.verify = function verify(message) { + UnbindDeviceFromGatewayResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; return null; }; /** - * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse */ - DeviceState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceState) + UnbindDeviceFromGatewayResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) return object; - var message = new $root.google.cloud.iot.v1.DeviceState(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceState.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; - return message; + return new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); }; /** - * Creates a plain object from a DeviceState message. Also converts values to other types if specified. + * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.DeviceState} message DeviceState + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateTime = null; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; - return object; + UnbindDeviceFromGatewayResponse.toObject = function toObject() { + return {}; }; /** - * Converts this DeviceState to JSON. + * Converts this UnbindDeviceFromGatewayResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @instance * @returns {Object.} JSON object */ - DeviceState.prototype.toJSON = function toJSON() { + UnbindDeviceFromGatewayResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceState; + return UnbindDeviceFromGatewayResponse; })(); return v1; @@ -10112,26 +10112,30 @@ */ var api = {}; - api.Http = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @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 Http. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10139,91 +10143,143 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + 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); @@ -10234,353 +10290,285 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.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.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean 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 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. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.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.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + 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 Http message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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 Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.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 + * 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 */ - HttpRule.prototype.patch = ""; + 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; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - HttpRule.prototype.body = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - HttpRule.prototype.responseBody = ""; + 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]]; + } /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + 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.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -10591,240 +10579,118 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return 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. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } + var message = new $root.google.api.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 HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + 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 HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10832,88 +10698,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -10924,144 +10793,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + 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.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - 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; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11069,143 +10937,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = ""; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = ""; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * 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.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); break; case 5: - message.plural = reader.string(); + message["delete"] = reader.string(); break; case 6: - message.singular = reader.string(); + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 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); @@ -11216,196 +11150,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; + } + if (message.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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - 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.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - 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.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.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11413,88 +11391,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -11505,96 +11483,118 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + 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; })(); return api; @@ -16807,8 +16807,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 */ /** @@ -16885,20 +16885,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. @@ -17004,6 +17004,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"] = []; @@ -17014,9 +17017,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; @@ -17091,6 +17091,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"; @@ -17107,11 +17112,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; }; @@ -17173,6 +17173,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"); @@ -17206,11 +17211,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; }; diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 136353bf2e3..e4d4ad49584 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -11,943 +11,943 @@ "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/cloud/iot/v1;iot", "java_multiple_files": true, - "java_outer_classname": "ResourcesProto", + "java_outer_classname": "DeviceManagerProto", "java_package": "com.google.cloud.iot.v1" }, "nested": { - "DeviceManager": { + "Device": { "options": { - "(google.api.default_host)": "cloudiot.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudiot" + "(google.api.resource).type": "cloudiot.googleapis.com/Device", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}/devices/{device}" }, - "methods": { - "CreateDeviceRegistry": { - "requestType": "CreateDeviceRegistryRequest", - "responseType": "DeviceRegistry", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/registries", - "(google.api.http).body": "device_registry", - "(google.api.method_signature)": "parent,device_registry" - } + "fields": { + "id": { + "type": "string", + "id": 1 }, - "GetDeviceRegistry": { - "requestType": "GetDeviceRegistryRequest", - "responseType": "DeviceRegistry", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*}", - "(google.api.method_signature)": "name" - } + "name": { + "type": "string", + "id": 2 }, - "UpdateDeviceRegistry": { - "requestType": "UpdateDeviceRegistryRequest", - "responseType": "DeviceRegistry", - "options": { - "(google.api.http).patch": "/v1/{device_registry.name=projects/*/locations/*/registries/*}", - "(google.api.http).body": "device_registry", - "(google.api.method_signature)": "device_registry,update_mask" - } + "numId": { + "type": "uint64", + "id": 3 }, - "DeleteDeviceRegistry": { - "requestType": "DeleteDeviceRegistryRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*}", - "(google.api.method_signature)": "name" - } + "credentials": { + "rule": "repeated", + "type": "DeviceCredential", + "id": 12 }, - "ListDeviceRegistries": { - "requestType": "ListDeviceRegistriesRequest", - "responseType": "ListDeviceRegistriesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/registries", - "(google.api.method_signature)": "parent" - } + "lastHeartbeatTime": { + "type": "google.protobuf.Timestamp", + "id": 7 }, - "CreateDevice": { - "requestType": "CreateDeviceRequest", - "responseType": "Device", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}/devices", - "(google.api.http).body": "device", - "(google.api.method_signature)": "parent,device" - } + "lastEventTime": { + "type": "google.protobuf.Timestamp", + "id": 8 }, - "GetDevice": { - "requestType": "GetDeviceRequest", - "responseType": "Device", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}", - "(google.api.method_signature)": "name" - } + "lastStateTime": { + "type": "google.protobuf.Timestamp", + "id": 20 }, - "UpdateDevice": { - "requestType": "UpdateDeviceRequest", - "responseType": "Device", - "options": { - "(google.api.http).patch": "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}", - "(google.api.http).body": "device", - "(google.api.http).additional_bindings.patch": "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}", - "(google.api.http).additional_bindings.body": "device", - "(google.api.method_signature)": "device,update_mask" - } + "lastConfigAckTime": { + "type": "google.protobuf.Timestamp", + "id": 14 }, - "DeleteDevice": { - "requestType": "DeleteDeviceRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", - "(google.api.method_signature)": "name" - } + "lastConfigSendTime": { + "type": "google.protobuf.Timestamp", + "id": 18 }, - "ListDevices": { - "requestType": "ListDevicesRequest", - "responseType": "ListDevicesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/registries/*}/devices", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices", - "(google.api.method_signature)": "parent" - } + "blocked": { + "type": "bool", + "id": 19 }, - "ModifyCloudToDeviceConfig": { - "requestType": "ModifyCloudToDeviceConfigRequest", - "responseType": "DeviceConfig", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,binary_data" - } + "lastErrorTime": { + "type": "google.protobuf.Timestamp", + "id": 10 }, - "ListDeviceConfigVersions": { - "requestType": "ListDeviceConfigVersionsRequest", - "responseType": "ListDeviceConfigVersionsResponse", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions", - "(google.api.method_signature)": "name" - } + "lastErrorStatus": { + "type": "google.rpc.Status", + "id": 11 }, - "ListDeviceStates": { - "requestType": "ListDeviceStatesRequest", - "responseType": "ListDeviceStatesResponse", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states", - "(google.api.method_signature)": "name" - } + "config": { + "type": "DeviceConfig", + "id": 13 + }, + "state": { + "type": "DeviceState", + "id": 16 + }, + "logLevel": { + "type": "LogLevel", + "id": 21 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 17 + }, + "gatewayConfig": { + "type": "GatewayConfig", + "id": 24 + } + } + }, + "GatewayConfig": { + "fields": { + "gatewayType": { + "type": "GatewayType", + "id": 1 + }, + "gatewayAuthMethod": { + "type": "GatewayAuthMethod", + "id": 2 + }, + "lastAccessedGatewayId": { + "type": "string", + "id": 3 + }, + "lastAccessedGatewayTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "DeviceRegistry": { + "options": { + "(google.api.resource).type": "cloudiot.googleapis.com/Registry", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}" + }, + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + }, + "eventNotificationConfigs": { + "rule": "repeated", + "type": "EventNotificationConfig", + "id": 10 + }, + "stateNotificationConfig": { + "type": "StateNotificationConfig", + "id": 7 + }, + "mqttConfig": { + "type": "MqttConfig", + "id": 4 + }, + "httpConfig": { + "type": "HttpConfig", + "id": 9 + }, + "logLevel": { + "type": "LogLevel", + "id": 11 + }, + "credentials": { + "rule": "repeated", + "type": "RegistryCredential", + "id": 8 + } + } + }, + "MqttConfig": { + "fields": { + "mqttEnabledState": { + "type": "MqttState", + "id": 1 + } + } + }, + "MqttState": { + "values": { + "MQTT_STATE_UNSPECIFIED": 0, + "MQTT_ENABLED": 1, + "MQTT_DISABLED": 2 + } + }, + "HttpConfig": { + "fields": { + "httpEnabledState": { + "type": "HttpState", + "id": 1 + } + } + }, + "HttpState": { + "values": { + "HTTP_STATE_UNSPECIFIED": 0, + "HTTP_ENABLED": 1, + "HTTP_DISABLED": 2 + } + }, + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "NONE": 10, + "ERROR": 20, + "INFO": 30, + "DEBUG": 40 + } + }, + "GatewayType": { + "values": { + "GATEWAY_TYPE_UNSPECIFIED": 0, + "GATEWAY": 1, + "NON_GATEWAY": 2 + } + }, + "GatewayAuthMethod": { + "values": { + "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, + "ASSOCIATION_ONLY": 1, + "DEVICE_AUTH_TOKEN_ONLY": 2, + "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 + } + }, + "EventNotificationConfig": { + "fields": { + "subfolderMatches": { + "type": "string", + "id": 2 }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource,policy" - } + "pubsubTopicName": { + "type": "string", + "id": 1 + } + } + }, + "StateNotificationConfig": { + "fields": { + "pubsubTopicName": { + "type": "string", + "id": 1 + } + } + }, + "RegistryCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKeyCertificate" + ] + } + }, + "fields": { + "publicKeyCertificate": { + "type": "PublicKeyCertificate", + "id": 1 + } + } + }, + "X509CertificateDetails": { + "fields": { + "issuer": { + "type": "string", + "id": 1 }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource" - } + "subject": { + "type": "string", + "id": 2 }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource,permissions" - } + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 }, - "SendCommandToDevice": { - "requestType": "SendCommandToDeviceRequest", - "responseType": "SendCommandToDeviceResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,binary_data,subfolder" - } + "expiryTime": { + "type": "google.protobuf.Timestamp", + "id": 4 }, - "BindDeviceToGateway": { - "requestType": "BindDeviceToGatewayRequest", - "responseType": "BindDeviceToGatewayResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,gateway_id,device_id" - } + "signatureAlgorithm": { + "type": "string", + "id": 5 }, - "UnbindDeviceFromGateway": { - "requestType": "UnbindDeviceFromGatewayRequest", - "responseType": "UnbindDeviceFromGatewayResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,gateway_id,device_id" - } + "publicKeyType": { + "type": "string", + "id": 6 } } }, - "CreateDeviceRegistryRequest": { + "PublicKeyCertificate": { "fields": { - "parent": { + "format": { + "type": "PublicKeyCertificateFormat", + "id": 1 + }, + "certificate": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } + "id": 2 }, - "deviceRegistry": { - "type": "DeviceRegistry", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "x509Details": { + "type": "X509CertificateDetails", + "id": 3 } } }, - "GetDeviceRegistryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } - } + "PublicKeyCertificateFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, + "X509_CERTIFICATE_PEM": 1 } }, - "DeleteDeviceRegistryRequest": { + "DeviceCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKey" + ] + } + }, "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } + "publicKey": { + "type": "PublicKeyCredential", + "id": 2 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 6 } } }, - "UpdateDeviceRegistryRequest": { + "PublicKeyCredential": { "fields": { - "deviceRegistry": { - "type": "DeviceRegistry", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "format": { + "type": "PublicKeyFormat", + "id": 1 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "key": { + "type": "string", + "id": 2 } } }, - "ListDeviceRegistriesRequest": { + "PublicKeyFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, + "RSA_PEM": 3, + "RSA_X509_PEM": 1, + "ES256_PEM": 2, + "ES256_X509_PEM": 4 + } + }, + "DeviceConfig": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } + "version": { + "type": "int64", + "id": 1 }, - "pageSize": { - "type": "int32", + "cloudUpdateTime": { + "type": "google.protobuf.Timestamp", "id": 2 }, - "pageToken": { - "type": "string", + "deviceAckTime": { + "type": "google.protobuf.Timestamp", "id": 3 + }, + "binaryData": { + "type": "bytes", + "id": 4 } } }, - "ListDeviceRegistriesResponse": { + "DeviceState": { "fields": { - "deviceRegistries": { - "rule": "repeated", - "type": "DeviceRegistry", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateDeviceRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "binaryData": { + "type": "bytes", + "id": 2 + } + } + }, + "DeviceManager": { + "options": { + "(google.api.default_host)": "cloudiot.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudiot" + }, + "methods": { + "CreateDeviceRegistry": { + "requestType": "CreateDeviceRegistryRequest", + "responseType": "DeviceRegistry", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/registries", + "(google.api.http).body": "device_registry", + "(google.api.method_signature)": "parent,device_registry" + } + }, + "GetDeviceRegistry": { + "requestType": "GetDeviceRegistryRequest", + "responseType": "DeviceRegistry", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*}", + "(google.api.method_signature)": "name" + } + }, + "UpdateDeviceRegistry": { + "requestType": "UpdateDeviceRegistryRequest", + "responseType": "DeviceRegistry", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + "(google.api.http).patch": "/v1/{device_registry.name=projects/*/locations/*/registries/*}", + "(google.api.http).body": "device_registry", + "(google.api.method_signature)": "device_registry,update_mask" } }, - "device": { - "type": "Device", - "id": 2, + "DeleteDeviceRegistry": { + "requestType": "DeleteDeviceRegistryRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*}", + "(google.api.method_signature)": "name" } - } - } - }, - "GetDeviceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "ListDeviceRegistries": { + "requestType": "ListDeviceRegistriesRequest", + "responseType": "ListDeviceRegistriesResponse", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/registries", + "(google.api.method_signature)": "parent" } }, - "fieldMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "UpdateDeviceRequest": { - "fields": { - "device": { - "type": "Device", - "id": 2, + "CreateDevice": { + "requestType": "CreateDeviceRequest", + "responseType": "Device", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}/devices", + "(google.api.http).body": "device", + "(google.api.method_signature)": "parent,device" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, + "GetDevice": { + "requestType": "GetDeviceRequest", + "responseType": "Device", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}", + "(google.api.method_signature)": "name" } - } - } - }, - "DeleteDeviceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "UpdateDevice": { + "requestType": "UpdateDeviceRequest", + "responseType": "Device", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + "(google.api.http).patch": "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}", + "(google.api.http).body": "device", + "(google.api.http).additional_bindings.patch": "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}", + "(google.api.http).additional_bindings.body": "device", + "(google.api.method_signature)": "device,update_mask" } - } - } - }, - "ListDevicesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "DeleteDevice": { + "requestType": "DeleteDeviceRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", + "(google.api.method_signature)": "name" } }, - "deviceNumIds": { - "rule": "repeated", - "type": "uint64", - "id": 2 + "ListDevices": { + "requestType": "ListDevicesRequest", + "responseType": "ListDevicesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/registries/*}/devices", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices", + "(google.api.method_signature)": "parent" + } }, - "deviceIds": { - "rule": "repeated", - "type": "string", - "id": 3 + "ModifyCloudToDeviceConfig": { + "requestType": "ModifyCloudToDeviceConfigRequest", + "responseType": "DeviceConfig", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,binary_data" + } }, - "fieldMask": { - "type": "google.protobuf.FieldMask", - "id": 4 + "ListDeviceConfigVersions": { + "requestType": "ListDeviceConfigVersionsRequest", + "responseType": "ListDeviceConfigVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions", + "(google.api.method_signature)": "name" + } }, - "gatewayListOptions": { - "type": "GatewayListOptions", - "id": 6 + "ListDeviceStates": { + "requestType": "ListDeviceStatesRequest", + "responseType": "ListDeviceStatesResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states", + "(google.api.method_signature)": "name" + } }, - "pageSize": { - "type": "int32", - "id": 100 + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,policy" + } }, - "pageToken": { - "type": "string", - "id": 101 - } - } - }, - "GatewayListOptions": { - "oneofs": { - "filter": { - "oneof": [ - "gatewayType", - "associationsGatewayId", - "associationsDeviceId" - ] - } - }, - "fields": { - "gatewayType": { - "type": "GatewayType", - "id": 1 + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource" + } }, - "associationsGatewayId": { - "type": "string", - "id": 2 + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,permissions" + } }, - "associationsDeviceId": { - "type": "string", - "id": 3 - } - } - }, - "ListDevicesResponse": { - "fields": { - "devices": { - "rule": "repeated", - "type": "Device", - "id": 1 + "SendCommandToDevice": { + "requestType": "SendCommandToDeviceRequest", + "responseType": "SendCommandToDeviceResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,binary_data,subfolder" + } }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ModifyCloudToDeviceConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + "BindDeviceToGateway": { + "requestType": "BindDeviceToGatewayRequest", + "responseType": "BindDeviceToGatewayResponse", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,gateway_id,device_id" } }, - "versionToUpdate": { - "type": "int64", - "id": 2 - }, - "binaryData": { - "type": "bytes", - "id": 3, + "UnbindDeviceFromGateway": { + "requestType": "UnbindDeviceFromGatewayRequest", + "responseType": "UnbindDeviceFromGatewayResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,gateway_id,device_id" } } } }, - "ListDeviceConfigVersionsRequest": { + "CreateDeviceRegistryRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, - "numVersions": { - "type": "int32", - "id": 2 - } - } - }, - "ListDeviceConfigVersionsResponse": { - "fields": { - "deviceConfigs": { - "rule": "repeated", - "type": "DeviceConfig", - "id": 1 + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "ListDeviceStatesRequest": { + "GetDeviceRegistryRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } - }, - "numStates": { - "type": "int32", - "id": 2 - } - } - }, - "ListDeviceStatesResponse": { - "fields": { - "deviceStates": { - "rule": "repeated", - "type": "DeviceState", - "id": 1 } } }, - "SendCommandToDeviceRequest": { + "DeleteDeviceRegistryRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" - } - }, - "binaryData": { - "type": "bytes", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } - }, - "subfolder": { - "type": "string", - "id": 3 } } }, - "SendCommandToDeviceResponse": { - "fields": {} - }, - "BindDeviceToGatewayRequest": { + "UpdateDeviceRegistryRequest": { "fields": { - "parent": { - "type": "string", + "deviceRegistry": { + "type": "DeviceRegistry", "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } - }, - "gatewayId": { - "type": "string", - "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "deviceId": { - "type": "string", - "id": 3, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "BindDeviceToGatewayResponse": { - "fields": {} - }, - "UnbindDeviceFromGatewayRequest": { + "ListDeviceRegistriesRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } - }, - "gatewayId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "deviceId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "locations.googleapis.com/Location" } - } - } - }, - "UnbindDeviceFromGatewayResponse": { - "fields": {} - }, - "Device": { - "options": { - "(google.api.resource).type": "cloudiot.googleapis.com/Device", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}/devices/{device}" - }, - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "numId": { - "type": "uint64", - "id": 3 - }, - "credentials": { - "rule": "repeated", - "type": "DeviceCredential", - "id": 12 - }, - "lastHeartbeatTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "lastEventTime": { - "type": "google.protobuf.Timestamp", - "id": 8 - }, - "lastStateTime": { - "type": "google.protobuf.Timestamp", - "id": 20 - }, - "lastConfigAckTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - }, - "lastConfigSendTime": { - "type": "google.protobuf.Timestamp", - "id": 18 - }, - "blocked": { - "type": "bool", - "id": 19 - }, - "lastErrorTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "lastErrorStatus": { - "type": "google.rpc.Status", - "id": 11 - }, - "config": { - "type": "DeviceConfig", - "id": 13 - }, - "state": { - "type": "DeviceState", - "id": 16 - }, - "logLevel": { - "type": "LogLevel", - "id": 21 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 17 - }, - "gatewayConfig": { - "type": "GatewayConfig", - "id": 24 - } - } - }, - "GatewayConfig": { - "fields": { - "gatewayType": { - "type": "GatewayType", - "id": 1 - }, - "gatewayAuthMethod": { - "type": "GatewayAuthMethod", - "id": 2 - }, - "lastAccessedGatewayId": { - "type": "string", - "id": 3 - }, - "lastAccessedGatewayTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - }, - "DeviceRegistry": { - "options": { - "(google.api.resource).type": "cloudiot.googleapis.com/Registry", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}" - }, - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "eventNotificationConfigs": { - "rule": "repeated", - "type": "EventNotificationConfig", - "id": 10 }, - "stateNotificationConfig": { - "type": "StateNotificationConfig", - "id": 7 - }, - "mqttConfig": { - "type": "MqttConfig", - "id": 4 - }, - "httpConfig": { - "type": "HttpConfig", - "id": 9 - }, - "logLevel": { - "type": "LogLevel", - "id": 11 + "pageSize": { + "type": "int32", + "id": 2 }, - "credentials": { - "rule": "repeated", - "type": "RegistryCredential", - "id": 8 + "pageToken": { + "type": "string", + "id": 3 } } }, - "MqttConfig": { + "ListDeviceRegistriesResponse": { "fields": { - "mqttEnabledState": { - "type": "MqttState", + "deviceRegistries": { + "rule": "repeated", + "type": "DeviceRegistry", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "MqttState": { - "values": { - "MQTT_STATE_UNSPECIFIED": 0, - "MQTT_ENABLED": 1, - "MQTT_DISABLED": 2 - } - }, - "HttpConfig": { + "CreateDeviceRequest": { "fields": { - "httpEnabledState": { - "type": "HttpState", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } + }, + "device": { + "type": "Device", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "HttpState": { - "values": { - "HTTP_STATE_UNSPECIFIED": 0, - "HTTP_ENABLED": 1, - "HTTP_DISABLED": 2 - } - }, - "LogLevel": { - "values": { - "LOG_LEVEL_UNSPECIFIED": 0, - "NONE": 10, - "ERROR": 20, - "INFO": 30, - "DEBUG": 40 - } - }, - "GatewayType": { - "values": { - "GATEWAY_TYPE_UNSPECIFIED": 0, - "GATEWAY": 1, - "NON_GATEWAY": 2 - } - }, - "GatewayAuthMethod": { - "values": { - "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, - "ASSOCIATION_ONLY": 1, - "DEVICE_AUTH_TOKEN_ONLY": 2, - "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 - } - }, - "EventNotificationConfig": { + "GetDeviceRequest": { "fields": { - "subfolderMatches": { + "name": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, - "pubsubTopicName": { - "type": "string", - "id": 1 + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 } } }, - "StateNotificationConfig": { + "UpdateDeviceRequest": { "fields": { - "pubsubTopicName": { - "type": "string", - "id": 1 + "device": { + "type": "Device", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "RegistryCredential": { - "oneofs": { - "credential": { - "oneof": [ - "publicKeyCertificate" - ] - } - }, + "DeleteDeviceRequest": { "fields": { - "publicKeyCertificate": { - "type": "PublicKeyCertificate", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } } } }, - "X509CertificateDetails": { + "ListDevicesRequest": { "fields": { - "issuer": { + "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } }, - "subject": { - "type": "string", + "deviceNumIds": { + "rule": "repeated", + "type": "uint64", "id": 2 }, - "startTime": { - "type": "google.protobuf.Timestamp", + "deviceIds": { + "rule": "repeated", + "type": "string", "id": 3 }, - "expiryTime": { - "type": "google.protobuf.Timestamp", + "fieldMask": { + "type": "google.protobuf.FieldMask", "id": 4 }, - "signatureAlgorithm": { - "type": "string", - "id": 5 + "gatewayListOptions": { + "type": "GatewayListOptions", + "id": 6 }, - "publicKeyType": { + "pageSize": { + "type": "int32", + "id": 100 + }, + "pageToken": { "type": "string", - "id": 6 + "id": 101 } } }, - "PublicKeyCertificate": { + "GatewayListOptions": { + "oneofs": { + "filter": { + "oneof": [ + "gatewayType", + "associationsGatewayId", + "associationsDeviceId" + ] + } + }, "fields": { - "format": { - "type": "PublicKeyCertificateFormat", + "gatewayType": { + "type": "GatewayType", "id": 1 }, - "certificate": { + "associationsGatewayId": { "type": "string", "id": 2 }, - "x509Details": { - "type": "X509CertificateDetails", + "associationsDeviceId": { + "type": "string", "id": 3 } } }, - "PublicKeyCertificateFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, - "X509_CERTIFICATE_PEM": 1 + "ListDevicesResponse": { + "fields": { + "devices": { + "rule": "repeated", + "type": "Device", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "DeviceCredential": { - "oneofs": { - "credential": { - "oneof": [ - "publicKey" - ] - } - }, + "ModifyCloudToDeviceConfigRequest": { "fields": { - "publicKey": { - "type": "PublicKeyCredential", + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } + }, + "versionToUpdate": { + "type": "int64", "id": 2 }, - "expirationTime": { - "type": "google.protobuf.Timestamp", - "id": 6 + "binaryData": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListDeviceConfigVersionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } + }, + "numVersions": { + "type": "int32", + "id": 2 + } + } + }, + "ListDeviceConfigVersionsResponse": { + "fields": { + "deviceConfigs": { + "rule": "repeated", + "type": "DeviceConfig", + "id": 1 } } }, - "PublicKeyCredential": { + "ListDeviceStatesRequest": { "fields": { - "format": { - "type": "PublicKeyFormat", - "id": 1 - }, - "key": { + "name": { "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } + }, + "numStates": { + "type": "int32", "id": 2 } } }, - "PublicKeyFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, - "RSA_PEM": 3, - "RSA_X509_PEM": 1, - "ES256_PEM": 2, - "ES256_X509_PEM": 4 + "ListDeviceStatesResponse": { + "fields": { + "deviceStates": { + "rule": "repeated", + "type": "DeviceState", + "id": 1 + } } }, - "DeviceConfig": { + "SendCommandToDeviceRequest": { "fields": { - "version": { - "type": "int64", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } }, - "cloudUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 + "binaryData": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "deviceAckTime": { - "type": "google.protobuf.Timestamp", + "subfolder": { + "type": "string", "id": 3 + } + } + }, + "SendCommandToDeviceResponse": { + "fields": {} + }, + "BindDeviceToGatewayRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } }, - "binaryData": { - "type": "bytes", - "id": 4 + "gatewayId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deviceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "DeviceState": { + "BindDeviceToGatewayResponse": { + "fields": {} + }, + "UnbindDeviceFromGatewayRequest": { "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } }, - "binaryData": { - "type": "bytes", - "id": 2 + "gatewayId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deviceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } + }, + "UnbindDeviceFromGatewayResponse": { + "fields": {} } } } @@ -957,14 +957,80 @@ }, "api": { "options": { + "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "FieldBehaviorProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { + "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 + } + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -1083,72 +1149,6 @@ "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 - } - } } } }, diff --git a/packages/google-cloud-iot/src/index.js b/packages/google-cloud-iot/src/index.js deleted file mode 100644 index 8e2c67de6f6..00000000000 --- a/packages/google-cloud-iot/src/index.js +++ /dev/null @@ -1,94 +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.cloud - */ -/** - * @namespace google.cloud.iot - */ -/** - * @namespace google.cloud.iot.v1 - */ -/** - * @namespace google.iam - */ -/** - * @namespace google.iam.v1 - */ -/** - * @namespace google.protobuf - */ -/** - * @namespace google.rpc - */ -/** - * @namespace google.type - */ - -'use strict'; - -// Import the clients for each version supported by this package. -const gapic = Object.freeze({ - v1: require('./v1'), -}); - -/** - * The `@google-cloud/iot` package has the following named exports: - * - * - `DeviceManagerClient` - Reference to - * {@link v1.DeviceManagerClient} - * - `v1` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `DeviceManagerClient` - Reference to - * {@link v1.DeviceManagerClient} - * - * @module {object} @google-cloud/iot - * @alias nodejs-iot - * - * @example Install the client library with npm: - * npm install --save @google-cloud/iot - * - * @example Import the client library: - * const iot = require('@google-cloud/iot'); - * - * @example Create a client that uses Application Default Credentials (ADC): - * const client = new iot.DeviceManagerClient(); - * - * @example Create a client with explicit credentials: - * const client = new iot.DeviceManagerClient({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json', - * }); - */ - -/** - * @type {object} - * @property {constructor} DeviceManagerClient - * Reference to {@link v1.DeviceManagerClient} - */ -module.exports = gapic.v1; - -/** - * @type {object} - * @property {constructor} DeviceManagerClient - * Reference to {@link v1.DeviceManagerClient} - */ -module.exports.v1 = gapic.v1; - -// Alias `module.exports` as `module.exports.default`, for future-proofing. -module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-iot/src/index.ts b/packages/google-cloud-iot/src/index.ts new file mode 100644 index 00000000000..7b3cf828f71 --- /dev/null +++ b/packages/google-cloud-iot/src/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. ** + +import * as v1 from './v1'; +const DeviceManagerClient = v1.DeviceManagerClient; +export {v1, DeviceManagerClient}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default {v1, DeviceManagerClient}; diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.js b/packages/google-cloud-iot/src/v1/device_manager_client.js deleted file mode 100644 index bd9bbc38869..00000000000 --- a/packages/google-cloud-iot/src/v1/device_manager_client.js +++ /dev/null @@ -1,1882 +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. - -'use strict'; - -const gapicConfig = require('./device_manager_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * Internet of Things (IoT) service. Securely connect and manage IoT devices. - * - * @class - * @memberof v1 - */ -class DeviceManagerClient { - /** - * Construct an instance of DeviceManagerClient. - * - * @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 = { - devicePathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' - ), - locationPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - registryPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/registries/{registry}' - ), - }; - - // 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 = { - listDeviceRegistries: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'deviceRegistries' - ), - listDevices: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'devices' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.iot.v1.DeviceManager', - 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.cloud.iot.v1.DeviceManager. - const deviceManagerStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.iot.v1.DeviceManager') - : protos.google.cloud.iot.v1.DeviceManager, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const deviceManagerStubMethods = [ - 'createDeviceRegistry', - 'getDeviceRegistry', - 'updateDeviceRegistry', - 'deleteDeviceRegistry', - 'listDeviceRegistries', - 'createDevice', - 'getDevice', - 'updateDevice', - 'deleteDevice', - 'listDevices', - 'modifyCloudToDeviceConfig', - 'listDeviceConfigVersions', - 'listDeviceStates', - 'setIamPolicy', - 'getIamPolicy', - 'testIamPermissions', - 'sendCommandToDevice', - 'bindDeviceToGateway', - 'unbindDeviceFromGateway', - ]; - for (const methodName of deviceManagerStubMethods) { - const innerCallPromise = deviceManagerStub.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 'cloudiot.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'cloudiot.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/cloudiot', - ]; - } - - /** - * 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 -- - // ------------------- - - /** - * Creates a device registry that contains devices. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * @param {Object} request.deviceRegistry - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * - * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} - * @param {Object} [options] - * Optional parameters. You 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const deviceRegistry = {}; - * const request = { - * parent: formattedParent, - * deviceRegistry: deviceRegistry, - * }; - * client.createDeviceRegistry(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createDeviceRegistry(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.createDeviceRegistry(request, options, callback); - } - - /** - * Gets a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {Object} [options] - * Optional parameters. You 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * client.getDeviceRegistry({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getDeviceRegistry(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.getDeviceRegistry(request, options, callback); - } - - /** - * Updates a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.deviceRegistry - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} - * @param {Object} request.updateMask - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * - * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const deviceRegistry = {}; - * const updateMask = {}; - * const request = { - * deviceRegistry: deviceRegistry, - * updateMask: updateMask, - * }; - * client.updateDeviceRegistry(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateDeviceRegistry(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({ - 'device_registry.name': request.deviceRegistry.name, - }); - - return this._innerApiCalls.updateDeviceRegistry(request, options, callback); - } - - /** - * Deletes a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {Object} [options] - * Optional parameters. You 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 iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * client.deleteDeviceRegistry({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteDeviceRegistry(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.deleteDeviceRegistry(request, options, callback); - } - - /** - * Lists device registries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * - * 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 [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * - * client.listDeviceRegistries({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.locationPath('[PROJECT]', '[LOCATION]'); - * - * - * 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.listDeviceRegistries(nextRequest, options).then(callback); - * } - * } - * client.listDeviceRegistries({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listDeviceRegistries(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.listDeviceRegistries(request, options, callback); - } - - /** - * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * client.listDeviceRegistriesStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listDeviceRegistriesStream(request, 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._descriptors.page.listDeviceRegistries.createStream( - this._innerApiCalls.listDeviceRegistries, - request, - options - ); - } - - /** - * Creates a device in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {Object} request.device - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * - * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} - * @param {Object} [options] - * Optional parameters. You 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 [Device]{@link google.cloud.iot.v1.Device}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * const device = {}; - * const request = { - * parent: formattedParent, - * device: device, - * }; - * client.createDevice(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createDevice(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.createDevice(request, options, callback); - } - - /** - * Gets details about a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {Object} [request.fieldMask] - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. - * - * 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 [Device]{@link google.cloud.iot.v1.Device}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * client.getDevice({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getDevice(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.getDevice(request, options, callback); - } - - /** - * Updates a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.device - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} - * @param {Object} request.updateMask - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * - * 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 [Device]{@link google.cloud.iot.v1.Device}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const device = {}; - * const updateMask = {}; - * const request = { - * device: device, - * updateMask: updateMask, - * }; - * client.updateDevice(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateDevice(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({ - 'device.name': request.device.name, - }); - - return this._innerApiCalls.updateDevice(request, options, callback); - } - - /** - * Deletes a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {Object} [options] - * Optional parameters. You 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 iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * client.deleteDevice({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteDevice(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.deleteDevice(request, options, callback); - } - - /** - * List devices in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} [request.deviceNumIds] - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} [request.deviceIds] - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {Object} [request.fieldMask] - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object} [request.gatewayListOptions] - * Options related to gateways. - * - * This object should have the same structure as [GatewayListOptions]{@link google.cloud.iot.v1.GatewayListOptions} - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * - * 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 [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * - * client.listDevices({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.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * - * - * 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.listDevices(nextRequest, options).then(callback); - * } - * } - * client.listDevices({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listDevices(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.listDevices(request, options, callback); - } - - /** - * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} [request.deviceNumIds] - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} [request.deviceIds] - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {Object} [request.fieldMask] - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object} [request.gatewayListOptions] - * Options related to gateways. - * - * This object should have the same structure as [GatewayListOptions]{@link google.cloud.iot.v1.GatewayListOptions} - * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * client.listDevicesStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listDevicesStream(request, options) { - options = options || {}; - - return this._descriptors.page.listDevices.createStream( - this._innerApiCalls.listDevices, - request, - options - ); - } - - /** - * Modifies the configuration for the device, which is eventually sent from - * the Cloud IoT Core servers. Returns the modified configuration version and - * its metadata. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {Buffer} request.binaryData - * Required. The configuration data for the device. - * @param {number} [request.versionToUpdate] - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * @param {Object} [options] - * Optional parameters. You 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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * const binaryData = Buffer.from(''); - * const request = { - * name: formattedName, - * binaryData: binaryData, - * }; - * client.modifyCloudToDeviceConfig(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - modifyCloudToDeviceConfig(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.modifyCloudToDeviceConfig( - request, - options, - callback - ); - } - - /** - * Lists the last few versions of the device configuration in descending - * order (i.e.: newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} [request.numVersions] - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * @param {Object} [options] - * Optional parameters. You 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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * client.listDeviceConfigVersions({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - listDeviceConfigVersions(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.listDeviceConfigVersions( - request, - options, - callback - ); - } - - /** - * Lists the last few versions of the device state in descending order (i.e.: - * newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} [request.numStates] - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * @param {Object} [options] - * Optional parameters. You 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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * client.listDeviceStates({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - listDeviceStates(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.listDeviceStates(request, options, callback); - } - - /** - * Sets the access control policy on the specified resource. Replaces any - * existing policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {Object} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * @param {Object} [options] - * Optional parameters. You 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 [Policy]{@link google.iam.v1.Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const resource = ''; - * const policy = {}; - * const request = { - * resource: resource, - * policy: policy, - * }; - * client.setIamPolicy(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - setIamPolicy(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({ - resource: request.resource, - }); - - return this._innerApiCalls.setIamPolicy(request, options, callback); - } - - /** - * Gets the access control policy for a resource. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * @param {Object} [options] - * Optional parameters. You 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 [Policy]{@link google.iam.v1.Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const resource = ''; - * client.getIamPolicy({resource: resource}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getIamPolicy(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({ - resource: request.resource, - }); - - return this._innerApiCalls.getIamPolicy(request, options, callback); - } - - /** - * Returns permissions that a caller has on the specified resource. - * If the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {Object} [options] - * Optional parameters. You 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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const resource = ''; - * const permissions = []; - * const request = { - * resource: resource, - * permissions: permissions, - * }; - * client.testIamPermissions(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - testIamPermissions(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({ - resource: request.resource, - }); - - return this._innerApiCalls.testIamPermissions(request, options, callback); - } - - /** - * Sends a command to the specified device. In order for a device to be able - * to receive commands, it must: - * 1) be connected to Cloud IoT Core using the MQTT protocol, and - * 2) be subscribed to the group of MQTT topics specified by - * /devices/{device-id}/commands/#. This subscription will receive commands - * at the top-level topic /devices/{device-id}/commands as well as commands - * for subfolders, like /devices/{device-id}/commands/subfolder. - * Note that subscribing to specific subfolders is not supported. - * If the command could not be delivered to the device, this method will - * return an error; in particular, if the device is not subscribed, this - * method will return FAILED_PRECONDITION. Otherwise, this method will - * return OK. If the subscription is QoS 1, at least once delivery will be - * guaranteed; for QoS 0, no acknowledgment will be expected from the device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {Buffer} request.binaryData - * Required. The command data to send to the device. - * @param {string} [request.subfolder] - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * @param {Object} [options] - * Optional parameters. You 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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.devicePath('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * const binaryData = Buffer.from(''); - * const request = { - * name: formattedName, - * binaryData: binaryData, - * }; - * client.sendCommandToDevice(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - sendCommandToDevice(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.sendCommandToDevice(request, options, callback); - } - - /** - * Associates the device with the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @param {Object} [options] - * Optional parameters. You 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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * const gatewayId = ''; - * const deviceId = ''; - * const request = { - * parent: formattedParent, - * gatewayId: gatewayId, - * deviceId: deviceId, - * }; - * client.bindDeviceToGateway(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - bindDeviceToGateway(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.bindDeviceToGateway(request, options, callback); - } - - /** - * Deletes the association between the device and the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @param {Object} [options] - * Optional parameters. You 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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const iot = require('@google-cloud/iot'); - * - * const client = new iot.v1.DeviceManagerClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.registryPath('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * const gatewayId = ''; - * const deviceId = ''; - * const request = { - * parent: formattedParent, - * gatewayId: gatewayId, - * deviceId: deviceId, - * }; - * client.unbindDeviceFromGateway(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - unbindDeviceFromGateway(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.unbindDeviceFromGateway( - request, - options, - callback - ); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified device resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} registry - * @param {String} device - * @returns {String} - */ - devicePath(project, location, registry, device) { - return this._pathTemplates.devicePathTemplate.render({ - project: project, - location: location, - registry: registry, - device: device, - }); - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {String} project - * @param {String} location - * @returns {String} - */ - locationPath(project, location) { - return this._pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Return a fully-qualified registry resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} registry - * @returns {String} - */ - registryPath(project, location, registry) { - return this._pathTemplates.registryPathTemplate.render({ - project: project, - location: location, - registry: registry, - }); - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).project; - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).location; - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the registry. - */ - matchRegistryFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).registry; - } - - /** - * Parse the deviceName from a device resource. - * - * @param {String} deviceName - * A fully-qualified path representing a device resources. - * @returns {String} - A string representing the device. - */ - matchDeviceFromDeviceName(deviceName) { - return this._pathTemplates.devicePathTemplate.match(deviceName).device; - } - - /** - * Parse the locationName from a location resource. - * - * @param {String} locationName - * A fully-qualified path representing a location resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the locationName from a location resource. - * - * @param {String} locationName - * A fully-qualified path representing a location resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName) - .location; - } - - /** - * Parse the registryName from a registry resource. - * - * @param {String} registryName - * A fully-qualified path representing a registry resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate.match(registryName).project; - } - - /** - * Parse the registryName from a registry resource. - * - * @param {String} registryName - * A fully-qualified path representing a registry resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate.match(registryName) - .location; - } - - /** - * Parse the registryName from a registry resource. - * - * @param {String} registryName - * A fully-qualified path representing a registry resources. - * @returns {String} - A string representing the registry. - */ - matchRegistryFromRegistryName(registryName) { - return this._pathTemplates.registryPathTemplate.match(registryName) - .registry; - } -} - -module.exports = DeviceManagerClient; diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts new file mode 100644 index 00000000000..eac43704973 --- /dev/null +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -0,0 +1,2129 @@ +// 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 './device_manager_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Internet of Things (IoT) service. Securely connect and manage IoT devices. + * @class + * @memberof v1 + */ +export class DeviceManagerClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + deviceManagerStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DeviceManagerClient. + * + * @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 DeviceManagerClient; + 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 DeviceManagerClient).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 = { + locationPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + registryPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}' + ), + devicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' + ), + }; + + // 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 = { + listDeviceRegistries: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'deviceRegistries' + ), + listDevices: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'devices' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.iot.v1.DeviceManager', + 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.cloud.iot.v1.DeviceManager. + this.deviceManagerStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.iot.v1.DeviceManager' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.iot.v1.DeviceManager, + 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 deviceManagerStubMethods = [ + 'createDeviceRegistry', + 'getDeviceRegistry', + 'updateDeviceRegistry', + 'deleteDeviceRegistry', + 'listDeviceRegistries', + 'createDevice', + 'getDevice', + 'updateDevice', + 'deleteDevice', + 'listDevices', + 'modifyCloudToDeviceConfig', + 'listDeviceConfigVersions', + 'listDeviceStates', + 'setIamPolicy', + 'getIamPolicy', + 'testIamPermissions', + 'sendCommandToDevice', + 'bindDeviceToGateway', + 'unbindDeviceFromGateway', + ]; + + for (const methodName of deviceManagerStubMethods) { + const innerCallPromise = this.deviceManagerStub.then( + stub => (...args: Array<{}>) => { + 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 + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'cloudiot.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'cloudiot.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/cloudiot', + ]; + } + + 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 -- + // ------------------- + createDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + {} | undefined + ] + >; + createDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a device registry that contains devices. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + | protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | 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.createDeviceRegistry(request, options, callback); + } + getDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + {} | undefined + ] + >; + getDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | 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.getDeviceRegistry(request, options, callback); + } + updateDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + {} | undefined + ] + >; + updateDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + | protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | 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({ + device_registry_name: request.deviceRegistry!.name || '', + }); + return this._innerApiCalls.updateDeviceRegistry(request, options, callback); + } + deleteDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + {} | undefined + ] + >; + deleteDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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. + */ + deleteDeviceRegistry( + request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | 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.deleteDeviceRegistry(request, options, callback); + } + createDevice( + request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + {} | undefined + ] + >; + createDevice( + request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a device in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createDevice( + request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | 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.createDevice(request, options, callback); + } + getDevice( + request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, + {} | undefined + ] + >; + getDevice( + request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets details about a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are 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 an object representing [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getDevice( + request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IGetDeviceRequest | 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.getDevice(request, options, callback); + } + updateDevice( + request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + ] + >; + updateDevice( + request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateDevice( + request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice, + protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | 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({ + device_name: request.device!.name || '', + }); + return this._innerApiCalls.updateDevice(request, options, callback); + } + deleteDevice( + request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + {} | undefined + ] + >; + deleteDevice( + request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @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. + */ + deleteDevice( + request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | 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.deleteDevice(request, options, callback); + } + modifyCloudToDeviceConfig( + request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceConfig, + ( + | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | undefined + ), + {} | undefined + ] + >; + modifyCloudToDeviceConfig( + request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDeviceConfig, + | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | undefined, + {} | undefined + > + ): void; + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.versionToUpdate + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @param {Buffer} request.binaryData + * Required. The configuration data for the device. + * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + modifyCloudToDeviceConfig( + request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDeviceConfig, + | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDeviceConfig, + | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceConfig, + ( + | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | 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.modifyCloudToDeviceConfig( + request, + options, + callback + ); + } + listDeviceConfigVersions( + request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + ( + | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | undefined + ), + {} | undefined + ] + >; + listDeviceConfigVersions( + request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | undefined, + {} | undefined + > + ): void; + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numVersions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDeviceConfigVersions( + request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + ( + | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | 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.listDeviceConfigVersions( + request, + options, + callback + ); + } + listDeviceStates( + request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, + protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + {} | undefined + ] + >; + listDeviceStates( + request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, + protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + {} | undefined + > + ): void; + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numStates + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDeviceStates( + request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, + protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, + protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, + protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | 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.listDeviceStates(request, options, callback); + } + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @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 [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | 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({ + resource: request.resource || '', + }); + return this._innerApiCalls.setIamPolicy(request, options, callback); + } + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + >; + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * @param {Object} request + * The request object that will be sent. + * @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 [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | 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({ + resource: request.resource || '', + }); + return this._innerApiCalls.getIamPolicy(request, options, callback); + } + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + > + ): void; + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * @param {Object} request + * The request object that will be sent. + * @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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | 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({ + resource: request.resource || '', + }); + return this._innerApiCalls.testIamPermissions(request, options, callback); + } + sendCommandToDevice( + request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + {} | undefined + ] + >; + sendCommandToDevice( + request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + {} | undefined + > + ): void; + /** + * Sends a command to the specified device. In order for a device to be able + * to receive commands, it must: + * 1) be connected to Cloud IoT Core using the MQTT protocol, and + * 2) be subscribed to the group of MQTT topics specified by + * /devices/{device-id}/commands/#. This subscription will receive commands + * at the top-level topic /devices/{device-id}/commands as well as commands + * for subfolders, like /devices/{device-id}/commands/subfolder. + * Note that subscribing to specific subfolders is not supported. + * If the command could not be delivered to the device, this method will + * return an error; in particular, if the device is not subscribed, this + * method will return FAILED_PRECONDITION. Otherwise, this method will + * return OK. If the subscription is QoS 1, at least once delivery will be + * guaranteed; for QoS 0, no acknowledgment will be expected from the device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {Buffer} request.binaryData + * Required. The command data to send to the device. + * @param {string} request.subfolder + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * @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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + sendCommandToDevice( + request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, + | protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | 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.sendCommandToDevice(request, options, callback); + } + bindDeviceToGateway( + request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + {} | undefined + ] + >; + bindDeviceToGateway( + request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + {} | undefined + > + ): void; + /** + * Associates the device with the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + bindDeviceToGateway( + request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + | protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | 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.bindDeviceToGateway(request, options, callback); + } + unbindDeviceFromGateway( + request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + ( + | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | undefined + ), + {} | undefined + ] + >; + unbindDeviceFromGateway( + request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes the association between the device and the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + unbindDeviceFromGateway( + request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + ( + | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | 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.unbindDeviceFromGateway( + request, + options, + callback + ); + } + + listDeviceRegistries( + request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry[], + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + ] + >; + listDeviceRegistries( + request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry[], + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + > + ): void; + /** + * Lists device registries. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesRequest]{@link google.cloud.iot.v1.ListDeviceRegistriesRequest} + * 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 + * [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDeviceRegistries( + request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry[], + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDeviceRegistry[], + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDeviceRegistry[], + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + ] + > | 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.listDeviceRegistries(request, options, callback); + } + + /** + * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. + */ + listDeviceRegistriesStream( + request?: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listDeviceRegistries.createStream( + this._innerApiCalls.listDeviceRegistries as gax.GaxCall, + request, + callSettings + ); + } + listDevices( + request: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice[], + protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, + protosTypes.google.cloud.iot.v1.IListDevicesResponse + ] + >; + listDevices( + request: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.iot.v1.IDevice[], + protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, + protosTypes.google.cloud.iot.v1.IListDevicesResponse + > + ): void; + /** + * List devices in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. + * 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 [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesRequest]{@link google.cloud.iot.v1.ListDevicesRequest} + * 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 + * [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDevices( + request: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.iot.v1.IDevice[], + protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, + protosTypes.google.cloud.iot.v1.IListDevicesResponse + >, + callback?: Callback< + protosTypes.google.cloud.iot.v1.IDevice[], + protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, + protosTypes.google.cloud.iot.v1.IListDevicesResponse + > + ): Promise< + [ + protosTypes.google.cloud.iot.v1.IDevice[], + protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, + protosTypes.google.cloud.iot.v1.IListDevicesResponse + ] + > | 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.listDevices(request, options, callback); + } + + /** + * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. + */ + listDevicesStream( + request?: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listDevices.createStream( + this._innerApiCalls.listDevices as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this._pathTemplates.locationPathTemplate.render({ + project, + location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName) + .location; + } + + /** + * Return a fully-qualified registry resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} registry + * @returns {string} Resource name string. + */ + registryPath(project: string, location: string, registry: string) { + return this._pathTemplates.registryPathTemplate.render({ + project, + location, + registry, + }); + } + + /** + * Parse the project from Registry resource. + * + * @param {string} registryName + * A fully-qualified path representing Registry resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRegistryName(registryName: string) { + return this._pathTemplates.registryPathTemplate.match(registryName).project; + } + + /** + * Parse the location from Registry resource. + * + * @param {string} registryName + * A fully-qualified path representing Registry resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRegistryName(registryName: string) { + return this._pathTemplates.registryPathTemplate.match(registryName) + .location; + } + + /** + * Parse the registry from Registry resource. + * + * @param {string} registryName + * A fully-qualified path representing Registry resource. + * @returns {string} A string representing the registry. + */ + matchRegistryFromRegistryName(registryName: string) { + return this._pathTemplates.registryPathTemplate.match(registryName) + .registry; + } + + /** + * Return a fully-qualified device resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} registry + * @param {string} device + * @returns {string} Resource name string. + */ + devicePath( + project: string, + location: string, + registry: string, + device: string + ) { + return this._pathTemplates.devicePathTemplate.render({ + project, + location, + registry, + device, + }); + } + + /** + * Parse the project from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).project; + } + + /** + * Parse the location from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).location; + } + + /** + * Parse the registry from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the registry. + */ + matchRegistryFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).registry; + } + + /** + * Parse the device from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the device. + */ + matchDeviceFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).device; + } + + /** + * 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.deviceManagerStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-iot/src/v1/device_manager_client_config.json b/packages/google-cloud-iot/src/v1/device_manager_client_config.json index 184e06d89c8..5ded0fd1cb3 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client_config.json +++ b/packages/google-cloud-iot/src/v1/device_manager_client_config.json @@ -2,116 +2,130 @@ "interfaces": { "google.cloud.iot.v1.DeviceManager": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "non_idempotent": [] + "deadline_exceeded_resource_exhausted_unavailable": [ + "DEADLINE_EXCEEDED", + "RESOURCE_EXHAUSTED", + "UNAVAILABLE" + ] }, "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 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "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": { "CreateDeviceRegistry": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetDeviceRegistry": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateDeviceRegistry": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteDeviceRegistry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "timeout_millis": 120000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListDeviceRegistries": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateDevice": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetDevice": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateDevice": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteDevice": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "timeout_millis": 120000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListDevices": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ModifyCloudToDeviceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 120000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListDeviceConfigVersions": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListDeviceStates": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "SetIamPolicy": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetIamPolicy": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "TestIamPermissions": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "SendCommandToDevice": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 120000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "BindDeviceToGateway": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UnbindDeviceFromGateway": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-iot/src/v1/device_manager_proto_list.json b/packages/google-cloud-iot/src/v1/device_manager_proto_list.json index 3fc41c024d4..9dcde512a5b 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_proto_list.json +++ b/packages/google-cloud-iot/src/v1/device_manager_proto_list.json @@ -1,3 +1,4 @@ [ + "../../protos/google/cloud/iot/v1/resources.proto", "../../protos/google/cloud/iot/v1/device_manager.proto" ] diff --git a/packages/google-cloud-iot/src/browser.js b/packages/google-cloud-iot/src/v1/index.ts similarity index 69% rename from packages/google-cloud-iot/src/browser.js rename to packages/google-cloud-iot/src/v1/index.ts index ddbcd7ecb9a..acca752cbd0 100644 --- a/packages/google-cloud-iot/src/browser.js +++ b/packages/google-cloud-iot/src/v1/index.ts @@ -11,11 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -// 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'); +export {DeviceManagerClient} from './device_manager_client'; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a6386b8fd8c..aea974c96c8 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,12 @@ { - "updateTime": "2019-11-19T12:19:00.663698Z", + "updateTime": "2019-12-19T22:16:57.346409Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", - "internalRef": "281088257" + "sha": "0ca305403dcc50e31ad9477c9b6241ddfd2056af", + "internalRef": "286439553" } }, { @@ -30,10 +23,317 @@ "source": "googleapis", "apiName": "iot", "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/iot/artman_cloudiot.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } + ], + "newFiles": [ + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "LICENSE" + }, + { + "path": "codecov.yaml" + }, + { + "path": "renovate.json" + }, + { + "path": "webpack.config.js" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".prettierignore" + }, + { + "path": "README.md" + }, + { + "path": "tslint.json" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": ".prettierrc" + }, + { + "path": "tsconfig.json" + }, + { + "path": ".eslintignore" + }, + { + "path": ".nycrc" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/google/cloud/common_resources.proto" + }, + { + "path": "protos/google/cloud/iot/v1/device_manager.proto" + }, + { + "path": "protos/google/cloud/iot/v1/resources.proto" + }, + { + "path": "test/gapic-device_manager-v1.ts" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "node_modules/protobufjs/cli/package-lock.json" + }, + { + "path": "node_modules/protobufjs/cli/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + }, + { + "path": "samples/README.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": "build/protos/protos.d.ts" + }, + { + "path": "build/protos/protos.json" + }, + { + "path": "build/protos/protos.js" + }, + { + "path": "build/protos/google/cloud/common_resources.proto" + }, + { + "path": "build/protos/google/cloud/iot/v1/device_manager.proto" + }, + { + "path": "build/protos/google/cloud/iot/v1/resources.proto" + }, + { + "path": "build/test/gapic-device_manager-v1.js.map" + }, + { + "path": "build/test/gapic-device_manager-v1.js" + }, + { + "path": "build/test/gapic-device_manager-v1.d.ts" + }, + { + "path": "build/system-test/install.js.map" + }, + { + "path": "build/system-test/install.js" + }, + { + "path": "build/system-test/install.d.ts" + }, + { + "path": "build/src/index.js" + }, + { + "path": "build/src/index.js.map" + }, + { + "path": "build/src/index.d.ts" + }, + { + "path": "build/src/v1/device_manager_client.js" + }, + { + "path": "build/src/v1/device_manager_client_config.d.ts" + }, + { + "path": "build/src/v1/device_manager_client_config.json" + }, + { + "path": "build/src/v1/index.js" + }, + { + "path": "build/src/v1/device_manager_client.js.map" + }, + { + "path": "build/src/v1/index.js.map" + }, + { + "path": "build/src/v1/index.d.ts" + }, + { + "path": "build/src/v1/device_manager_client.d.ts" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": "src/v1/device_manager_proto_list.json" + }, + { + "path": "src/v1/device_manager_client_config.json" + }, + { + "path": "src/v1/device_manager_client.ts" + }, + { + "path": "src/v1/index.ts" + } ] } \ No newline at end of file diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 15a39617694..33374099049 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -21,34 +21,30 @@ logging.basicConfig(level=logging.DEBUG) -gapic = gcp.GAPICGenerator() -library = gapic.node_library( - 'iot', 'v1', - config_path="/google/cloud/iot/" - f"artman_cloudiot.yaml") +gapic = gcp.GAPICMicrogenerator() +versions = ['v1'] + +for version in versions: + library = gapic.typescript_library( + 'iot', + generator_args={ + "grpc-service-config": f"google/cloud/iot/{version}/cloudiot_grpc_service_config.json", + "package-name": f"@google-cloud/iot", + "main-service": f"iot" + }, + proto_path=f'/google/cloud/iot/{version}', + extra_proto_files=['google/cloud/common_resources.proto'], + version=version) # skip index, protos, package.json, and README.md s.copy( library, - excludes=['package.json', 'README.md', 'src/index.js'], + excludes=['package.json', 'README.md', 'src/index.ts'], ) -# Streaming is broken and missing grpc handling -# https://github.com/googleapis/gapic-generator/issues/2152 -s.replace( - 'src/v1/device_manager_client.js', - f'(listDeviceRegistriesStream\(.*\n\s+options = .*\n)(\n\s+return)', - '''\g<1>options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - });\n\g<2>''') - # Copy common templated files common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +templates = common_templates.node_library(source_location='build/src') s.copy(templates) s.replace("src/v1/doc/google/cloud/iot/v1/doc_resources.js", @@ -68,3 +64,4 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-iot/system-test/.eslintrc.yml b/packages/google-cloud-iot/system-test/.eslintrc.yml index 6db2a46c535..dc5d9b0171b 100644 --- a/packages/google-cloud-iot/system-test/.eslintrc.yml +++ b/packages/google-cloud-iot/system-test/.eslintrc.yml @@ -1,3 +1,4 @@ --- env: mocha: true + diff --git a/packages/google-cloud-iot/system-test/none.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js similarity index 57% rename from packages/google-cloud-iot/system-test/none.js rename to packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index b76b906ac7e..e164f5054a0 100644 --- a/packages/google-cloud-iot/system-test/none.js +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/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. @@ -11,9 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + -'use strict'; +/* eslint-disable node/no-missing-require, no-unused-vars */ +const iot = require('@google-cloud/iot'); -// This file is here so lint doesn't fail due to no system tests. This -// file can be deleted once we have system tests. +function main() { + const deviceManagerClient = new iot.DeviceManagerClient(); +} +main(); diff --git a/packages/google-cloud-iot/src/v1/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts similarity index 63% rename from packages/google-cloud-iot/src/v1/index.js rename to packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts index 97521c35a12..97bac1008ca 100644 --- a/packages/google-cloud-iot/src/v1/index.js +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts @@ -11,9 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; +import {DeviceManagerClient} from '@google-cloud/iot'; -const DeviceManagerClient = require('./device_manager_client'); +function main() { + const deviceManagerClient = new DeviceManagerClient(); +} -module.exports.DeviceManagerClient = DeviceManagerClient; +main(); diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts new file mode 100644 index 00000000000..2736aee84f7 --- /dev/null +++ b/packages/google-cloud-iot/system-test/install.ts @@ -0,0 +1,50 @@ +// 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'; + +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-iot/test/gapic-device_manager-v1.ts b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts new file mode 100644 index 00000000000..0610aa9f4df --- /dev/null +++ b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts @@ -0,0 +1,996 @@ +// 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'; +const devicemanagerModule = 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('v1.DeviceManagerClient', () => { + it('has servicePath', () => { + const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = devicemanagerModule.v1.DeviceManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + fallback: true, + }); + assert(client); + }); + describe('createDeviceRegistry', () => { + it('invokes createDeviceRegistry without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createDeviceRegistry(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createDeviceRegistry with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createDeviceRegistry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getDeviceRegistry', () => { + it('invokes getDeviceRegistry without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getDeviceRegistry(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDeviceRegistry with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getDeviceRegistry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateDeviceRegistry', () => { + it('invokes updateDeviceRegistry without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest = {}; + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateDeviceRegistry(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDeviceRegistry with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest = {}; + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateDeviceRegistry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteDeviceRegistry', () => { + it('invokes deleteDeviceRegistry without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteDeviceRegistry(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteDeviceRegistry with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteDeviceRegistry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createDevice', () => { + it('invokes createDevice without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDevice = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createDevice(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createDevice with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createDevice(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getDevice', () => { + it('invokes getDevice without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDevice = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getDevice(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDevice with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getDevice(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateDevice', () => { + it('invokes updateDevice without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest = {}; + request.device = {}; + request.device.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateDevice(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDevice with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest = {}; + request.device = {}; + request.device.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateDevice(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteDevice', () => { + it('invokes deleteDevice without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteDevice(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteDevice with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteDevice(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('modifyCloudToDeviceConfig', () => { + it('invokes modifyCloudToDeviceConfig without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.modifyCloudToDeviceConfig(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes modifyCloudToDeviceConfig with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + client.modifyCloudToDeviceConfig( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('listDeviceConfigVersions', () => { + it('invokes listDeviceConfigVersions without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.listDeviceConfigVersions(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listDeviceConfigVersions with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( + request, + null, + error + ); + client.listDeviceConfigVersions( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('listDeviceStates', () => { + it('invokes listDeviceStates without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.listDeviceStates(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listDeviceStates with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( + request, + null, + error + ); + client.listDeviceStates(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.setIamPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes setIamPolicy with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.setIamPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getIamPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getIamPolicy with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getIamPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.testIamPermissions(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes testIamPermissions with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( + request, + null, + error + ); + client.testIamPermissions(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('sendCommandToDevice', () => { + it('invokes sendCommandToDevice without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.sendCommandToDevice(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes sendCommandToDevice with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( + request, + null, + error + ); + client.sendCommandToDevice(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('bindDeviceToGateway', () => { + it('invokes bindDeviceToGateway without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.bindDeviceToGateway(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes bindDeviceToGateway with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( + request, + null, + error + ); + client.bindDeviceToGateway(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('unbindDeviceFromGateway', () => { + it('invokes unbindDeviceFromGateway without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.unbindDeviceFromGateway(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes unbindDeviceFromGateway with error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( + request, + null, + error + ); + client.unbindDeviceFromGateway( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('listDeviceRegistries', () => { + it('invokes listDeviceRegistries without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDeviceRegistries = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listDeviceRegistries(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listDeviceRegistriesStream', () => { + it('invokes listDeviceRegistriesStream without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDeviceRegistries = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listDeviceRegistriesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); + describe('listDevices', () => { + it('invokes listDevices without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDevices = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listDevices(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listDevicesStream', () => { + it('invokes listDevicesStream without error', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDevices = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listDevicesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); +}); diff --git a/packages/google-cloud-iot/test/gapic-v1.js b/packages/google-cloud-iot/test/gapic-v1.js deleted file mode 100644 index a5e82bbdf77..00000000000 --- a/packages/google-cloud-iot/test/gapic-v1.js +++ /dev/null @@ -1,1366 +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. - -'use strict'; - -const assert = require('assert'); - -const iotModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('DeviceManagerClient', () => { - it('has servicePath', () => { - const servicePath = iotModule.v1.DeviceManagerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = iotModule.v1.DeviceManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = iotModule.v1.DeviceManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new iotModule.v1.DeviceManagerClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new iotModule.v1.DeviceManagerClient({fallback: true}); - assert(client); - }); - - describe('createDeviceRegistry', () => { - it('invokes createDeviceRegistry without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const deviceRegistry = {}; - const request = { - parent: formattedParent, - deviceRegistry: deviceRegistry, - }; - - // Mock response - const id = 'id3355'; - const name = 'name3373707'; - const expectedResponse = { - id: id, - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createDeviceRegistry(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createDeviceRegistry with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const deviceRegistry = {}; - const request = { - parent: formattedParent, - deviceRegistry: deviceRegistry, - }; - - // Mock Grpc layer - client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createDeviceRegistry(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getDeviceRegistry', () => { - it('invokes getDeviceRegistry without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const id = 'id3355'; - const name2 = 'name2-1052831874'; - const expectedResponse = { - id: id, - name: name2, - }; - - // Mock Grpc layer - client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getDeviceRegistry(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDeviceRegistry with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getDeviceRegistry(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateDeviceRegistry', () => { - it('invokes updateDeviceRegistry without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const deviceRegistry = {}; - const updateMask = {}; - const request = { - deviceRegistry: deviceRegistry, - updateMask: updateMask, - }; - - // Mock response - const id = 'id3355'; - const name = 'name3373707'; - const expectedResponse = { - id: id, - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateDeviceRegistry(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDeviceRegistry with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const deviceRegistry = {}; - const updateMask = {}; - const request = { - deviceRegistry: deviceRegistry, - updateMask: updateMask, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateDeviceRegistry(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteDeviceRegistry', () => { - it('invokes deleteDeviceRegistry without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( - request - ); - - client.deleteDeviceRegistry(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteDeviceRegistry with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteDeviceRegistry(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('listDeviceRegistries', () => { - it('invokes listDeviceRegistries without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const deviceRegistriesElement = {}; - const deviceRegistries = [deviceRegistriesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - deviceRegistries: deviceRegistries, - }; - - // Mock Grpc layer - client._innerApiCalls.listDeviceRegistries = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.deviceRegistries); - }; - - client.listDeviceRegistries(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.deviceRegistries); - done(); - }); - }); - - it('invokes listDeviceRegistries with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listDeviceRegistries = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listDeviceRegistries(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createDevice', () => { - it('invokes createDevice without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const device = {}; - const request = { - parent: formattedParent, - device: device, - }; - - // Mock response - const id = 'id3355'; - const name = 'name3373707'; - const numId = 1034366860; - const blocked = true; - const expectedResponse = { - id: id, - name: name, - numId: numId, - blocked: blocked, - }; - - // Mock Grpc layer - client._innerApiCalls.createDevice = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createDevice(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createDevice with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const device = {}; - const request = { - parent: formattedParent, - device: device, - }; - - // Mock Grpc layer - client._innerApiCalls.createDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createDevice(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getDevice', () => { - it('invokes getDevice without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const id = 'id3355'; - const name2 = 'name2-1052831874'; - const numId = 1034366860; - const blocked = true; - const expectedResponse = { - id: id, - name: name2, - numId: numId, - blocked: blocked, - }; - - // Mock Grpc layer - client._innerApiCalls.getDevice = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getDevice(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDevice with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getDevice(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateDevice', () => { - it('invokes updateDevice without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const device = {}; - const updateMask = {}; - const request = { - device: device, - updateMask: updateMask, - }; - - // Mock response - const id = 'id3355'; - const name = 'name3373707'; - const numId = 1034366860; - const blocked = true; - const expectedResponse = { - id: id, - name: name, - numId: numId, - blocked: blocked, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateDevice(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDevice with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const device = {}; - const updateMask = {}; - const request = { - device: device, - updateMask: updateMask, - }; - - // Mock Grpc layer - client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateDevice(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteDevice', () => { - it('invokes deleteDevice without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod(request); - - client.deleteDevice(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteDevice with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteDevice(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('listDevices', () => { - it('invokes listDevices without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const devicesElement = {}; - const devices = [devicesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - devices: devices, - }; - - // Mock Grpc layer - client._innerApiCalls.listDevices = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.devices); - }; - - client.listDevices(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.devices); - done(); - }); - }); - - it('invokes listDevices with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listDevices = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listDevices(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('modifyCloudToDeviceConfig', () => { - it('invokes modifyCloudToDeviceConfig without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const binaryData = '40'; - const request = { - name: formattedName, - binaryData: binaryData, - }; - - // Mock response - const version = 351608024; - const binaryData2 = '-37'; - const expectedResponse = { - version: version, - binaryData: binaryData2, - }; - - // Mock Grpc layer - client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.modifyCloudToDeviceConfig(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes modifyCloudToDeviceConfig with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const binaryData = '40'; - const request = { - name: formattedName, - binaryData: binaryData, - }; - - // Mock Grpc layer - client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.modifyCloudToDeviceConfig(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listDeviceConfigVersions', () => { - it('invokes listDeviceConfigVersions without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.listDeviceConfigVersions(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listDeviceConfigVersions with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listDeviceConfigVersions(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listDeviceStates', () => { - it('invokes listDeviceStates without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.listDeviceStates(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listDeviceStates with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listDeviceStates(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const resource = 'resource-341064690'; - const policy = {}; - const request = { - resource: resource, - policy: policy, - }; - - // Mock response - const version = 351608024; - const etag = '21'; - const expectedResponse = { - version: version, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.setIamPolicy(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes setIamPolicy with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const resource = 'resource-341064690'; - const policy = {}; - const request = { - resource: resource, - policy: policy, - }; - - // Mock Grpc layer - client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.setIamPolicy(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const resource = 'resource-341064690'; - const request = { - resource: resource, - }; - - // Mock response - const version = 351608024; - const etag = '21'; - const expectedResponse = { - version: version, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getIamPolicy(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getIamPolicy with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const resource = 'resource-341064690'; - const request = { - resource: resource, - }; - - // Mock Grpc layer - client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getIamPolicy(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const resource = 'resource-341064690'; - const permissions = []; - const request = { - resource: resource, - permissions: permissions, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.testIamPermissions(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes testIamPermissions with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const resource = 'resource-341064690'; - const permissions = []; - const request = { - resource: resource, - permissions: permissions, - }; - - // Mock Grpc layer - client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.testIamPermissions(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('sendCommandToDevice', () => { - it('invokes sendCommandToDevice without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const binaryData = '40'; - const request = { - name: formattedName, - binaryData: binaryData, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.sendCommandToDevice(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes sendCommandToDevice with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.devicePath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - const binaryData = '40'; - const request = { - name: formattedName, - binaryData: binaryData, - }; - - // Mock Grpc layer - client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.sendCommandToDevice(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('bindDeviceToGateway', () => { - it('invokes bindDeviceToGateway without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const gatewayId = 'gatewayId955798774'; - const deviceId = 'deviceId25209764'; - const request = { - parent: formattedParent, - gatewayId: gatewayId, - deviceId: deviceId, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.bindDeviceToGateway(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes bindDeviceToGateway with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const gatewayId = 'gatewayId955798774'; - const deviceId = 'deviceId25209764'; - const request = { - parent: formattedParent, - gatewayId: gatewayId, - deviceId: deviceId, - }; - - // Mock Grpc layer - client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.bindDeviceToGateway(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('unbindDeviceFromGateway', () => { - it('invokes unbindDeviceFromGateway without error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const gatewayId = 'gatewayId955798774'; - const deviceId = 'deviceId25209764'; - const request = { - parent: formattedParent, - gatewayId: gatewayId, - deviceId: deviceId, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.unbindDeviceFromGateway(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes unbindDeviceFromGateway with error', done => { - const client = new iotModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.registryPath( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]' - ); - const gatewayId = 'gatewayId955798774'; - const deviceId = 'deviceId25209764'; - const request = { - parent: formattedParent, - gatewayId: gatewayId, - deviceId: deviceId, - }; - - // Mock Grpc layer - client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.unbindDeviceFromGateway(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-iot/tsconfig.json b/packages/google-cloud-iot/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-cloud-iot/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-iot/tslint.json b/packages/google-cloud-iot/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/packages/google-cloud-iot/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} diff --git a/packages/google-cloud-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js index d61a0c83160..42c3e36a6a5 100644 --- a/packages/google-cloud-iot/webpack.config.js +++ b/packages/google-cloud-iot/webpack.config.js @@ -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: 'iot', filename: './iot.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 27f2763b67241ea9ce80daec8b1aa6c85bd543f6 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 26 Dec 2019 11:46:53 -0500 Subject: [PATCH 150/370] docs: update jsdoc license/samples-README (#238) --- packages/google-cloud-iot/.jsdoc.js | 29 ++++++++++----------- packages/google-cloud-iot/samples/README.md | 10 +++++-- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 5b86f31a3ad..a533053a3e8 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index 74fa8fb6929..30a621cb0a6 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -21,6 +21,12 @@ Before running the samples, make sure you've followed the steps outlined in [Using the client library](https://github.com/googleapis/nodejs-iot#using-the-client-library). +`cd samples` + +`npm install` + +`cd ..` + ## Samples @@ -34,7 +40,7 @@ View the [source code](https://github.com/googleapis/nodejs-iot/blob/master/samp __Usage:__ -`node quickstart.js` +`node samples/quickstart.js` @@ -43,4 +49,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-iot&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/iot \ No newline at end of file +[product-docs]: https://cloud.google.com/iot From 8e0743576e34a3f3ee7eda7e6f32035440d344b1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 26 Dec 2019 23:17:25 +0200 Subject: [PATCH 151/370] chore(deps): update dependency c8 to v7 (#240) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 19dbbb8839b..08b53b53fb0 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@types/mocha": "^5.2.5", "@types/node": "^12.0.0", - "c8": "^6.0.0", + "c8": "^7.0.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", From 810c1afd25a5b7259a9557d3f9319f71851f4b02 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 27 Dec 2019 17:07:02 +0200 Subject: [PATCH 152/370] chore(deps): update dependency eslint-plugin-node to v11 (#241) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 08b53b53fb0..15252f8ef1d 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -49,7 +49,7 @@ "c8": "^7.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", "gts": "^1.0.0", From e65f7fd63d8f979bc22f45529befca2d515c8b3d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Dec 2019 11:35:58 -0800 Subject: [PATCH 153/370] refactor: use explicit mocha imports --- packages/google-cloud-iot/samples/test/quickstart.test.js | 1 + packages/google-cloud-iot/smoke-test/.eslintrc.yml | 2 -- packages/google-cloud-iot/system-test/.eslintrc.yml | 4 ---- packages/google-cloud-iot/test/.eslintrc.yml | 3 --- packages/google-cloud-iot/test/gapic-device_manager-v1.ts | 1 + 5 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 packages/google-cloud-iot/system-test/.eslintrc.yml delete mode 100644 packages/google-cloud-iot/test/.eslintrc.yml diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 18d79ae84a7..90b3516114b 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/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 execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); diff --git a/packages/google-cloud-iot/smoke-test/.eslintrc.yml b/packages/google-cloud-iot/smoke-test/.eslintrc.yml index 2e6882e46d2..5adab99ca15 100644 --- a/packages/google-cloud-iot/smoke-test/.eslintrc.yml +++ b/packages/google-cloud-iot/smoke-test/.eslintrc.yml @@ -1,6 +1,4 @@ --- -env: - mocha: true rules: node/no-unpublished-require: off no-console: off diff --git a/packages/google-cloud-iot/system-test/.eslintrc.yml b/packages/google-cloud-iot/system-test/.eslintrc.yml deleted file mode 100644 index dc5d9b0171b..00000000000 --- a/packages/google-cloud-iot/system-test/.eslintrc.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -env: - mocha: true - diff --git a/packages/google-cloud-iot/test/.eslintrc.yml b/packages/google-cloud-iot/test/.eslintrc.yml deleted file mode 100644 index 6db2a46c535..00000000000 --- a/packages/google-cloud-iot/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -env: - mocha: true diff --git a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts index 0610aa9f4df..765169466ac 100644 --- a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts +++ b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts @@ -18,6 +18,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; const devicemanagerModule = require('../src'); const FAKE_STATUS_CODE = 1; From 233e60400549858b6d7dfe9c7eb7e953043e5946 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Jan 2020 19:08:26 -0800 Subject: [PATCH 154/370] docs: updating README for samples Co-authored-by: Alexander Fenster --- packages/google-cloud-iot/synth.metadata | 3479 +++++++++++++++++++++- 1 file changed, 3397 insertions(+), 82 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index aea974c96c8..01acaaf67b9 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-19T22:16:57.346409Z", + "updateTime": "2019-12-21T12:18:33.610522Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0ca305403dcc50e31ad9477c9b6241ddfd2056af", - "internalRef": "286439553" + "sha": "1a380ea21dea9b6ac6ad28c60ad96d9d73574e19", + "internalRef": "286616241" } }, { @@ -30,130 +30,157 @@ ], "newFiles": [ { - "path": "CODE_OF_CONDUCT.md" + "path": ".repo-metadata.json" }, { - "path": ".eslintrc.yml" + "path": ".readme-partials.yaml" }, { - "path": "LICENSE" + "path": "README.md" }, { - "path": "codecov.yaml" + "path": "package.json" }, { - "path": "renovate.json" + "path": "CHANGELOG.md" + }, + { + "path": ".gitignore" + }, + { + "path": "CODE_OF_CONDUCT.md" }, { "path": "webpack.config.js" }, { - "path": ".jsdoc.js" + "path": "CONTRIBUTING.md" }, { - "path": ".prettierignore" + "path": ".prettierrc" }, { - "path": "README.md" + "path": "package-lock.json" }, { - "path": "tslint.json" + "path": ".eslintignore" }, { - "path": "CONTRIBUTING.md" + "path": "linkinator.config.json" }, { - "path": ".prettierrc" + "path": ".eslintrc.yml" }, { - "path": "tsconfig.json" + "path": "renovate.json" }, { - "path": ".eslintignore" + "path": "synth.metadata" + }, + { + "path": ".prettierignore" + }, + { + "path": "synth.py" + }, + { + "path": "codecov.yaml" + }, + { + "path": "tslint.json" + }, + { + "path": ".jsdoc.js" + }, + { + "path": "LICENSE" }, { "path": ".nycrc" }, { - "path": "linkinator.config.json" + "path": "tsconfig.json" }, { - "path": "protos/protos.d.ts" + "path": "src/index.ts" }, { - "path": "protos/protos.json" + "path": "src/v1/device_manager_proto_list.json" }, { - "path": "protos/protos.js" + "path": "src/v1/index.ts" }, { - "path": "protos/google/cloud/common_resources.proto" + "path": "src/v1/device_manager_client_config.json" }, { - "path": "protos/google/cloud/iot/v1/device_manager.proto" + "path": "src/v1/device_manager_client.ts" }, { - "path": "protos/google/cloud/iot/v1/resources.proto" + "path": "src/v1/doc/google/type/doc_expr.js" }, { - "path": "test/gapic-device_manager-v1.ts" + "path": "src/v1/doc/google/rpc/doc_status.js" }, { - "path": "system-test/.eslintrc.yml" + "path": "src/v1/doc/google/cloud/iot/v1/doc_device_manager.js" }, { - "path": "system-test/install.ts" + "path": "src/v1/doc/google/cloud/iot/v1/doc_resources.js" }, { - "path": "system-test/fixtures/sample/src/index.js" + "path": "src/v1/doc/google/iam/v1/doc_policy.js" }, { - "path": "system-test/fixtures/sample/src/index.ts" + "path": "src/v1/doc/google/iam/v1/doc_options.js" }, { - "path": "node_modules/protobufjs/cli/package-lock.json" + "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" }, { - "path": "node_modules/protobufjs/cli/package.json" + "path": "src/v1/doc/google/protobuf/doc_any.js" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + "path": "src/v1/doc/google/protobuf/doc_field_mask.js" }, { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + "path": "src/v1/doc/google/protobuf/doc_timestamp.js" }, { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + "path": "src/v1/doc/google/protobuf/doc_empty.js" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + "path": "build/src/index.d.ts" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + "path": "build/src/index.js.map" }, { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + "path": "build/src/index.js" }, { - "path": "samples/README.md" + "path": "build/src/v1/index.d.ts" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "build/src/v1/index.js.map" }, { - "path": ".github/release-please.yml" + "path": "build/src/v1/device_manager_client.d.ts" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "build/src/v1/device_manager_client.js" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "build/src/v1/device_manager_client_config.json" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "build/src/v1/index.js" }, { - "path": "build/protos/protos.d.ts" + "path": "build/src/v1/device_manager_client_config.d.ts" + }, + { + "path": "build/src/v1/device_manager_client.js.map" }, { "path": "build/protos/protos.json" @@ -161,6 +188,9 @@ { "path": "build/protos/protos.js" }, + { + "path": "build/protos/protos.d.ts" + }, { "path": "build/protos/google/cloud/common_resources.proto" }, @@ -182,99 +212,138 @@ { "path": "build/system-test/install.js.map" }, + { + "path": "build/system-test/install.d.ts" + }, { "path": "build/system-test/install.js" }, { - "path": "build/system-test/install.d.ts" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": "build/src/index.js" + "path": "samples/README.md" }, { - "path": "build/src/index.js.map" + "path": "samples/package.json" }, { - "path": "build/src/index.d.ts" + "path": "samples/.eslintrc.yml" }, { - "path": "build/src/v1/device_manager_client.js" + "path": "samples/quickstart.js" }, { - "path": "build/src/v1/device_manager_client_config.d.ts" + "path": "samples/test/quickstart.test.js" }, { - "path": "build/src/v1/device_manager_client_config.json" + "path": "samples/test/.eslintrc.yml" }, { - "path": "build/src/v1/index.js" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "build/src/v1/device_manager_client.js.map" + "path": ".github/release-please.yml" }, { - "path": "build/src/v1/index.js.map" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": "build/src/v1/index.d.ts" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "build/src/v1/device_manager_client.d.ts" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": ".kokoro/test.bat" + "path": ".kokoro/test.sh" }, { - "path": ".kokoro/system-test.sh" + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/.gitattributes" }, { "path": ".kokoro/trampoline.sh" }, { - "path": ".kokoro/samples-test.sh" + "path": ".kokoro/lint.sh" }, { "path": ".kokoro/publish.sh" }, { - "path": ".kokoro/lint.sh" + "path": ".kokoro/test.bat" }, { "path": ".kokoro/common.cfg" }, { - "path": ".kokoro/test.sh" + "path": ".kokoro/system-test.sh" }, { - "path": ".kokoro/docs.sh" + "path": ".kokoro/release/docs.cfg" }, { - "path": ".kokoro/release/docs.cfg" + "path": ".kokoro/release/docs.sh" }, { "path": ".kokoro/release/publish.cfg" }, { - "path": ".kokoro/release/docs.sh" + "path": ".kokoro/release/common.cfg" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" }, { "path": ".kokoro/presubmit/node10/lint.cfg" }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, { "path": ".kokoro/presubmit/node8/test.cfg" }, @@ -294,46 +363,3292 @@ "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": "protos/protos.json" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": "protos/protos.js" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": "protos/protos.d.ts" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "protos/google/cloud/common_resources.proto" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": "protos/google/cloud/iot/v1/device_manager.proto" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": "protos/google/cloud/iot/v1/resources.proto" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": ".git/packed-refs" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": ".git/HEAD" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": ".git/config" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": ".git/index" }, { - "path": "src/v1/device_manager_proto_list.json" + "path": ".git/shallow" }, { - "path": "src/v1/device_manager_client_config.json" + "path": ".git/logs/HEAD" }, { - "path": "src/v1/device_manager_client.ts" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "src/v1/index.ts" + "path": ".git/logs/refs/heads/autosynth" + }, + { + "path": ".git/logs/refs/heads/master" + }, + { + "path": ".git/refs/remotes/origin/HEAD" + }, + { + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/objects/pack/pack-b55088941be68b91ddc4cfb2546f4e2827efecdb.pack" + }, + { + "path": ".git/objects/pack/pack-b55088941be68b91ddc4cfb2546f4e2827efecdb.idx" + }, + { + "path": "test/.eslintrc.yml" + }, + { + "path": "test/gapic-device_manager-v1.ts" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "node_modules/strip-bom/package.json" + }, + { + "path": "node_modules/string-width/package.json" + }, + { + "path": "node_modules/is-callable/package.json" + }, + { + "path": "node_modules/copy-descriptor/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/gts/package.json" + }, + { + "path": "node_modules/gts/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-name/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/gts/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/gts/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/gts/node_modules/chalk/package.json" + }, + { + "path": "node_modules/require-directory/package.json" + }, + { + "path": "node_modules/update-notifier/package.json" + }, + { + "path": "node_modules/esprima/package.json" + }, + { + "path": "node_modules/string_decoder/package.json" + }, + { + "path": "node_modules/mocha/package.json" + }, + { + "path": "node_modules/mocha/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/mocha/node_modules/find-up/package.json" + }, + { + "path": "node_modules/mocha/node_modules/diff/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/mocha/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/mocha/node_modules/which/package.json" + }, + { + "path": "node_modules/mocha/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/mocha/node_modules/glob/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ms/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs/package.json" + }, + { + "path": "node_modules/arr-diff/package.json" + }, + { + "path": "node_modules/is-arguments/package.json" + }, + { + "path": "node_modules/loader-utils/package.json" + }, + { + "path": "node_modules/core-util-is/package.json" + }, + { + "path": "node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/minimist-options/package.json" + }, + { + "path": "node_modules/minimist-options/node_modules/arrify/package.json" + }, + { + "path": "node_modules/underscore/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/domain-browser/package.json" + }, + { + "path": "node_modules/minimalistic-crypto-utils/package.json" + }, + { + "path": "node_modules/walkdir/package.json" + }, + { + "path": "node_modules/@protobufjs/codegen/package.json" + }, + { + "path": "node_modules/@protobufjs/inquire/package.json" + }, + { + "path": "node_modules/@protobufjs/float/package.json" + }, + { + "path": "node_modules/@protobufjs/base64/package.json" + }, + { + "path": "node_modules/@protobufjs/aspromise/package.json" + }, + { + "path": "node_modules/@protobufjs/eventemitter/package.json" + }, + { + "path": "node_modules/@protobufjs/fetch/package.json" + }, + { + "path": "node_modules/@protobufjs/utf8/package.json" + }, + { + "path": "node_modules/@protobufjs/path/package.json" + }, + { + "path": "node_modules/@protobufjs/pool/package.json" + }, + { + "path": "node_modules/global-dirs/package.json" + }, + { + "path": "node_modules/has-flag/package.json" + }, + { + "path": "node_modules/locate-path/package.json" + }, + { + "path": "node_modules/empower-assert/package.json" + }, + { + "path": "node_modules/convert-source-map/package.json" + }, + { + "path": "node_modules/terser/package.json" + }, + { + "path": "node_modules/terser/node_modules/source-map-support/package.json" + }, + { + "path": "node_modules/minimalistic-assert/package.json" + }, + { + "path": "node_modules/require-main-filename/package.json" + }, + { + "path": "node_modules/bluebird/package.json" + }, + { + "path": "node_modules/string.prototype.trimleft/package.json" + }, + { + "path": "node_modules/range-parser/package.json" + }, + { + "path": "node_modules/espower-loader/package.json" + }, + { + "path": "node_modules/null-loader/package.json" + }, + { + "path": "node_modules/defer-to-connect/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/indent-string/package.json" + }, + { + "path": "node_modules/detect-file/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "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/CHANGELOG.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/path-key/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/shebang-command/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/package.json" + }, + { + "path": "node_modules/got/package.json" + }, + { + "path": "node_modules/got/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/prr/package.json" + }, + { + "path": "node_modules/mdurl/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + }, + { + "path": "node_modules/setimmediate/package.json" + }, + { + "path": "node_modules/diffie-hellman/package.json" + }, + { + "path": "node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/pascalcase/package.json" + }, + { + "path": "node_modules/emojis-list/package.json" + }, + { + "path": "node_modules/https-browserify/package.json" + }, + { + "path": "node_modules/assign-symbols/package.json" + }, + { + "path": "node_modules/browserify-aes/package.json" + }, + { + "path": "node_modules/type-name/package.json" + }, + { + "path": "node_modules/os-locale/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/os-locale/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/semver/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/path-key/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/which/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/execa/package.json" + }, + { + "path": "node_modules/lodash/package.json" + }, + { + "path": "node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/safe-buffer/package.json" + }, + { + "path": "node_modules/@szmarczak/http-timer/package.json" + }, + { + "path": "node_modules/parent-module/package.json" + }, + { + "path": "node_modules/object-keys/package.json" + }, + { + "path": "node_modules/split-string/package.json" + }, + { + "path": "node_modules/base/package.json" + }, + { + "path": "node_modules/base/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/base/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/base/node_modules/define-property/package.json" + }, + { + "path": "node_modules/write/package.json" + }, + { + "path": "node_modules/configstore/package.json" + }, + { + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/configstore/node_modules/pify/package.json" + }, + { + "path": "node_modules/configstore/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + }, + { + "path": "node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/tsutils/package.json" + }, + { + "path": "node_modules/npm-bundled/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/browserify-des/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/strip-ansi/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/readdirp/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/braces/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/readdirp/node_modules/is-number/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/cache-base/package.json" + }, + { + "path": "node_modules/is-promise/package.json" + }, + { + "path": "node_modules/parallel-transform/package.json" + }, + { + "path": "node_modules/es6-map/package.json" + }, + { + "path": "node_modules/p-finally/package.json" + }, + { + "path": "node_modules/snapdragon-node/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" + }, + { + "path": "node_modules/browserify-cipher/package.json" + }, + { + "path": "node_modules/es6-set/package.json" + }, + { + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/array-find/package.json" + }, + { + "path": "node_modules/arr-flatten/package.json" + }, + { + "path": "node_modules/evp_bytestokey/package.json" + }, + { + "path": "node_modules/js2xmlparser/package.json" + }, + { + "path": "node_modules/has-value/package.json" + }, + { + "path": "node_modules/istanbul-reports/package.json" + }, + { + "path": "node_modules/tty-browserify/package.json" + }, + { + "path": "node_modules/get-value/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-gen/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-fsm/package.json" + }, + { + "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" + }, + { + "path": "node_modules/@webassemblyjs/ast/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wast-printer/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-module-context/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-edit/package.json" + }, + { + "path": "node_modules/@webassemblyjs/leb128/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wast-parser/package.json" + }, + { + "path": "node_modules/@webassemblyjs/ieee754/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-opt/package.json" + }, + { + "path": "node_modules/@webassemblyjs/utf8/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-buffer/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-parser/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-api-error/package.json" + }, + { + "path": "node_modules/indexof/package.json" + }, + { + "path": "node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/progress/package.json" + }, + { + "path": "node_modules/registry-url/package.json" + }, + { + "path": "node_modules/google-gax/package.json" + }, + { + "path": "node_modules/class-utils/package.json" + }, + { + "path": "node_modules/class-utils/node_modules/define-property/package.json" + }, + { + "path": "node_modules/mimic-response/package.json" + }, + { + "path": "node_modules/figures/package.json" + }, + { + "path": "node_modules/eslint-config-prettier/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/type/package.json" + }, + { + "path": "node_modules/domhandler/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/to-object-path/package.json" + }, + { + "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/to-object-path/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/errno/package.json" + }, + { + "path": "node_modules/ansi-colors/package.json" + }, + { + "path": "node_modules/safer-buffer/package.json" + }, + { + "path": "node_modules/object.pick/package.json" + }, + { + "path": "node_modules/type-fest/package.json" + }, + { + "path": "node_modules/posix-character-classes/package.json" + }, + { + "path": "node_modules/strip-indent/package.json" + }, + { + "path": "node_modules/boxen/package.json" + }, + { + "path": "node_modules/boxen/node_modules/type-fest/package.json" + }, + { + "path": "node_modules/flat-cache/package.json" + }, + { + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/process/package.json" + }, + { + "path": "node_modules/querystring-es3/package.json" + }, + { + "path": "node_modules/ripemd160/package.json" + }, + { + "path": "node_modules/findup-sync/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/braces/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/findup-sync/node_modules/is-number/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/has-symbols/package.json" + }, + { + "path": "node_modules/gcp-metadata/package.json" + }, + { + "path": "node_modules/ansi-align/package.json" + }, + { + "path": "node_modules/find-up/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" + }, + { + "path": "node_modules/merge-estraverse-visitors/package.json" + }, + { + "path": "node_modules/is-extglob/package.json" + }, + { + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + }, + { + "path": "node_modules/prettier/package.json" + }, + { + "path": "node_modules/jsonexport/package.json" + }, + { + "path": "node_modules/watchpack/package.json" + }, + { + "path": "node_modules/.bin/sha.js" + }, + { + "path": "node_modules/safe-regex/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/npm-run-path/package.json" + }, + { + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + }, + { + "path": "node_modules/mississippi/package.json" + }, + { + "path": "node_modules/mississippi/node_modules/through2/package.json" + }, + { + "path": "node_modules/promise-inflight/package.json" + }, + { + "path": "node_modules/browserify-sign/package.json" + }, + { + "path": "node_modules/map-obj/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/pbkdf2/package.json" + }, + { + "path": "node_modules/stream-http/package.json" + }, + { + "path": "node_modules/destroy/package.json" + }, + { + "path": "node_modules/growl/package.json" + }, + { + "path": "node_modules/flush-write-stream/package.json" + }, + { + "path": "node_modules/json-schema-traverse/package.json" + }, + { + "path": "node_modules/npm-packlist/package.json" + }, + { + "path": "node_modules/taffydb/package.json" + }, + { + "path": "node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/loud-rejection/package.json" + }, + { + "path": "node_modules/is-glob/package.json" + }, + { + "path": "node_modules/get-stream/package.json" + }, + { + "path": "node_modules/uglify-js/package.json" + }, + { + "path": "node_modules/minipass/package.json" + }, + { + "path": "node_modules/minipass/node_modules/yallist/package.json" + }, + { + "path": "node_modules/repeat-element/package.json" + }, + { + "path": "node_modules/optimist/package.json" + }, + { + "path": "node_modules/empower/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/is-ci/package.json" + }, + { + "path": "node_modules/server-destroy/package.json" + }, + { + "path": "node_modules/copy-concurrently/package.json" + }, + { + "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/import-local/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/iferr/package.json" + }, + { + "path": "node_modules/core-js/package.json" + }, + { + "path": "node_modules/set-blocking/package.json" + }, + { + "path": "node_modules/p-defer/package.json" + }, + { + "path": "node_modules/create-hmac/package.json" + }, + { + "path": "node_modules/next-tick/package.json" + }, + { + "path": "node_modules/catharsis/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/agent-base/package.json" + }, + { + "path": "node_modules/json-bigint/package.json" + }, + { + "path": "node_modules/spdx-exceptions/package.json" + }, + { + "path": "node_modules/color-name/package.json" + }, + { + "path": "node_modules/through/package.json" + }, + { + "path": "node_modules/braces/package.json" + }, + { + "path": "node_modules/jws/package.json" + }, + { + "path": "node_modules/inquirer/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/urix/package.json" + }, + { + "path": "node_modules/etag/package.json" + }, + { + "path": "node_modules/power-assert-formatter/package.json" + }, + { + "path": "node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/text-table/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/escope/package.json" + }, + { + "path": "node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/builtin-status-codes/package.json" + }, + { + "path": "node_modules/memory-fs/package.json" + }, + { + "path": "node_modules/redent/package.json" + }, + { + "path": "node_modules/schema-utils/package.json" + }, + { + "path": "node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/esrecurse/package.json" + }, + { + "path": "node_modules/tslint/package.json" + }, + { + "path": "node_modules/tslint/node_modules/semver/package.json" + }, + { + "path": "node_modules/decamelize/package.json" + }, + { + "path": "node_modules/parse-json/package.json" + }, + { + "path": "node_modules/mime/package.json" + }, + { + "path": "node_modules/google-auth-library/package.json" + }, + { + "path": "node_modules/decode-uri-component/package.json" + }, + { + "path": "node_modules/randomfill/package.json" + }, + { + "path": "node_modules/ignore/package.json" + }, + { + "path": "node_modules/loader-runner/package.json" + }, + { + "path": "node_modules/homedir-polyfill/package.json" + }, + { + "path": "node_modules/depd/package.json" + }, + { + "path": "node_modules/union-value/package.json" + }, + { + "path": "node_modules/camelcase-keys/package.json" + }, + { + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/ansi-escapes/package.json" + }, + { + "path": "node_modules/concat-stream/package.json" + }, + { + "path": "node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/expand-brackets/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/define-property/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/ms/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/debug/package.json" + }, + { + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/end-of-stream/package.json" + }, + { + "path": "node_modules/diff-match-patch/package.json" + }, + { + "path": "node_modules/big.js/package.json" + }, + { + "path": "node_modules/amdefine/package.json" + }, + { + "path": "node_modules/event-emitter/package.json" + }, + { + "path": "node_modules/has-values/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/has-values/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-number/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/is-windows/package.json" + }, + { + "path": "node_modules/diff/package.json" + }, + { + "path": "node_modules/tmp/package.json" + }, + { + "path": "node_modules/public-encrypt/package.json" + }, + { + "path": "node_modules/source-map/package.json" + }, + { + "path": "node_modules/is-obj/package.json" + }, + { + "path": "node_modules/asn1.js/package.json" + }, + { + "path": "node_modules/buffer/package.json" + }, + { + "path": "node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/es-abstract/package.json" + }, + { + "path": "node_modules/linkinator/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-name/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/chalk/package.json" + }, + { + "path": "node_modules/import-lazy/package.json" + }, + { + "path": "node_modules/inflight/package.json" + }, + { + "path": "node_modules/use/package.json" + }, + { + "path": "node_modules/concat-map/package.json" + }, + { + "path": "node_modules/browserify-rsa/package.json" + }, + { + "path": "node_modules/object.assign/package.json" + }, + { + "path": "node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/hash.js/package.json" + }, + { + "path": "node_modules/expand-tilde/package.json" + }, + { + "path": "node_modules/semver/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + }, + { + "path": "node_modules/ts-loader/package.json" + }, + { + "path": "node_modules/is-typedarray/package.json" + }, + { + "path": "node_modules/resolve-cwd/package.json" + }, + { + "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/htmlparser2/package.json" + }, + { + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/cli-boxes/package.json" + }, + { + "path": "node_modules/supports-color/package.json" + }, + { + "path": "node_modules/path-key/package.json" + }, + { + "path": "node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/rc/package.json" + }, + { + "path": "node_modules/rc/node_modules/minimist/package.json" + }, + { + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/yargs-unparser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + }, + { + "path": "node_modules/worker-farm/package.json" + }, + { + "path": "node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/abort-controller/package.json" + }, + { + "path": "node_modules/http-errors/package.json" + }, + { + "path": "node_modules/marked/package.json" + }, + { + "path": "node_modules/is-plain-obj/package.json" + }, + { + "path": "node_modules/minimatch/package.json" + }, + { + "path": "node_modules/parse-asn1/package.json" + }, + { + "path": "node_modules/send/package.json" + }, + { + "path": "node_modules/send/node_modules/mime/package.json" + }, + { + "path": "node_modules/send/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + }, + { + "path": "node_modules/css-select/package.json" + }, + { + "path": "node_modules/uri-js/package.json" + }, + { + "path": "node_modules/google-p12-pem/package.json" + }, + { + "path": "node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/component-emitter/package.json" + }, + { + "path": "node_modules/hmac-drbg/package.json" + }, + { + "path": "node_modules/npm-normalize-package-bin/package.json" + }, + { + "path": "node_modules/spdx-license-ids/package.json" + }, + { + "path": "node_modules/yallist/package.json" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/hosted-git-info/package.json" + }, + { + "path": "node_modules/package-json/package.json" + }, + { + "path": "node_modules/from2/package.json" + }, + { + "path": "node_modules/elliptic/package.json" + }, + { + "path": "node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/array-unique/package.json" + }, + { + "path": "node_modules/external-editor/package.json" + }, + { + "path": "node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/lodash.camelcase/package.json" + }, + { + "path": "node_modules/path-dirname/package.json" + }, + { + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/parseurl/package.json" + }, + { + "path": "node_modules/boolbase/package.json" + }, + { + "path": "node_modules/cliui/package.json" + }, + { + "path": "node_modules/balanced-match/package.json" + }, + { + "path": "node_modules/acorn/package.json" + }, + { + "path": "node_modules/stream-browserify/package.json" + }, + { + "path": "node_modules/load-json-file/package.json" + }, + { + "path": "node_modules/load-json-file/node_modules/pify/package.json" + }, + { + "path": "node_modules/builtin-modules/package.json" + }, + { + "path": "node_modules/chokidar/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/braces/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/is-number/package.json" + }, + { + "path": "node_modules/atob/package.json" + }, + { + "path": "node_modules/mamacro/package.json" + }, + { + "path": "node_modules/snapdragon/README.md" + }, + { + "path": "node_modules/snapdragon/package.json" + }, + { + "path": "node_modules/snapdragon/index.js" + }, + { + "path": "node_modules/snapdragon/LICENSE" + }, + { + "path": "node_modules/snapdragon/lib/compiler.js" + }, + { + "path": "node_modules/snapdragon/lib/position.js" + }, + { + "path": "node_modules/snapdragon/lib/parser.js" + }, + { + "path": "node_modules/snapdragon/lib/source-maps.js" + }, + { + "path": "node_modules/snapdragon/lib/utils.js" + }, + { + "path": "node_modules/snapdragon/node_modules/source-map/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/define-property/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/ms/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/debug/package.json" + }, + { + "path": "node_modules/widest-line/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/string-width/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/which/package.json" + }, + { + "path": "node_modules/@bcoe/v8-coverage/package.json" + }, + { + "path": "node_modules/assert/package.json" + }, + { + "path": "node_modules/assert/node_modules/inherits/package.json" + }, + { + "path": "node_modules/assert/node_modules/util/package.json" + }, + { + "path": "node_modules/prettier-linter-helpers/package.json" + }, + { + "path": "node_modules/object-inspect/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/is-arrayish/package.json" + }, + { + "path": "node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/clone-response/package.json" + }, + { + "path": "node_modules/ssri/package.json" + }, + { + "path": "node_modules/deep-is/package.json" + }, + { + "path": "node_modules/@xtuc/ieee754/package.json" + }, + { + "path": "node_modules/@xtuc/long/package.json" + }, + { + "path": "node_modules/regexpp/package.json" + }, + { + "path": "node_modules/sha.js/README.md" + }, + { + "path": "node_modules/sha.js/package.json" + }, + { + "path": "node_modules/sha.js/hash.js" + }, + { + "path": "node_modules/sha.js/.travis.yml" + }, + { + "path": "node_modules/sha.js/sha224.js" + }, + { + "path": "node_modules/sha.js/sha512.js" + }, + { + "path": "node_modules/sha.js/bin.js" + }, + { + "path": "node_modules/sha.js/sha.js" + }, + { + "path": "node_modules/sha.js/index.js" + }, + { + "path": "node_modules/sha.js/sha384.js" + }, + { + "path": "node_modules/sha.js/sha1.js" + }, + { + "path": "node_modules/sha.js/sha256.js" + }, + { + "path": "node_modules/sha.js/LICENSE" + }, + { + "path": "node_modules/sha.js/test/vectors.js" + }, + { + "path": "node_modules/sha.js/test/test.js" + }, + { + "path": "node_modules/sha.js/test/hash.js" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/pako/package.json" + }, + { + "path": "node_modules/power-assert/package.json" + }, + { + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/ignore-walk/package.json" + }, + { + "path": "node_modules/finalhandler/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/ms/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/debug/package.json" + }, + { + "path": "node_modules/source-map-support/package.json" + }, + { + "path": "node_modules/source-map-support/node_modules/source-map/package.json" + }, + { + "path": "node_modules/buffer-equal-constant-time/package.json" + }, + { + "path": "node_modules/source-map-resolve/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/binary-extensions/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/kind-of/package.json" + }, + { + "path": "node_modules/power-assert-util-string-width/package.json" + }, + { + "path": "node_modules/ajv-keywords/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/linkify-it/package.json" + }, + { + "path": "node_modules/url/package.json" + }, + { + "path": "node_modules/url/node_modules/punycode/package.json" + }, + { + "path": "node_modules/async-each/package.json" + }, + { + "path": "node_modules/minimist/package.json" + }, + { + "path": "node_modules/buffer-xor/package.json" + }, + { + "path": "node_modules/fresh/package.json" + }, + { + "path": "node_modules/power-assert-context-formatter/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/call-matcher/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/slice-ansi/package.json" + }, + { + "path": "node_modules/onetime/package.json" + }, + { + "path": "node_modules/spdx-correct/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/callsites/package.json" + }, + { + "path": "node_modules/power-assert-renderer-assertion/package.json" + }, + { + "path": "node_modules/pify/package.json" + }, + { + "path": "node_modules/source-map-url/package.json" + }, + { + "path": "node_modules/snapdragon-util/package.json" + }, + { + "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/stream-shift/package.json" + }, + { + "path": "node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/escodegen/package.json" + }, + { + "path": "node_modules/escodegen/node_modules/esprima/package.json" + }, + { + "path": "node_modules/entities/package.json" + }, + { + "path": "node_modules/object.getownpropertydescriptors/package.json" + }, + { + "path": "node_modules/power-assert-renderer-file/package.json" + }, + { + "path": "node_modules/events/package.json" + }, + { + "path": "node_modules/define-property/package.json" + }, + { + "path": "node_modules/define-property/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/define-property/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/unpipe/package.json" + }, + { + "path": "node_modules/array-filter/package.json" + }, + { + "path": "node_modules/furi/package.json" + }, + { + "path": "node_modules/pack-n-play/package.json" + }, + { + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + }, + { + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/miller-rabin/package.json" + }, + { + "path": "node_modules/strip-eof/package.json" + }, + { + "path": "node_modules/map-cache/package.json" + }, + { + "path": "node_modules/is-path-inside/package.json" + }, + { + "path": "node_modules/ini/package.json" + }, + { + "path": "node_modules/currently-unhandled/package.json" + }, + { + "path": "node_modules/global-modules/package.json" + }, + { + "path": "node_modules/global-modules/node_modules/which/package.json" + }, + { + "path": "node_modules/global-modules/node_modules/global-prefix/package.json" + }, + { + "path": "node_modules/invert-kv/package.json" + }, + { + "path": "node_modules/validate-npm-package-license/package.json" + }, + { + "path": "node_modules/fill-range/package.json" + }, + { + "path": "node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/lodash.has/package.json" + }, + { + "path": "node_modules/camelcase/package.json" + }, + { + "path": "node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/doctrine/package.json" + }, + { + "path": "node_modules/path-exists/package.json" + }, + { + "path": "node_modules/deep-extend/package.json" + }, + { + "path": "node_modules/os-browserify/package.json" + }, + { + "path": "node_modules/nth-check/package.json" + }, + { + "path": "node_modules/regex-not/package.json" + }, + { + "path": "node_modules/isarray/package.json" + }, + { + "path": "node_modules/es-to-primitive/package.json" + }, + { + "path": "node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/to-regex/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + }, + { + "path": "node_modules/path-type/package.json" + }, + { + "path": "node_modules/path-type/node_modules/pify/package.json" + }, + { + "path": "node_modules/fs-minipass/package.json" + }, + { + "path": "node_modules/pumpify/package.json" + }, + { + "path": "node_modules/pumpify/node_modules/pump/package.json" + }, + { + "path": "node_modules/fast-json-stable-stringify/package.json" + }, + { + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/stream-each/package.json" + }, + { + "path": "node_modules/enhanced-resolve/package.json" + }, + { + "path": "node_modules/intelli-espower-loader/package.json" + }, + { + "path": "node_modules/node-fetch/package.json" + }, + { + "path": "node_modules/registry-auth-token/package.json" + }, + { + "path": "node_modules/repeat-string/package.json" + }, + { + "path": "node_modules/terser-webpack-plugin/package.json" + }, + { + "path": "node_modules/fragment-cache/package.json" + }, + { + "path": "node_modules/esutils/package.json" + }, + { + "path": "node_modules/run-queue/package.json" + }, + { + "path": "node_modules/which-module/package.json" + }, + { + "path": "node_modules/function-bind/package.json" + }, + { + "path": "node_modules/lcid/package.json" + }, + { + "path": "node_modules/map-visit/package.json" + }, + { + "path": "node_modules/trim-newlines/package.json" + }, + { + "path": "node_modules/event-target-shim/package.json" + }, + { + "path": "node_modules/commondir/package.json" + }, + { + "path": "node_modules/unset-value/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-value/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-values/package.json" + }, + { + "path": "node_modules/parse-passwd/package.json" + }, + { + "path": "node_modules/on-finished/package.json" + }, + { + "path": "node_modules/y18n/package.json" + }, + { + "path": "node_modules/cacache/package.json" + }, + { + "path": "node_modules/cacache/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/quick-lru/package.json" + }, + { + "path": "node_modules/js-yaml/package.json" + }, + { + "path": "node_modules/flat/package.json" + }, + { + "path": "node_modules/normalize-package-data/package.json" + }, + { + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + }, + { + "path": "node_modules/es6-iterator/package.json" + }, + { + "path": "node_modules/remove-trailing-separator/package.json" + }, + { + "path": "node_modules/typescript/package.json" + }, + { + "path": "node_modules/mkdirp/package.json" + }, + { + "path": "node_modules/mkdirp/node_modules/minimist/package.json" + }, + { + "path": "node_modules/chrome-trace-event/package.json" + }, + { + "path": "node_modules/console-browserify/package.json" + }, + { + "path": "node_modules/fast-text-encoding/package.json" + }, + { + "path": "node_modules/acorn-es7-plugin/package.json" + }, + { + "path": "node_modules/through2/package.json" + }, + { + "path": "node_modules/eslint-visitor-keys/package.json" + }, + { + "path": "node_modules/glob/package.json" + }, + { + "path": "node_modules/inherits/package.json" + }, + { + "path": "node_modules/object-copy/package.json" + }, + { + "path": "node_modules/object-copy/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/object-copy/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/object-copy/node_modules/define-property/package.json" + }, + { + "path": "node_modules/string.prototype.trimright/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/es5-ext/package.json" + }, + { + "path": "node_modules/is-date-object/package.json" + }, + { + "path": "node_modules/sprintf-js/package.json" + }, + { + "path": "node_modules/is-npm/package.json" + }, + { + "path": "node_modules/has-yarn/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/global-prefix/package.json" + }, + { + "path": "node_modules/global-prefix/node_modules/which/package.json" + }, + { + "path": "node_modules/extglob/package.json" + }, + { + "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/extglob/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/extglob/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/extglob/node_modules/define-property/package.json" + }, + { + "path": "node_modules/ajv-errors/package.json" + }, + { + "path": "node_modules/node-libs-browser/package.json" + }, + { + "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" + }, + { + "path": "node_modules/constants-browserify/package.json" + }, + { + "path": "node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/empower-core/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/create-ecdh/package.json" + }, + { + "path": "node_modules/latest-version/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" + }, + { + "path": "node_modules/commander/package.json" + }, + { + "path": "node_modules/timers-browserify/package.json" + }, + { + "path": "node_modules/path-is-inside/package.json" + }, + { + "path": "node_modules/rxjs/package.json" + }, + { + "path": "node_modules/node-environment-flags/package.json" + }, + { + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + }, + { + "path": "node_modules/p-limit/package.json" + }, + { + "path": "node_modules/call-signature/package.json" + }, + { + "path": "node_modules/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/neo-async/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/des.js/package.json" + }, + { + "path": "node_modules/he/package.json" + }, + { + "path": "node_modules/tar/package.json" + }, + { + "path": "node_modules/tar/node_modules/yallist/package.json" + }, + { + "path": "node_modules/meow/package.json" + }, + { + "path": "node_modules/meow/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/meow/node_modules/find-up/package.json" + }, + { + "path": "node_modules/meow/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/meow/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/meow/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-try/package.json" + }, + { + "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/chownr/package.json" + }, + { + "path": "node_modules/toidentifier/package.json" + }, + { + "path": "node_modules/execa/package.json" + }, + { + "path": "node_modules/execa/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/execa/node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/execa/node_modules/yallist/package.json" + }, + { + "path": "node_modules/execa/node_modules/which/package.json" + }, + { + "path": "node_modules/execa/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/execa/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/execa/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/unique-string/package.json" + }, + { + "path": "node_modules/gaxios/package.json" + }, + { + "path": "node_modules/create-hash/package.json" + }, + { + "path": "node_modules/figgy-pudding/package.json" + }, + { + "path": "node_modules/power-assert-renderer-base/package.json" + }, + { + "path": "node_modules/browser-stdout/package.json" + }, + { + "path": "node_modules/regexp.prototype.flags/package.json" + }, + { + "path": "node_modules/ieee754/package.json" + }, + { + "path": "node_modules/run-async/package.json" + }, + { + "path": "node_modules/cheerio/package.json" + }, + { + "path": "node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/prepend-http/package.json" + }, + { + "path": "node_modules/define-properties/package.json" + }, + { + "path": "node_modules/p-timeout/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/unique-filename/package.json" + }, + { + "path": "node_modules/pump/package.json" + }, + { + "path": "node_modules/stringifier/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/escape-html/package.json" + }, + { + "path": "node_modules/http-cache-semantics/package.json" + }, + { + "path": "node_modules/to-readable-stream/package.json" + }, + { + "path": "node_modules/eastasianwidth/package.json" + }, + { + "path": "node_modules/chardet/package.json" + }, + { + "path": "node_modules/js-tokens/package.json" + }, + { + "path": "node_modules/chalk/package.json" + }, + { + "path": "node_modules/chalk/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/is-regex/package.json" + }, + { + "path": "node_modules/ajv/package.json" + }, + { + "path": "node_modules/spdx-expression-parse/package.json" + }, + { + "path": "node_modules/cli-width/package.json" + }, + { + "path": "node_modules/ms/package.json" + }, + { + "path": "node_modules/fs-write-stream-atomic/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/package.json" + }, + { + "path": "node_modules/base64-js/package.json" + }, + { + "path": "node_modules/encodeurl/package.json" + }, + { + "path": "node_modules/to-arraybuffer/package.json" + }, + { + "path": "node_modules/micromatch/package.json" + }, + { + "path": "node_modules/json-buffer/package.json" + }, + { + "path": "node_modules/file-entry-cache/package.json" + }, + { + "path": "node_modules/mixin-deep/package.json" + }, + { + "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/is-binary-path/package.json" + }, + { + "path": "node_modules/gtoken/package.json" + }, + { + "path": "node_modules/klaw/package.json" + }, + { + "path": "node_modules/functional-red-black-tree/package.json" + }, + { + "path": "node_modules/dom-serializer/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/vm-browserify/package.json" + }, + { + "path": "node_modules/picomatch/package.json" + }, + { + "path": "node_modules/source-list-map/package.json" + }, + { + "path": "node_modules/@babel/parser/package.json" + }, + { + "path": "node_modules/@babel/highlight/package.json" + }, + { + "path": "node_modules/@babel/code-frame/package.json" + }, + { + "path": "node_modules/move-concurrently/package.json" + }, + { + "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/type-check/package.json" + }, + { + "path": "node_modules/nanomatch/package.json" + }, + { + "path": "node_modules/iconv-lite/package.json" + }, + { + "path": "node_modules/querystring/package.json" + }, + { + "path": "node_modules/webpack/package.json" + }, + { + "path": "node_modules/webpack/node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/webpack/node_modules/braces/package.json" + }, + { + "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/webpack/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/webpack/node_modules/memory-fs/package.json" + }, + { + "path": "node_modules/webpack/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/webpack/node_modules/acorn/package.json" + }, + { + "path": "node_modules/webpack/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/webpack/node_modules/is-number/package.json" + }, + { + "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/is-url/package.json" + }, + { + "path": "node_modules/randombytes/package.json" + }, + { + "path": "node_modules/domutils/package.json" + }, + { + "path": "node_modules/browserify-zlib/package.json" + }, + { + "path": "node_modules/p-queue/package.json" + }, + { + "path": "node_modules/eventemitter3/package.json" + }, + { + "path": "node_modules/object-visit/package.json" + }, + { + "path": "node_modules/ext/package.json" + }, + { + "path": "node_modules/ext/node_modules/type/package.json" + }, + { + "path": "node_modules/pkg-dir/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/find-up/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/deep-equal/package.json" + }, + { + "path": "node_modules/parse5/package.json" + }, + { + "path": "node_modules/collection-visit/package.json" + }, + { + "path": "node_modules/flatted/package.json" + }, + { + "path": "node_modules/for-in/package.json" + }, + { + "path": "node_modules/util/package.json" + }, + { + "path": "node_modules/util/node_modules/inherits/package.json" + }, + { + "path": "node_modules/mem/package.json" + }, + { + "path": "node_modules/once/package.json" + }, + { + "path": "node_modules/universal-deep-strict-equal/package.json" + }, + { + "path": "node_modules/anymatch/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/braces/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/anymatch/node_modules/is-number/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/normalize-path/package.json" + }, + { + "path": "node_modules/brace-expansion/package.json" + }, + { + "path": "node_modules/tapable/package.json" + }, + { + "path": "node_modules/is-number/package.json" + }, + { + "path": "node_modules/jsdoc-region-tag/package.json" + }, + { + "path": "node_modules/serialize-javascript/package.json" + }, + { + "path": "node_modules/webpack-cli/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/find-up/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/path-key/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/which/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/yargs/package.json" + }, + { + "path": "node_modules/markdown-it-anchor/package.json" + }, + { + "path": "node_modules/traverse/package.json" + }, + { + "path": "node_modules/restore-cursor/package.json" + }, + { + "path": "node_modules/lodash.at/package.json" + }, + { + "path": "node_modules/graceful-fs/package.json" + }, + { + "path": "node_modules/isobject/package.json" + }, + { + "path": "node_modules/responselike/package.json" + }, + { + "path": "node_modules/pseudomap/package.json" + }, + { + "path": "node_modules/hash-base/package.json" + }, + { + "path": "node_modules/espurify/package.json" + }, + { + "path": "node_modules/espree/package.json" + }, + { + "path": "node_modules/crypto-browserify/package.json" + }, + { + "path": "node_modules/power-assert-renderer-diagram/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/espower-source/package.json" + }, + { + "path": "node_modules/espower-source/node_modules/acorn/package.json" + }, + { + "path": "node_modules/normalize-url/package.json" + }, + { + "path": "node_modules/infer-owner/package.json" + }, + { + "path": "node_modules/wordwrap/package.json" + }, + { + "path": "node_modules/ee-first/package.json" + }, + { + "path": "node_modules/table/package.json" + }, + { + "path": "node_modules/handlebars/package.json" + }, + { + "path": "node_modules/object-assign/package.json" + }, + { + "path": "node_modules/es6-weak-map/package.json" + }, + { + "path": "node_modules/protobufjs/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package-lock.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/node_modules/@types/node/package.json" + }, + { + "path": "node_modules/normalize-path/package.json" + }, + { + "path": "node_modules/cyclist/package.json" + }, + { + "path": "node_modules/espower/package.json" + }, + { + "path": "node_modules/espower/node_modules/source-map/package.json" + }, + { + "path": "node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/process-nextick-args/package.json" + }, + { + "path": "node_modules/brorand/package.json" + }, + { + "path": "node_modules/p-is-promise/package.json" + }, + { + "path": "node_modules/array-find-index/package.json" + }, + { + "path": "node_modules/astral-regex/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/test-exclude/package.json" + }, + { + "path": "node_modules/es6-promisify/package.json" + }, + { + "path": "node_modules/p-try/package.json" + }, + { + "path": "node_modules/optionator/package.json" + }, + { + "path": "node_modules/is-plain-object/package.json" + }, + { + "path": "node_modules/requizzle/package.json" + }, + { + "path": "node_modules/c8/package.json" + }, + { + "path": "node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/statuses/package.json" + }, + { + "path": "node_modules/semver-diff/package.json" + }, + { + "path": "node_modules/semver-diff/node_modules/semver/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/jsdoc/package.json" + }, + { + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/map-age-cleaner/package.json" + }, + { + "path": "node_modules/resolve-url/package.json" + }, + { + "path": "node_modules/duplexify/package.json" + }, + { + "path": "node_modules/ret/package.json" + }, + { + "path": "node_modules/object-is/package.json" + }, + { + "path": "node_modules/tslib/package.json" + }, + { + "path": "node_modules/extend/package.json" + }, + { + "path": "node_modules/is-wsl/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/css-what/package.json" + }, + { + "path": "node_modules/power-assert-renderer-comparison/package.json" + }, + { + "path": "node_modules/ecdsa-sig-formatter/package.json" + }, + { + "path": "node_modules/unique-slug/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/README.md" + }, + { + "path": "node_modules/typedarray-to-buffer/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/.travis.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/index.js" + }, + { + "path": "node_modules/typedarray-to-buffer/.airtap.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/LICENSE" + }, + { + "path": "node_modules/typedarray-to-buffer/test/basic.js" + }, + { + "path": "node_modules/upath/package.json" + }, + { + "path": "node_modules/markdown-it/package.json" + }, + { + "path": "node_modules/tslint-config-prettier/package.json" + }, + { + "path": "node_modules/buffer-from/package.json" + }, + { + "path": "node_modules/minizlib/package.json" + }, + { + "path": "node_modules/minizlib/node_modules/yallist/package.json" + }, + { + "path": "node_modules/domelementtype/package.json" + }, + { + "path": "node_modules/ci-info/package.json" + }, + { + "path": "node_modules/@types/mocha/package.json" + }, + { + "path": "node_modules/@types/color-name/package.json" + }, + { + "path": "node_modules/@types/is-windows/package.json" + }, + { + "path": "node_modules/@types/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/@types/node/package.json" + }, + { + "path": "node_modules/@types/long/package.json" + }, + { + "path": "node_modules/serve-static/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/make-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/md5.js/package.json" + }, + { + "path": "node_modules/esquery/package.json" + }, + { + "path": "node_modules/ncp/package.json" + }, + { + "path": "node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/set-value/package.json" + }, + { + "path": "node_modules/set-value/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/read-pkg/package.json" + }, + { + "path": "node_modules/fast-diff/package.json" + }, + { + "path": "node_modules/path-browserify/package.json" + }, + { + "path": "node_modules/xtend/package.json" + }, + { + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/webpack-sources/package.json" + }, + { + "path": "node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/p-cancelable/package.json" + }, + { + "path": "node_modules/aproba/package.json" + }, + { + "path": "node_modules/resolve-dir/package.json" + }, + { + "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" + }, + { + "path": "node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/interpret/package.json" + }, + { + "path": "node_modules/power-assert-context-traversal/package.json" + }, + { + "path": "node_modules/long/package.json" + }, + { + "path": "node_modules/d/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/mimic-fn/package.json" + }, + { + "path": "node_modules/bn.js/package.json" + }, + { + "path": "node_modules/arr-union/package.json" + }, + { + "path": "node_modules/cipher-base/package.json" + }, + { + "path": "node_modules/typedarray/package.json" + }, + { + "path": "node_modules/isexe/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/find-cache-dir/package.json" + }, + { + "path": "node_modules/uc.micro/package.json" + }, + { + "path": "node_modules/fs.realpath/package.json" + }, + { + "path": "node_modules/eslint-plugin-prettier/package.json" + }, + { + "path": "node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/nice-try/package.json" + }, + { + "path": "node_modules/static-extend/package.json" + }, + { + "path": "node_modules/static-extend/node_modules/define-property/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/xmlcreate/package.json" + }, + { + "path": "node_modules/escallmatch/package.json" + }, + { + "path": "node_modules/escallmatch/node_modules/esprima/package.json" + }, + { + "path": "node_modules/get-caller-file/package.json" + }, + { + "path": "node_modules/jwa/package.json" + }, + { + "path": "node_modules/json5/package.json" + }, + { + "path": "node_modules/json5/node_modules/minimist/package.json" + }, + { + "path": "smoke-test/device_manager_smoke_test.js" + }, + { + "path": "smoke-test/.eslintrc.yml" } ] } \ No newline at end of file From b15a97fc533e9d6b94968775841b65ff57c1039c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 4 Jan 2020 23:48:18 -0800 Subject: [PATCH 155/370] fix: better client close(), update .nycrc, require mocha explicitly --- packages/google-cloud-iot/.nycrc | 1 + packages/google-cloud-iot/protos/protos.d.ts | 2 +- packages/google-cloud-iot/protos/protos.js | 2 +- .../src/v1/device_manager_client.ts | 6 +- packages/google-cloud-iot/synth.metadata | 2642 +++++++++-------- .../google-cloud-iot/system-test/install.ts | 1 + 6 files changed, 1451 insertions(+), 1203 deletions(-) diff --git a/packages/google-cloud-iot/.nycrc b/packages/google-cloud-iot/.nycrc index 367688844eb..b18d5472b62 100644 --- a/packages/google-cloud-iot/.nycrc +++ b/packages/google-cloud-iot/.nycrc @@ -12,6 +12,7 @@ "**/scripts", "**/protos", "**/test", + "**/*.d.ts", ".jsdoc.js", "**/.jsdoc.js", "karma.conf.js", diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 3343a8349be..976f7b076b6 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index ba9d9c8b819..d929e5caa54 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index eac43704973..d27bafdc828 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -221,6 +221,9 @@ export class DeviceManagerClient { for (const methodName of deviceManagerStubMethods) { const innerCallPromise = this.deviceManagerStub.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) => () => { @@ -241,9 +244,6 @@ export class DeviceManagerClient { callOptions?: CallOptions, callback?: APICallback ) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } return apiCall(argument, callOptions, callback); }; } diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 01acaaf67b9..fe6ba7c171b 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-21T12:18:33.610522Z", + "updateTime": "2020-01-04T12:18:36.336996Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1a380ea21dea9b6ac6ad28c60ad96d9d73574e19", - "internalRef": "286616241" + "sha": "91ef2d9dd69807b0b79555f22566fb2d81e49ff9", + "internalRef": "287999179" } }, { @@ -30,37 +30,40 @@ ], "newFiles": [ { - "path": ".repo-metadata.json" + "path": "package.json" }, { - "path": ".readme-partials.yaml" + "path": "webpack.config.js" }, { - "path": "README.md" + "path": ".prettierignore" }, { - "path": "package.json" + "path": "CODE_OF_CONDUCT.md" }, { - "path": "CHANGELOG.md" + "path": "tsconfig.json" }, { - "path": ".gitignore" + "path": ".repo-metadata.json" }, { - "path": "CODE_OF_CONDUCT.md" + "path": ".prettierrc" }, { - "path": "webpack.config.js" + "path": "CHANGELOG.md" }, { - "path": "CONTRIBUTING.md" + "path": "renovate.json" }, { - "path": ".prettierrc" + "path": ".nycrc" }, { - "path": "package-lock.json" + "path": "LICENSE" + }, + { + "path": "synth.py" }, { "path": ".eslintignore" @@ -69,2167 +72,2386 @@ "path": "linkinator.config.json" }, { - "path": ".eslintrc.yml" + "path": ".readme-partials.yaml" }, { - "path": "renovate.json" + "path": "package-lock.json" }, { - "path": "synth.metadata" + "path": "CONTRIBUTING.md" }, { - "path": ".prettierignore" + "path": ".eslintrc.yml" }, { - "path": "synth.py" + "path": "tslint.json" }, { - "path": "codecov.yaml" + "path": "README.md" }, { - "path": "tslint.json" + "path": "synth.metadata" }, { - "path": ".jsdoc.js" + "path": ".gitignore" }, { - "path": "LICENSE" + "path": "codecov.yaml" }, { - "path": ".nycrc" + "path": ".jsdoc.js" }, { - "path": "tsconfig.json" + "path": "smoke-test/device_manager_smoke_test.js" }, { - "path": "src/index.ts" + "path": "smoke-test/.eslintrc.yml" }, { - "path": "src/v1/device_manager_proto_list.json" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "src/v1/index.ts" + "path": ".github/release-please.yml" }, { - "path": "src/v1/device_manager_client_config.json" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": "src/v1/device_manager_client.ts" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "src/v1/doc/google/type/doc_expr.js" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": "src/v1/doc/google/rpc/doc_status.js" + "path": "node_modules/uc.micro/package.json" }, { - "path": "src/v1/doc/google/cloud/iot/v1/doc_device_manager.js" + "path": "node_modules/minimalistic-crypto-utils/package.json" }, { - "path": "src/v1/doc/google/cloud/iot/v1/doc_resources.js" + "path": "node_modules/eastasianwidth/package.json" }, { - "path": "src/v1/doc/google/iam/v1/doc_policy.js" + "path": "node_modules/big.js/package.json" }, { - "path": "src/v1/doc/google/iam/v1/doc_options.js" + "path": "node_modules/strip-bom/package.json" }, { - "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" + "path": "node_modules/defer-to-connect/package.json" }, { - "path": "src/v1/doc/google/protobuf/doc_any.js" + "path": "node_modules/object-is/package.json" }, { - "path": "src/v1/doc/google/protobuf/doc_field_mask.js" + "path": "node_modules/is-arguments/package.json" }, { - "path": "src/v1/doc/google/protobuf/doc_timestamp.js" + "path": "node_modules/stream-browserify/package.json" }, { - "path": "src/v1/doc/google/protobuf/doc_empty.js" + "path": "node_modules/eventemitter3/package.json" }, { - "path": "build/src/index.d.ts" + "path": "node_modules/long/package.json" }, { - "path": "build/src/index.js.map" + "path": "node_modules/events/package.json" }, { - "path": "build/src/index.js" + "path": "node_modules/lodash/package.json" }, { - "path": "build/src/v1/index.d.ts" + "path": "node_modules/diff/package.json" }, { - "path": "build/src/v1/index.js.map" + "path": "node_modules/has-flag/package.json" }, { - "path": "build/src/v1/device_manager_client.d.ts" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "build/src/v1/device_manager_client.js" + "path": "node_modules/source-map/package.json" }, { - "path": "build/src/v1/device_manager_client_config.json" + "path": "node_modules/spdx-correct/package.json" }, { - "path": "build/src/v1/index.js" + "path": "node_modules/builtin-status-codes/package.json" }, { - "path": "build/src/v1/device_manager_client_config.d.ts" + "path": "node_modules/normalize-url/package.json" }, { - "path": "build/src/v1/device_manager_client.js.map" + "path": "node_modules/tmp/package.json" }, { - "path": "build/protos/protos.json" + "path": "node_modules/get-value/package.json" }, { - "path": "build/protos/protos.js" + "path": "node_modules/extglob/package.json" }, { - "path": "build/protos/protos.d.ts" + "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" }, { - "path": "build/protos/google/cloud/common_resources.proto" + "path": "node_modules/extglob/node_modules/define-property/package.json" }, { - "path": "build/protos/google/cloud/iot/v1/device_manager.proto" + "path": "node_modules/extglob/node_modules/is-descriptor/package.json" }, { - "path": "build/protos/google/cloud/iot/v1/resources.proto" + "path": "node_modules/extglob/node_modules/extend-shallow/package.json" }, { - "path": "build/test/gapic-device_manager-v1.js.map" + "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" }, { - "path": "build/test/gapic-device_manager-v1.js" + "path": "node_modules/got/package.json" }, { - "path": "build/test/gapic-device_manager-v1.d.ts" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "build/system-test/install.js.map" + "path": "node_modules/agent-base/package.json" }, { - "path": "build/system-test/install.d.ts" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": "build/system-test/install.js" + "path": "node_modules/google-gax/package.json" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": "node_modules/next-tick/package.json" }, { - "path": "samples/README.md" + "path": "node_modules/vm-browserify/package.json" }, { - "path": "samples/package.json" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": "samples/.eslintrc.yml" + "path": "node_modules/browserify-rsa/package.json" }, { - "path": "samples/quickstart.js" + "path": "node_modules/is-symbol/package.json" }, { - "path": "samples/test/quickstart.test.js" + "path": "node_modules/once/package.json" }, { - "path": "samples/test/.eslintrc.yml" + "path": "node_modules/yargs-parser/package.json" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": ".github/release-please.yml" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "node_modules/espower-loader/package.json" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "node_modules/setimmediate/package.json" }, { - "path": ".kokoro/test.sh" + "path": "node_modules/bn.js/package.json" }, { - "path": ".kokoro/docs.sh" + "path": "node_modules/doctrine/package.json" }, { - "path": ".kokoro/samples-test.sh" + "path": "node_modules/power-assert-context-formatter/package.json" }, { - "path": ".kokoro/.gitattributes" + "path": "node_modules/marked/package.json" }, { - "path": ".kokoro/trampoline.sh" + "path": "node_modules/jsdoc/package.json" }, { - "path": ".kokoro/lint.sh" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": ".kokoro/publish.sh" + "path": "node_modules/terser-webpack-plugin/package.json" }, { - "path": ".kokoro/test.bat" + "path": "node_modules/terser-webpack-plugin/node_modules/source-map/package.json" }, { - "path": ".kokoro/common.cfg" + "path": "node_modules/flat-cache/package.json" }, { - "path": ".kokoro/system-test.sh" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": ".kokoro/release/docs.cfg" + "path": "node_modules/domain-browser/package.json" }, { - "path": ".kokoro/release/docs.sh" + "path": "node_modules/is-npm/package.json" }, { - "path": ".kokoro/release/publish.cfg" + "path": "node_modules/espower-location-detector/package.json" }, { - "path": ".kokoro/release/common.cfg" + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": "node_modules/base64-js/package.json" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "node_modules/is-glob/package.json" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": "node_modules/errno/package.json" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": "node_modules/taffydb/package.json" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": "node_modules/mocha/package.json" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": "node_modules/mocha/node_modules/has-flag/package.json" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": "node_modules/mocha/node_modules/strip-ansi/package.json" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": "node_modules/mocha/node_modules/ansi-styles/package.json" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": "node_modules/mocha/node_modules/color-name/package.json" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": "node_modules/mocha/node_modules/ansi-regex/package.json" }, { - "path": "protos/protos.json" + "path": "node_modules/mocha/node_modules/color-convert/package.json" }, { - "path": "protos/protos.js" + "path": "node_modules/mocha/node_modules/cliui/package.json" }, { - "path": "protos/protos.d.ts" + "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" }, { - "path": "protos/google/cloud/common_resources.proto" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "protos/google/cloud/iot/v1/device_manager.proto" + "path": "node_modules/mocha/node_modules/string-width/package.json" }, { - "path": "protos/google/cloud/iot/v1/resources.proto" + "path": "node_modules/mocha/node_modules/emoji-regex/package.json" }, { - "path": ".git/packed-refs" + "path": "node_modules/browserify-des/package.json" }, { - "path": ".git/HEAD" + "path": "node_modules/minimist/package.json" }, { - "path": ".git/config" + "path": "node_modules/type/package.json" }, { - "path": ".git/index" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": ".git/shallow" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": ".git/logs/HEAD" + "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": ".git/logs/refs/heads/master" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": ".git/refs/heads/autosynth" + "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" }, { - "path": ".git/refs/heads/master" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": ".git/objects/pack/pack-b55088941be68b91ddc4cfb2546f4e2827efecdb.pack" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": ".git/objects/pack/pack-b55088941be68b91ddc4cfb2546f4e2827efecdb.idx" + "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" }, { - "path": "test/.eslintrc.yml" + "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" }, { - "path": "test/gapic-device_manager-v1.ts" + "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" }, { - "path": "test/mocha.opts" + "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" }, { - "path": "system-test/.eslintrc.yml" + "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" }, { - "path": "system-test/install.ts" + "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" }, { - "path": "system-test/fixtures/sample/src/index.ts" + "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" }, { - "path": "system-test/fixtures/sample/src/index.js" + "path": "node_modules/chownr/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/map-visit/package.json" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/invert-kv/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/copy-descriptor/package.json" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": "node_modules/util-deprecate/package.json" + "path": "node_modules/import-local/package.json" }, { - "path": "node_modules/gts/package.json" + "path": "node_modules/he/package.json" }, { - "path": "node_modules/gts/node_modules/has-flag/package.json" + "path": "node_modules/npm-run-path/package.json" }, { - "path": "node_modules/gts/node_modules/color-name/package.json" + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" }, { - "path": "node_modules/gts/node_modules/color-convert/package.json" + "path": "node_modules/xmlcreate/package.json" }, { - "path": "node_modules/gts/node_modules/supports-color/package.json" + "path": "node_modules/resolve-cwd/package.json" }, { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" + "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": "node_modules/stream-each/package.json" }, { - "path": "node_modules/require-directory/package.json" + "path": "node_modules/micromatch/package.json" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/des.js/package.json" }, { - "path": "node_modules/esprima/package.json" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/nice-try/package.json" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/log-symbols/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/safe-regex/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": "node_modules/arr-diff/package.json" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": "node_modules/is-arguments/package.json" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": "node_modules/loader-utils/package.json" + "path": "node_modules/public-encrypt/package.json" }, { - "path": "node_modules/core-util-is/package.json" + "path": "node_modules/webpack-sources/package.json" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "node_modules/webpack-sources/node_modules/source-map/package.json" }, { - "path": "node_modules/minimist-options/package.json" + "path": "node_modules/gtoken/package.json" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": "node_modules/arr-flatten/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/through2/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/p-limit/package.json" }, { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/argparse/package.json" }, { - "path": "node_modules/domain-browser/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/minimalistic-crypto-utils/package.json" + "path": "node_modules/extend/package.json" }, { - "path": "node_modules/walkdir/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/destroy/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/power-assert-formatter/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/atob/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/map-age-cleaner/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/fill-range/package.json" }, { - "path": "node_modules/empower-assert/package.json" + "path": "node_modules/fast-deep-equal/package.json" }, { - "path": "node_modules/convert-source-map/package.json" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "node_modules/terser/package.json" + "path": "node_modules/unique-slug/package.json" }, { - "path": "node_modules/terser/node_modules/source-map-support/package.json" + "path": "node_modules/assign-symbols/package.json" }, { - "path": "node_modules/minimalistic-assert/package.json" + "path": "node_modules/power-assert-context-reducer-ast/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" }, { - "path": "node_modules/bluebird/package.json" + "path": "node_modules/core-util-is/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/decode-uri-component/package.json" }, { - "path": "node_modules/range-parser/package.json" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/espower-loader/package.json" + "path": "node_modules/timers-browserify/package.json" }, { - "path": "node_modules/null-loader/package.json" + "path": "node_modules/catharsis/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/duplexer3/package.json" + "path": "node_modules/linkinator/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/linkinator/node_modules/is-npm/package.json" }, { - "path": "node_modules/detect-file/package.json" + "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" }, { - "path": "node_modules/eslint/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "node_modules/linkinator/node_modules/global-dirs/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "node_modules/linkinator/node_modules/widest-line/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/linkinator/node_modules/boxen/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "node_modules/linkinator/node_modules/read-pkg/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/linkinator/node_modules/redent/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/linkinator/node_modules/dot-prop/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/linkinator/node_modules/update-notifier/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/linkinator/node_modules/parse-json/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": "node_modules/linkinator/node_modules/meow/package.json" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "node_modules/linkinator/node_modules/minimist-options/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "node_modules/linkinator/node_modules/term-size/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/linkinator/node_modules/arrify/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/linkinator/node_modules/unique-string/package.json" }, { - "path": "node_modules/estraverse/package.json" + "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/prr/package.json" + "path": "node_modules/linkinator/node_modules/semver/package.json" }, { - "path": "node_modules/mdurl/package.json" + "path": "node_modules/linkinator/node_modules/quick-lru/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/linkinator/node_modules/is-obj/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/setimmediate/package.json" + "path": "node_modules/linkinator/node_modules/configstore/package.json" }, { - "path": "node_modules/diffie-hellman/package.json" + "path": "node_modules/linkinator/node_modules/indent-string/package.json" }, { - "path": "node_modules/resolve-from/package.json" + "path": "node_modules/linkinator/node_modules/semver-diff/package.json" }, { - "path": "node_modules/pascalcase/package.json" + "path": "node_modules/linkinator/node_modules/strip-indent/package.json" }, { - "path": "node_modules/emojis-list/package.json" + "path": "node_modules/linkinator/node_modules/map-obj/package.json" }, { - "path": "node_modules/https-browserify/package.json" + "path": "node_modules/fresh/package.json" }, { - "path": "node_modules/assign-symbols/package.json" + "path": "node_modules/mississippi/package.json" }, { - "path": "node_modules/browserify-aes/package.json" + "path": "node_modules/mississippi/node_modules/through2/package.json" }, { - "path": "node_modules/type-name/package.json" + "path": "node_modules/safer-buffer/package.json" }, { - "path": "node_modules/os-locale/package.json" + "path": "node_modules/is-stream-ended/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" + "path": "node_modules/commondir/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/requizzle/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/figures/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/power-assert-util-string-width/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/serialize-javascript/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/multi-stage-sourcemap/package.json" }, { - "path": "node_modules/os-locale/node_modules/get-stream/package.json" + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" }, { - "path": "node_modules/os-locale/node_modules/semver/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/os-locale/node_modules/path-key/package.json" + "path": "node_modules/binary-extensions/package.json" }, { - "path": "node_modules/os-locale/node_modules/which/package.json" + "path": "node_modules/widest-line/package.json" }, { - "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/os-locale/node_modules/is-stream/package.json" + "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/os-locale/node_modules/shebang-command/package.json" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/os-locale/node_modules/execa/package.json" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": "node_modules/lodash/package.json" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/safe-buffer/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/parent-module/package.json" + "path": "node_modules/boxen/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/split-string/package.json" + "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/base/package.json" + "path": "node_modules/boxen/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/base/node_modules/is-data-descriptor/package.json" + "path": "node_modules/boxen/node_modules/string-width/package.json" }, { - "path": "node_modules/base/node_modules/is-descriptor/package.json" + "path": "node_modules/boxen/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/glob/package.json" }, { - "path": "node_modules/base/node_modules/define-property/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/write/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/configstore/package.json" + "path": "node_modules/acorn-es7-plugin/package.json" }, { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/configstore/node_modules/pify/package.json" + "path": "node_modules/ieee754/package.json" }, { - "path": "node_modules/configstore/node_modules/make-dir/package.json" + "path": "node_modules/parse-passwd/package.json" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + "path": "node_modules/asn1.js/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/read-pkg/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/npm-bundled/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/ansi-styles/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/escallmatch/package.json" }, { - "path": "node_modules/browserify-des/package.json" + "path": "node_modules/escallmatch/node_modules/esprima/package.json" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/callsites/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/type-fest/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/espree/package.json" }, { - "path": "node_modules/readdirp/package.json" + "path": "node_modules/server-destroy/package.json" }, { - "path": "node_modules/readdirp/node_modules/braces/package.json" + "path": "node_modules/cache-base/package.json" }, { - "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/prr/package.json" }, { - "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/readdirp/node_modules/is-buffer/package.json" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/readdirp/node_modules/fill-range/package.json" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/README.md" + "path": "node_modules/es6-set/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/package.json" + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/js-yaml/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/index.js" + "path": "node_modules/ajv/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" + "path": "node_modules/ret/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/homedir-polyfill/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" + "path": "node_modules/normalize-path/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/p-finally/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" + "path": "node_modules/memory-fs/package.json" }, { - "path": "node_modules/readdirp/node_modules/is-number/package.json" + "path": "node_modules/redent/package.json" }, { - "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/tsutils/package.json" }, { - "path": "node_modules/cache-base/package.json" + "path": "node_modules/diff-match-patch/package.json" }, { - "path": "node_modules/is-promise/package.json" + "path": "node_modules/signal-exit/package.json" }, { - "path": "node_modules/parallel-transform/package.json" + "path": "node_modules/core-js/package.json" }, { - "path": "node_modules/es6-map/package.json" + "path": "node_modules/package-json/package.json" }, { - "path": "node_modules/p-finally/package.json" + "path": "node_modules/package-json/node_modules/semver/package.json" }, { - "path": "node_modules/snapdragon-node/package.json" + "path": "node_modules/indexof/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" + "path": "node_modules/.bin/sha.js" }, { - "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" + "path": "node_modules/path-type/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/eslint-utils/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" + "path": "node_modules/p-try/package.json" }, { - "path": "node_modules/browserify-cipher/package.json" + "path": "node_modules/empower/package.json" }, { - "path": "node_modules/es6-set/package.json" + "path": "node_modules/pbkdf2/package.json" }, { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "node_modules/array-find/package.json" + "path": "node_modules/has-value/package.json" }, { - "path": "node_modules/arr-flatten/package.json" + "path": "node_modules/html-escaper/package.json" }, { - "path": "node_modules/evp_bytestokey/package.json" + "path": "node_modules/chokidar/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/chokidar/node_modules/fill-range/package.json" }, { - "path": "node_modules/has-value/package.json" + "path": "node_modules/chokidar/node_modules/is-number/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/tty-browserify/package.json" + "path": "node_modules/chokidar/node_modules/is-buffer/package.json" }, { - "path": "node_modules/get-value/package.json" + "path": "node_modules/chokidar/node_modules/glob-parent/package.json" }, { - "path": "node_modules/@webassemblyjs/wasm-gen/package.json" + "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-fsm/package.json" + "path": "node_modules/chokidar/node_modules/braces/package.json" }, { - "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" + "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" + "path": "node_modules/chokidar/node_modules/kind-of/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/@webassemblyjs/ast/package.json" + "path": "node_modules/picomatch/package.json" }, { - "path": "node_modules/@webassemblyjs/wast-printer/package.json" + "path": "node_modules/pseudomap/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-module-context/package.json" + "path": "node_modules/cipher-base/package.json" }, { - "path": "node_modules/@webassemblyjs/wasm-edit/package.json" + "path": "node_modules/async-each/package.json" }, { - "path": "node_modules/@webassemblyjs/leb128/package.json" + "path": "node_modules/regexpp/package.json" }, { - "path": "node_modules/@webassemblyjs/wast-parser/package.json" + "path": "node_modules/p-cancelable/package.json" }, { - "path": "node_modules/@webassemblyjs/ieee754/package.json" + "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/@webassemblyjs/wasm-opt/package.json" + "path": "node_modules/is-number/package.json" }, { - "path": "node_modules/@webassemblyjs/utf8/package.json" + "path": "node_modules/es6-symbol/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-buffer/package.json" + "path": "node_modules/encodeurl/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" + "path": "node_modules/table/package.json" }, { - "path": "node_modules/@webassemblyjs/wasm-parser/package.json" + "path": "node_modules/table/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-api-error/package.json" + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/indexof/package.json" + "path": "node_modules/table/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/is-data-descriptor/package.json" + "path": "node_modules/table/node_modules/string-width/package.json" }, { - "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" + "path": "node_modules/table/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/progress/package.json" + "path": "node_modules/escodegen/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/escodegen/node_modules/source-map/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/escodegen/node_modules/esprima/package.json" }, { - "path": "node_modules/class-utils/package.json" + "path": "node_modules/crypto-browserify/package.json" }, { - "path": "node_modules/class-utils/node_modules/define-property/package.json" + "path": "node_modules/null-loader/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/to-object-path/package.json" }, { - "path": "node_modules/figures/package.json" + "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": "node_modules/to-object-path/node_modules/kind-of/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/unpipe/package.json" }, { - "path": "node_modules/type/package.json" + "path": "node_modules/dot-prop/package.json" }, { - "path": "node_modules/domhandler/package.json" + "path": "node_modules/array-find-index/package.json" }, { - "path": "node_modules/error-ex/package.json" + "path": "node_modules/array-unique/package.json" }, { - "path": "node_modules/to-object-path/package.json" + "path": "node_modules/elliptic/package.json" }, { - "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/to-object-path/node_modules/kind-of/package.json" + "path": "node_modules/update-notifier/package.json" }, { - "path": "node_modules/errno/package.json" + "path": "node_modules/domutils/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/brorand/package.json" }, { - "path": "node_modules/safer-buffer/package.json" + "path": "node_modules/resolve-url/package.json" }, { - "path": "node_modules/object.pick/package.json" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/arr-union/package.json" }, { - "path": "node_modules/posix-character-classes/package.json" + "path": "node_modules/event-emitter/package.json" }, { - "path": "node_modules/strip-indent/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/boxen/package.json" + "path": "node_modules/process/package.json" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "node_modules/execa/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/execa/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/execa/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/process/package.json" + "path": "node_modules/execa/node_modules/is-stream/package.json" }, { - "path": "node_modules/querystring-es3/package.json" + "path": "node_modules/execa/node_modules/lru-cache/package.json" }, { - "path": "node_modules/ripemd160/package.json" + "path": "node_modules/execa/node_modules/shebang-command/package.json" }, { - "path": "node_modules/findup-sync/package.json" + "path": "node_modules/execa/node_modules/which/package.json" }, { - "path": "node_modules/findup-sync/node_modules/braces/package.json" + "path": "node_modules/execa/node_modules/yallist/package.json" }, { - "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/source-list-map/package.json" }, { - "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/findup-sync/node_modules/fill-range/package.json" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/README.md" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/package.json" + "path": "node_modules/empower-assert/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/index.js" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/traverse/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/escope/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" + "path": "node_modules/prettier/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/mime/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/findup-sync/node_modules/is-number/package.json" + "path": "node_modules/pumpify/package.json" }, { - "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/pumpify/node_modules/pump/package.json" }, { - "path": "node_modules/has-symbols/package.json" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/ansi-align/package.json" + "path": "node_modules/os-browserify/package.json" }, { - "path": "node_modules/find-up/package.json" + "path": "node_modules/get-stdin/package.json" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/lcid/package.json" }, { - "path": "node_modules/merge-estraverse-visitors/package.json" + "path": "node_modules/espower/package.json" }, { - "path": "node_modules/is-extglob/package.json" + "path": "node_modules/espower/node_modules/source-map/package.json" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/prettier/package.json" + "path": "node_modules/json-buffer/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/watchpack/package.json" + "path": "node_modules/constants-browserify/package.json" }, { - "path": "node_modules/.bin/sha.js" + "path": "node_modules/nth-check/package.json" }, { - "path": "node_modules/safe-regex/package.json" + "path": "node_modules/source-map-url/package.json" }, { - "path": "node_modules/wrappy/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/pkg-dir/package.json" }, { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + "path": "node_modules/pkg-dir/node_modules/find-up/package.json" }, { - "path": "node_modules/mississippi/package.json" + "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" }, { - "path": "node_modules/mississippi/node_modules/through2/package.json" + "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" }, { - "path": "node_modules/promise-inflight/package.json" + "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" }, { - "path": "node_modules/browserify-sign/package.json" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/map-obj/package.json" + "path": "node_modules/onetime/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/to-arraybuffer/package.json" }, { - "path": "node_modules/pbkdf2/package.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "node_modules/stream-http/package.json" + "path": "node_modules/power-assert-renderer-comparison/package.json" }, { - "path": "node_modules/destroy/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/flush-write-stream/package.json" + "path": "node_modules/p-timeout/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/progress/package.json" }, { - "path": "node_modules/npm-packlist/package.json" + "path": "node_modules/is-wsl/package.json" }, { - "path": "node_modules/taffydb/package.json" + "path": "node_modules/global-prefix/package.json" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "node_modules/global-prefix/node_modules/which/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/resolve-dir/package.json" }, { - "path": "node_modules/is-glob/package.json" + "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/is-extendable/package.json" }, { - "path": "node_modules/uglify-js/package.json" + "path": "node_modules/es5-ext/package.json" }, { - "path": "node_modules/minipass/package.json" + "path": "node_modules/statuses/package.json" }, { - "path": "node_modules/minipass/node_modules/yallist/package.json" + "path": "node_modules/repeat-string/package.json" }, { - "path": "node_modules/repeat-element/package.json" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": "node_modules/optimist/package.json" + "path": "node_modules/fs-write-stream-atomic/package.json" }, { - "path": "node_modules/empower/package.json" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/cacheable-request/package.json" + "path": "node_modules/domhandler/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + "path": "node_modules/terser/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": "node_modules/terser/node_modules/source-map/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/terser/node_modules/source-map-support/package.json" }, { - "path": "node_modules/server-destroy/package.json" + "path": "node_modules/ajv-keywords/package.json" }, { - "path": "node_modules/copy-concurrently/package.json" + "path": "node_modules/fragment-cache/package.json" }, { - "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" + "path": "node_modules/tty-browserify/package.json" }, { - "path": "node_modules/import-local/package.json" + "path": "node_modules/mkdirp/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/iferr/package.json" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": "node_modules/core-js/package.json" + "path": "node_modules/sha.js/package.json" }, { - "path": "node_modules/set-blocking/package.json" + "path": "node_modules/sha.js/.travis.yml" }, { - "path": "node_modules/p-defer/package.json" + "path": "node_modules/sha.js/sha256.js" }, { - "path": "node_modules/create-hmac/package.json" + "path": "node_modules/sha.js/sha1.js" }, { - "path": "node_modules/next-tick/package.json" + "path": "node_modules/sha.js/index.js" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/sha.js/LICENSE" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/sha.js/sha.js" }, { - "path": "node_modules/agent-base/package.json" + "path": "node_modules/sha.js/sha384.js" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/sha.js/hash.js" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": "node_modules/sha.js/sha224.js" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/sha.js/sha512.js" }, { - "path": "node_modules/through/package.json" + "path": "node_modules/sha.js/README.md" }, { - "path": "node_modules/braces/package.json" + "path": "node_modules/sha.js/bin.js" }, { - "path": "node_modules/jws/package.json" + "path": "node_modules/sha.js/test/hash.js" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/sha.js/test/test.js" }, { - "path": "node_modules/inquirer/node_modules/string-width/package.json" + "path": "node_modules/sha.js/test/vectors.js" }, { - "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + "path": "node_modules/upath/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/set-value/package.json" }, { - "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + "path": "node_modules/set-value/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/md5.js/package.json" }, { - "path": "node_modules/urix/package.json" + "path": "node_modules/empower-core/package.json" }, { - "path": "node_modules/etag/package.json" + "path": "node_modules/string_decoder/package.json" }, { - "path": "node_modules/power-assert-formatter/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/to-regex-range/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/text-table/package.json" + "path": "node_modules/evp_bytestokey/package.json" }, { - "path": "node_modules/color-convert/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/escope/package.json" + "path": "node_modules/minizlib/package.json" }, { - "path": "node_modules/ansi-regex/package.json" + "path": "node_modules/minizlib/node_modules/yallist/package.json" }, { - "path": "node_modules/is-installed-globally/package.json" + "path": "node_modules/send/package.json" }, { - "path": "node_modules/builtin-status-codes/package.json" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": "node_modules/memory-fs/package.json" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "node_modules/redent/package.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "node_modules/schema-utils/package.json" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "node_modules/is-buffer/package.json" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/typedarray/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/node-libs-browser/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/js-tokens/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/move-concurrently/package.json" }, { - "path": "node_modules/mime/package.json" + "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/global-modules/package.json" }, { - "path": "node_modules/decode-uri-component/package.json" + "path": "node_modules/global-modules/node_modules/global-prefix/package.json" }, { - "path": "node_modules/randomfill/package.json" + "path": "node_modules/global-modules/node_modules/which/package.json" }, { - "path": "node_modules/ignore/package.json" + "path": "node_modules/es6-weak-map/package.json" }, { - "path": "node_modules/loader-runner/package.json" + "path": "node_modules/array-filter/package.json" }, { - "path": "node_modules/homedir-polyfill/package.json" + "path": "node_modules/es6-map/package.json" }, { - "path": "node_modules/depd/package.json" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": "node_modules/union-value/package.json" + "path": "node_modules/type-name/package.json" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "node_modules/urix/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "node_modules/map-cache/package.json" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": "node_modules/path-dirname/package.json" }, { - "path": "node_modules/concat-stream/package.json" + "path": "node_modules/browserify-cipher/package.json" }, { - "path": "node_modules/is-descriptor/package.json" + "path": "node_modules/regexp.prototype.flags/package.json" }, { - "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" + "path": "node_modules/deep-equal/package.json" }, { - "path": "node_modules/expand-brackets/package.json" + "path": "node_modules/graceful-fs/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" + "path": "node_modules/chalk/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/define-property/package.json" + "path": "node_modules/chalk/node_modules/has-flag/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/ms/package.json" + "path": "node_modules/chalk/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/debug/package.json" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/chalk/node_modules/color-name/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/chalk/node_modules/color-convert/package.json" }, { - "path": "node_modules/diff-match-patch/package.json" + "path": "node_modules/write/package.json" }, { - "path": "node_modules/big.js/package.json" + "path": "node_modules/npm-bundled/package.json" }, { - "path": "node_modules/amdefine/package.json" + "path": "node_modules/ext/package.json" }, { - "path": "node_modules/event-emitter/package.json" + "path": "node_modules/ext/node_modules/type/package.json" }, { - "path": "node_modules/has-values/package.json" + "path": "node_modules/yargs/package.json" }, { - "path": "node_modules/has-values/node_modules/is-buffer/package.json" + "path": "node_modules/through/package.json" }, { - "path": "node_modules/has-values/node_modules/kind-of/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/has-values/node_modules/is-number/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/is-windows/package.json" + "path": "node_modules/setprototypeof/package.json" }, { - "path": "node_modules/diff/package.json" + "path": "node_modules/jwa/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/public-encrypt/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/is-obj/package.json" + "path": "node_modules/console-browserify/package.json" }, { - "path": "node_modules/asn1.js/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/buffer/package.json" + "path": "node_modules/es6-iterator/package.json" }, { - "path": "node_modules/yargs-parser/package.json" + "path": "node_modules/is-binary-path/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/run-async/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/loader-runner/package.json" }, { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" + "path": "node_modules/esquery/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-name/package.json" + "path": "node_modules/resolve/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" + "path": "node_modules/json5/package.json" }, { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" + "path": "node_modules/json5/node_modules/minimist/package.json" }, { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/webpack-cli/package.json" }, { - "path": "node_modules/import-lazy/package.json" + "path": "node_modules/webpack-cli/node_modules/has-flag/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/use/package.json" + "path": "node_modules/webpack-cli/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/concat-map/package.json" + "path": "node_modules/webpack-cli/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/browserify-rsa/package.json" + "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/es6-symbol/package.json" + "path": "node_modules/webpack-cli/node_modules/find-up/package.json" }, { - "path": "node_modules/hash.js/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/expand-tilde/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" }, { - "path": "node_modules/ts-loader/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" }, { - "path": "node_modules/is-typedarray/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" }, { - "path": "node_modules/resolve-cwd/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" }, { - "path": "node_modules/cli-boxes/package.json" + "path": "node_modules/webpack-cli/node_modules/yargs/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/webpack-cli/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/webpack-cli/node_modules/supports-color/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" }, { - "path": "node_modules/rc/package.json" + "path": "node_modules/webpack-cli/node_modules/path-key/package.json" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/webpack-cli/node_modules/semver/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/webpack-cli/node_modules/color-name/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/webpack-cli/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/webpack-cli/node_modules/color-convert/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/webpack-cli/node_modules/cliui/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/webpack-cli/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/worker-farm/package.json" + "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" }, { - "path": "node_modules/extend-shallow/package.json" + "path": "node_modules/webpack-cli/node_modules/which/package.json" }, { - "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" + "path": "node_modules/webpack-cli/node_modules/string-width/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/webpack-cli/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/marked/package.json" + "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "node_modules/parse-asn1/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/meow/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/schema-utils/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/npm-normalize-package-bin/package.json" }, { - "path": "node_modules/css-select/package.json" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "node_modules/uri-js/package.json" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/static-extend/package.json" }, { - "path": "node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/static-extend/node_modules/define-property/package.json" }, { - "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" + "path": "node_modules/collection-visit/package.json" }, { - "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" + "path": "node_modules/parse-asn1/package.json" }, { - "path": "node_modules/component-emitter/package.json" + "path": "node_modules/call-signature/package.json" }, { - "path": "node_modules/hmac-drbg/package.json" + "path": "node_modules/dom-serializer/package.json" }, { - "path": "node_modules/npm-normalize-package-bin/package.json" + "path": "node_modules/on-finished/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/yallist/package.json" + "path": "node_modules/browserify-aes/package.json" }, { - "path": "node_modules/setprototypeof/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/package-json/package.json" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "node_modules/from2/package.json" + "path": "node_modules/supports-color/package.json" }, { - "path": "node_modules/elliptic/package.json" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": "node_modules/detect-file/package.json" }, { - "path": "node_modules/array-unique/package.json" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/brace-expansion/package.json" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": "node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" }, { - "path": "node_modules/path-dirname/package.json" + "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "node_modules/ansi-styles/package.json" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/markdown-it/package.json" }, { - "path": "node_modules/boolbase/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/cliui/package.json" + "path": "node_modules/iconv-lite/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/snapdragon-node/package.json" }, { - "path": "node_modules/acorn/package.json" + "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/stream-browserify/package.json" + "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" }, { - "path": "node_modules/load-json-file/node_modules/pify/package.json" + "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/builtin-modules/package.json" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "node_modules/chokidar/package.json" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/chokidar/node_modules/glob-parent/package.json" + "path": "node_modules/@webassemblyjs/helper-fsm/package.json" }, { - "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" + "path": "node_modules/@webassemblyjs/leb128/package.json" }, { - "path": "node_modules/chokidar/node_modules/braces/package.json" + "path": "node_modules/@webassemblyjs/wasm-opt/package.json" }, { - "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" + "path": "node_modules/@webassemblyjs/ieee754/package.json" }, { - "path": "node_modules/chokidar/node_modules/is-buffer/package.json" + "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" }, { - "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" + "path": "node_modules/@webassemblyjs/wast-printer/package.json" }, { - "path": "node_modules/chokidar/node_modules/kind-of/package.json" + "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" }, { - "path": "node_modules/chokidar/node_modules/fill-range/package.json" + "path": "node_modules/@webassemblyjs/wasm-gen/package.json" }, { - "path": "node_modules/chokidar/node_modules/is-number/package.json" + "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" }, { - "path": "node_modules/atob/package.json" + "path": "node_modules/@webassemblyjs/helper-module-context/package.json" }, { - "path": "node_modules/mamacro/package.json" + "path": "node_modules/@webassemblyjs/wasm-parser/package.json" }, { - "path": "node_modules/snapdragon/README.md" + "path": "node_modules/@webassemblyjs/wast-parser/package.json" }, { - "path": "node_modules/snapdragon/package.json" + "path": "node_modules/@webassemblyjs/helper-api-error/package.json" }, { - "path": "node_modules/snapdragon/index.js" + "path": "node_modules/@webassemblyjs/helper-buffer/package.json" }, { - "path": "node_modules/snapdragon/LICENSE" + "path": "node_modules/@webassemblyjs/utf8/package.json" }, { - "path": "node_modules/snapdragon/lib/compiler.js" + "path": "node_modules/@webassemblyjs/ast/package.json" }, { - "path": "node_modules/snapdragon/lib/position.js" + "path": "node_modules/@webassemblyjs/wasm-edit/package.json" }, { - "path": "node_modules/snapdragon/lib/parser.js" + "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" }, { - "path": "node_modules/snapdragon/lib/source-maps.js" + "path": "node_modules/os-tmpdir/package.json" }, { - "path": "node_modules/snapdragon/lib/utils.js" + "path": "node_modules/test-exclude/package.json" }, { - "path": "node_modules/snapdragon/node_modules/source-map/package.json" + "path": "node_modules/resolve-from/package.json" }, { - "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" + "path": "node_modules/worker-farm/package.json" }, { - "path": "node_modules/snapdragon/node_modules/define-property/package.json" + "path": "node_modules/for-in/package.json" }, { - "path": "node_modules/snapdragon/node_modules/ms/package.json" + "path": "node_modules/buffer-xor/package.json" }, { - "path": "node_modules/snapdragon/node_modules/debug/package.json" + "path": "node_modules/hash.js/package.json" }, { - "path": "node_modules/widest-line/package.json" + "path": "node_modules/source-map-support/package.json" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": "node_modules/source-map-support/node_modules/source-map/package.json" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": "node_modules/punycode/package.json" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "node_modules/npm-packlist/package.json" }, { - "path": "node_modules/which/package.json" + "path": "node_modules/run-queue/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/ee-first/package.json" }, { - "path": "node_modules/assert/package.json" + "path": "node_modules/p-locate/package.json" }, { - "path": "node_modules/assert/node_modules/inherits/package.json" + "path": "node_modules/@types/long/package.json" }, { - "path": "node_modules/assert/node_modules/util/package.json" + "path": "node_modules/@types/mocha/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/@types/minimist/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/@types/node/package.json" }, { - "path": "node_modules/retry-request/package.json" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": "node_modules/is-arrayish/package.json" + "path": "node_modules/@types/fs-extra/package.json" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/@types/fs-extra/node_modules/@types/node/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/@types/color-name/package.json" }, { - "path": "node_modules/ssri/package.json" + "path": "node_modules/@types/normalize-package-data/package.json" }, { - "path": "node_modules/deep-is/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/@xtuc/ieee754/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/@xtuc/long/package.json" + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/sha.js/README.md" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/sha.js/package.json" + "path": "node_modules/create-hash/package.json" }, { - "path": "node_modules/sha.js/hash.js" + "path": "node_modules/expand-tilde/package.json" }, { - "path": "node_modules/sha.js/.travis.yml" + "path": "node_modules/is-promise/package.json" }, { - "path": "node_modules/sha.js/sha224.js" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": "node_modules/sha.js/sha512.js" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/sha.js/bin.js" + "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/sha.js/sha.js" + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/sha.js/index.js" + "path": "node_modules/slice-ansi/node_modules/color-name/package.json" }, { - "path": "node_modules/sha.js/sha384.js" + "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" }, { - "path": "node_modules/sha.js/sha1.js" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/sha.js/sha256.js" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "node_modules/sha.js/LICENSE" + "path": "node_modules/decompress-response/package.json" }, { - "path": "node_modules/sha.js/test/vectors.js" + "path": "node_modules/repeat-element/package.json" }, { - "path": "node_modules/sha.js/test/test.js" + "path": "node_modules/emojis-list/package.json" }, { - "path": "node_modules/sha.js/test/hash.js" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/node-forge/package.json" + "path": "node_modules/unique-filename/package.json" }, { - "path": "node_modules/pako/package.json" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/power-assert/package.json" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/domelementtype/package.json" }, { - "path": "node_modules/ignore-walk/package.json" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": "node_modules/source-map-support/package.json" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": "node_modules/source-map-support/node_modules/source-map/package.json" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": "node_modules/source-map-resolve/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/figgy-pudding/package.json" }, { - "path": "node_modules/binary-extensions/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/isarray/package.json" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/@grpc/grpc-js/package.json" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" }, { - "path": "node_modules/kind-of/package.json" + "path": "node_modules/@grpc/proto-loader/package.json" }, { - "path": "node_modules/power-assert-util-string-width/package.json" + "path": "node_modules/responselike/package.json" }, { - "path": "node_modules/ajv-keywords/package.json" + "path": "node_modules/create-hmac/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/linkify-it/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/url/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/url/node_modules/punycode/package.json" + "path": "node_modules/latest-version/package.json" }, { - "path": "node_modules/async-each/package.json" + "path": "node_modules/amdefine/package.json" }, { - "path": "node_modules/minimist/package.json" + "path": "node_modules/estraverse/package.json" }, { - "path": "node_modules/buffer-xor/package.json" + "path": "node_modules/http-errors/package.json" }, { - "path": "node_modules/fresh/package.json" + "path": "node_modules/mixin-deep/package.json" }, { - "path": "node_modules/power-assert-context-formatter/package.json" + "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/term-size/package.json" }, { - "path": "node_modules/call-matcher/package.json" + "path": "node_modules/promise-inflight/package.json" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": "node_modules/source-map-resolve/package.json" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "node_modules/browserify-zlib/package.json" }, { - "path": "node_modules/onetime/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/spdx-correct/package.json" + "path": "node_modules/randomfill/package.json" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "node_modules/posix-character-classes/package.json" }, { - "path": "node_modules/readable-stream/package.json" + "path": "node_modules/create-ecdh/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" }, { "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/power-assert-renderer-assertion/package.json" + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/pify/package.json" + "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/source-map-url/package.json" + "path": "node_modules/ansi-align/node_modules/string-width/package.json" }, { - "path": "node_modules/snapdragon-util/package.json" + "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" + "path": "node_modules/minimalistic-assert/package.json" + }, + { + "path": "node_modules/espower-source/package.json" + }, + { + "path": "node_modules/espower-source/node_modules/acorn/package.json" + }, + { + "path": "node_modules/d/package.json" + }, + { + "path": "node_modules/find-cache-dir/package.json" + }, + { + "path": "node_modules/find-cache-dir/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/find-cache-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/find-cache-dir/node_modules/pify/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/espurify/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "path": "node_modules/eslint/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.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/path-key/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/package.json" + }, + { + "path": "node_modules/eslint/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/eslint/node_modules/which/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/tapable/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/array-find/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/is-ci/package.json" + }, + { + "path": "node_modules/mdurl/package.json" + }, + { + "path": "node_modules/https-browserify/package.json" + }, + { + "path": "node_modules/typescript/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/mem/package.json" + }, + { + "path": "node_modules/object.pick/package.json" + }, + { + "path": "node_modules/is-url/package.json" + }, + { + "path": "node_modules/split-string/package.json" + }, + { + "path": "node_modules/tslint-config-prettier/package.json" + }, + { + "path": "node_modules/url/package.json" + }, + { + "path": "node_modules/url/node_modules/punycode/package.json" + }, + { + "path": "node_modules/interpret/package.json" + }, + { + "path": "node_modules/os-locale/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/execa/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/os-locale/node_modules/path-key/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/semver/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/which/package.json" }, { "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": "node_modules/ci-info/package.json" }, { - "path": "node_modules/escodegen/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/escodegen/node_modules/esprima/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/entities/package.json" + "path": "node_modules/browserify-sign/package.json" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": "node_modules/lru-cache/package.json" }, { - "path": "node_modules/power-assert-renderer-file/package.json" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/events/package.json" + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" }, { "path": "node_modules/define-property/package.json" @@ -2244,1411 +2466,1435 @@ "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/unpipe/package.json" + "path": "node_modules/merge-estraverse-visitors/package.json" }, { - "path": "node_modules/array-filter/package.json" + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/is-windows/package.json" + }, + { + "path": "node_modules/call-matcher/package.json" }, { "path": "node_modules/furi/package.json" }, { - "path": "node_modules/pack-n-play/package.json" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/miller-rabin/package.json" + "path": "node_modules/unique-string/package.json" }, { - "path": "node_modules/strip-eof/package.json" + "path": "node_modules/base/package.json" }, { - "path": "node_modules/map-cache/package.json" + "path": "node_modules/base/node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/base/node_modules/define-property/package.json" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/base/node_modules/is-descriptor/package.json" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/global-modules/package.json" + "path": "node_modules/css-what/package.json" }, { - "path": "node_modules/global-modules/node_modules/which/package.json" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/global-modules/node_modules/global-prefix/package.json" + "path": "node_modules/iferr/package.json" }, { - "path": "node_modules/invert-kv/package.json" + "path": "node_modules/url-parse-lax/package.json" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/object-copy/package.json" }, { - "path": "node_modules/fill-range/package.json" + "path": "node_modules/object-copy/node_modules/define-property/package.json" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/object-copy/node_modules/is-buffer/package.json" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": "node_modules/object-copy/node_modules/kind-of/package.json" }, { - "path": "node_modules/lodash.has/package.json" + "path": "node_modules/p-is-promise/package.json" }, { - "path": "node_modules/camelcase/package.json" + "path": "node_modules/mamacro/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/@istanbuljs/schema/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/use/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/parallel-transform/package.json" }, { - "path": "node_modules/path-exists/package.json" + "path": "node_modules/ms/package.json" }, { - "path": "node_modules/deep-extend/package.json" + "path": "node_modules/webpack/package.json" }, { - "path": "node_modules/os-browserify/package.json" + "path": "node_modules/webpack/node_modules/micromatch/package.json" }, { - "path": "node_modules/nth-check/package.json" + "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/regex-not/package.json" + "path": "node_modules/webpack/node_modules/micromatch/index.js" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/webpack/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": "node_modules/webpack/node_modules/micromatch/README.md" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/to-regex/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/path-type/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/path-type/node_modules/pify/package.json" + "path": "node_modules/webpack/node_modules/eslint-scope/package.json" }, { - "path": "node_modules/fs-minipass/package.json" + "path": "node_modules/webpack/node_modules/fill-range/package.json" }, { - "path": "node_modules/pumpify/package.json" + "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/pumpify/node_modules/pump/package.json" + "path": "node_modules/webpack/node_modules/acorn/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/webpack/node_modules/memory-fs/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/webpack/node_modules/is-number/package.json" }, { - "path": "node_modules/stream-each/package.json" + "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/enhanced-resolve/package.json" + "path": "node_modules/webpack/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/intelli-espower-loader/package.json" + "path": "node_modules/webpack/node_modules/is-buffer/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/webpack/node_modules/braces/package.json" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/repeat-string/package.json" + "path": "node_modules/decamelize-keys/package.json" }, { - "path": "node_modules/terser-webpack-plugin/package.json" + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" }, { - "path": "node_modules/fragment-cache/package.json" + "path": "node_modules/make-dir/package.json" }, { - "path": "node_modules/esutils/package.json" + "path": "node_modules/make-dir/node_modules/semver/package.json" }, { - "path": "node_modules/run-queue/package.json" + "path": "node_modules/arr-diff/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/function-bind/package.json" + "path": "node_modules/word-wrap/package.json" }, { - "path": "node_modules/lcid/package.json" + "path": "node_modules/keyv/package.json" }, { - "path": "node_modules/map-visit/package.json" + "path": "node_modules/semver/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/esutils/package.json" }, { - "path": "node_modules/event-target-shim/package.json" + "path": "node_modules/intelli-espower-loader/package.json" }, { - "path": "node_modules/commondir/package.json" + "path": "node_modules/color-name/package.json" }, { - "path": "node_modules/unset-value/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/unset-value/node_modules/has-value/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" + "path": "node_modules/stringifier/package.json" }, { - "path": "node_modules/unset-value/node_modules/has-values/package.json" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/parse-passwd/package.json" + "path": "node_modules/is-regex/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/to-regex-range/package.json" }, { - "path": "node_modules/y18n/package.json" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/cacache/package.json" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": "node_modules/cacache/node_modules/rimraf/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/quick-lru/package.json" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/component-emitter/package.json" }, { "path": "node_modules/flat/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/unset-value/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-value/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/unset-value/node_modules/has-values/package.json" }, { - "path": "node_modules/es6-iterator/package.json" + "path": "node_modules/chardet/package.json" }, { - "path": "node_modules/remove-trailing-separator/package.json" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "node_modules/typescript/package.json" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/mkdirp/package.json" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/mkdirp/node_modules/minimist/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/chrome-trace-event/package.json" + "path": "node_modules/@xtuc/long/package.json" }, { - "path": "node_modules/console-browserify/package.json" + "path": "node_modules/@xtuc/ieee754/package.json" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": "node_modules/anymatch/package.json" }, { - "path": "node_modules/acorn-es7-plugin/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/package.json" }, { - "path": "node_modules/through2/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/index.js" }, { - "path": "node_modules/glob/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/inherits/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/README.md" }, { - "path": "node_modules/object-copy/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/object-copy/node_modules/is-buffer/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/object-copy/node_modules/kind-of/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/object-copy/node_modules/define-property/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/anymatch/node_modules/fill-range/package.json" }, { - "path": "node_modules/es5-ext/package.json" + "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/anymatch/node_modules/normalize-path/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/anymatch/node_modules/is-number/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/has-yarn/package.json" + "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/get-stdin/package.json" + "path": "node_modules/anymatch/node_modules/is-buffer/package.json" }, { - "path": "node_modules/global-prefix/package.json" + "path": "node_modules/anymatch/node_modules/braces/package.json" }, { - "path": "node_modules/global-prefix/node_modules/which/package.json" + "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/extglob/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" + "path": "node_modules/regex-not/package.json" }, { - "path": "node_modules/extglob/node_modules/is-descriptor/package.json" + "path": "node_modules/assert/package.json" }, { - "path": "node_modules/extglob/node_modules/extend-shallow/package.json" + "path": "node_modules/assert/node_modules/util/package.json" }, { - "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/assert/node_modules/inherits/package.json" }, { - "path": "node_modules/extglob/node_modules/define-property/package.json" + "path": "node_modules/foreground-child/package.json" }, { - "path": "node_modules/ajv-errors/package.json" + "path": "node_modules/stream-http/package.json" }, { - "path": "node_modules/node-libs-browser/package.json" + "path": "node_modules/is-plain-object/package.json" }, { - "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/constants-browserify/package.json" + "path": "node_modules/serve-static/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/which-module/package.json" }, { - "path": "node_modules/empower-core/package.json" + "path": "node_modules/object-assign/package.json" }, { - "path": "node_modules/imurmurhash/package.json" + "path": "node_modules/power-assert/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/nanomatch/package.json" }, { - "path": "node_modules/create-ecdh/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/latest-version/package.json" + "path": "node_modules/watchpack/package.json" }, { - "path": "node_modules/natural-compare/package.json" + "path": "node_modules/copy-concurrently/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" }, { - "path": "node_modules/timers-browserify/package.json" + "path": "node_modules/remove-trailing-separator/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/ajv-errors/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "node_modules/power-assert-context-traversal/package.json" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": "node_modules/class-utils/package.json" }, { - "path": "node_modules/p-limit/package.json" + "path": "node_modules/class-utils/node_modules/define-property/package.json" }, { - "path": "node_modules/call-signature/package.json" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/type-check/package.json" }, { - "path": "node_modules/neo-async/package.json" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "node_modules/des.js/package.json" + "path": "node_modules/util/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/util/node_modules/inherits/package.json" }, { - "path": "node_modules/tar/package.json" + "path": "node_modules/pack-n-play/package.json" }, { - "path": "node_modules/tar/node_modules/yallist/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" }, { - "path": "node_modules/meow/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" }, { - "path": "node_modules/meow/node_modules/locate-path/package.json" + "path": "node_modules/pascalcase/package.json" }, { - "path": "node_modules/meow/node_modules/find-up/package.json" + "path": "node_modules/snapdragon/package.json" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "node_modules/snapdragon/index.js" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "node_modules/snapdragon/LICENSE" }, { - "path": "node_modules/meow/node_modules/path-exists/package.json" + "path": "node_modules/snapdragon/README.md" }, { - "path": "node_modules/meow/node_modules/p-locate/package.json" + "path": "node_modules/snapdragon/node_modules/source-map/package.json" }, { - "path": "node_modules/meow/node_modules/p-limit/package.json" + "path": "node_modules/snapdragon/node_modules/debug/package.json" }, { - "path": "node_modules/meow/node_modules/p-try/package.json" + "path": "node_modules/snapdragon/node_modules/define-property/package.json" }, { - "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + "path": "node_modules/snapdragon/node_modules/ms/package.json" }, { - "path": "node_modules/chownr/package.json" + "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/snapdragon/lib/parser.js" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/snapdragon/lib/position.js" }, { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" + "path": "node_modules/snapdragon/lib/source-maps.js" }, { - "path": "node_modules/execa/node_modules/lru-cache/package.json" + "path": "node_modules/snapdragon/lib/utils.js" }, { - "path": "node_modules/execa/node_modules/yallist/package.json" + "path": "node_modules/snapdragon/lib/compiler.js" }, { - "path": "node_modules/execa/node_modules/which/package.json" + "path": "node_modules/ts-loader/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" + "path": "node_modules/ts-loader/node_modules/semver/package.json" }, { - "path": "node_modules/execa/node_modules/is-stream/package.json" + "path": "node_modules/cacache/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-command/package.json" + "path": "node_modules/cacache/node_modules/rimraf/package.json" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/unique-string/package.json" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/gaxios/package.json" + "path": "node_modules/cli-boxes/package.json" }, { - "path": "node_modules/create-hash/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/figgy-pudding/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/power-assert-renderer-base/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "node_modules/optionator/package.json" }, { - "path": "node_modules/regexp.prototype.flags/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/ieee754/package.json" + "path": "node_modules/from2/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/xtend/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/util-deprecate/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/ripemd160/package.json" }, { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/define-properties/package.json" + "path": "node_modules/duplexify/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/cli-cursor/package.json" + "path": "node_modules/hard-rejection/package.json" }, { - "path": "node_modules/unique-filename/package.json" + "path": "node_modules/power-assert-renderer-file/package.json" }, { - "path": "node_modules/pump/package.json" + "path": "node_modules/chrome-trace-event/package.json" }, { - "path": "node_modules/stringifier/package.json" + "path": "node_modules/has-values/package.json" }, { - "path": "node_modules/espower-location-detector/package.json" + "path": "node_modules/has-values/node_modules/is-number/package.json" }, { - "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/escape-html/package.json" + "path": "node_modules/has-values/node_modules/is-buffer/package.json" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/has-values/node_modules/kind-of/package.json" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": "node_modules/gaxios/package.json" }, { - "path": "node_modules/eastasianwidth/package.json" + "path": "node_modules/snapdragon-util/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" }, { - "path": "node_modules/js-tokens/package.json" + "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" }, { - "path": "node_modules/chalk/package.json" + "path": "node_modules/union-value/package.json" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": "node_modules/tar/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/tar/node_modules/yallist/package.json" }, { - "path": "node_modules/ajv/package.json" + "path": "node_modules/y18n/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/readdirp/package.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/package.json" }, { - "path": "node_modules/ms/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/fs-write-stream-atomic/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/index.js" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/base64-js/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/README.md" }, { - "path": "node_modules/encodeurl/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/to-arraybuffer/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/micromatch/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/mixin-deep/package.json" + "path": "node_modules/readdirp/node_modules/fill-range/package.json" }, { - "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" + "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/is-binary-path/package.json" + "path": "node_modules/readdirp/node_modules/is-number/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/readdirp/node_modules/is-buffer/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/readdirp/node_modules/braces/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/vm-browserify/package.json" + "path": "node_modules/is-descriptor/package.json" }, { - "path": "node_modules/picomatch/package.json" + "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" }, { - "path": "node_modules/source-list-map/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/@babel/parser/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": "node_modules/toidentifier/package.json" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/move-concurrently/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/type-check/package.json" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/nanomatch/package.json" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/cyclist/package.json" }, { - "path": "node_modules/querystring/package.json" + "path": "node_modules/diffie-hellman/package.json" }, { - "path": "node_modules/webpack/package.json" + "path": "node_modules/ncp/package.json" }, { - "path": "node_modules/webpack/node_modules/eslint-scope/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/webpack/node_modules/braces/package.json" + "path": "node_modules/expand-brackets/package.json" }, { - "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/expand-brackets/node_modules/debug/package.json" }, { - "path": "node_modules/webpack/node_modules/to-regex-range/package.json" + "path": "node_modules/expand-brackets/node_modules/define-property/package.json" }, { - "path": "node_modules/webpack/node_modules/memory-fs/package.json" + "path": "node_modules/expand-brackets/node_modules/ms/package.json" }, { - "path": "node_modules/webpack/node_modules/is-buffer/package.json" + "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/webpack/node_modules/acorn/package.json" + "path": "node_modules/neo-async/package.json" }, { - "path": "node_modules/webpack/node_modules/fill-range/package.json" + "path": "node_modules/querystring-es3/package.json" }, { - "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/miller-rabin/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/README.md" + "path": "node_modules/fast-diff/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/package.json" + "path": "node_modules/configstore/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/configstore/node_modules/make-dir/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/index.js" + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/LICENSE" + "path": "node_modules/universal-deep-strict-equal/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/power-assert-renderer-assertion/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/color-convert/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "node_modules/webpack/node_modules/is-number/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "node_modules/is-url/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/semver/package.json" }, { - "path": "node_modules/randombytes/package.json" + "path": "node_modules/path-browserify/package.json" }, { - "path": "node_modules/domutils/package.json" + "path": "node_modules/cliui/package.json" }, { - "path": "node_modules/browserify-zlib/package.json" + "path": "node_modules/cheerio/package.json" }, { - "path": "node_modules/p-queue/package.json" + "path": "node_modules/flatted/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/buffer/package.json" }, { - "path": "node_modules/object-visit/package.json" + "path": "node_modules/concat-stream/package.json" }, { - "path": "node_modules/ext/package.json" + "path": "node_modules/braces/package.json" }, { - "path": "node_modules/ext/node_modules/type/package.json" + "path": "node_modules/parse5/package.json" }, { - "path": "node_modules/pkg-dir/package.json" + "path": "node_modules/power-assert-renderer-base/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" + "path": "node_modules/loader-utils/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/find-up/package.json" + "path": "node_modules/es6-promisify/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/deep-equal/package.json" + "path": "node_modules/minipass/package.json" }, { - "path": "node_modules/parse5/package.json" + "path": "node_modules/minipass/node_modules/yallist/package.json" }, { - "path": "node_modules/collection-visit/package.json" + "path": "node_modules/tslib/package.json" }, { - "path": "node_modules/flatted/package.json" + "path": "node_modules/randombytes/package.json" }, { - "path": "node_modules/for-in/package.json" + "path": "node_modules/prepend-http/package.json" }, { - "path": "node_modules/util/package.json" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": "node_modules/util/node_modules/inherits/package.json" + "path": "node_modules/semver-diff/package.json" }, { - "path": "node_modules/mem/package.json" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "node_modules/once/package.json" + "path": "node_modules/cli-width/package.json" }, { - "path": "node_modules/universal-deep-strict-equal/package.json" + "path": "node_modules/escape-html/package.json" }, { - "path": "node_modules/anymatch/package.json" + "path": "node_modules/protobufjs/package.json" }, { - "path": "node_modules/anymatch/node_modules/braces/package.json" + "path": "node_modules/protobufjs/node_modules/@types/node/package.json" }, { - "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/protobufjs/cli/package.json" }, { - "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" + "path": "node_modules/protobufjs/cli/package-lock.json" }, { - "path": "node_modules/anymatch/node_modules/is-buffer/package.json" + "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" }, { - "path": "node_modules/anymatch/node_modules/fill-range/package.json" + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" }, { - "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/protobufjs/cli/node_modules/commander/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/README.md" + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/package.json" + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/protobufjs/cli/node_modules/uglify-js/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/index.js" + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/has/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/anymatch/node_modules/is-number/package.json" + "path": "node_modules/mute-stream/package.json" }, { - "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/p-queue/package.json" }, { - "path": "node_modules/anymatch/node_modules/normalize-path/package.json" + "path": "node_modules/fs-minipass/package.json" }, { - "path": "node_modules/brace-expansion/package.json" + "path": "node_modules/cli-cursor/package.json" }, { - "path": "node_modules/tapable/package.json" + "path": "node_modules/isobject/package.json" }, { - "path": "node_modules/is-number/package.json" + "path": "node_modules/pako/package.json" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/serialize-javascript/package.json" + "path": "node_modules/hmac-drbg/package.json" }, { - "path": "node_modules/webpack-cli/package.json" + "path": "node_modules/infer-owner/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/find-up/package.json" + "path": "node_modules/require-directory/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" + "path": "node_modules/enhanced-resolve/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" + "path": "node_modules/c8/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/ssri/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" + "path": "node_modules/extend-shallow/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/to-regex/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/function-bind/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/copy-descriptor/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/findup-sync/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/webpack-cli/node_modules/semver/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/index.js" }, { - "path": "node_modules/webpack-cli/node_modules/path-key/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/webpack-cli/node_modules/which/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/README.md" }, { - "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" + "path": "node_modules/findup-sync/node_modules/fill-range/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/yargs/package.json" + "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "node_modules/findup-sync/node_modules/is-number/package.json" }, { - "path": "node_modules/traverse/package.json" + "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/restore-cursor/package.json" + "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/lodash.at/package.json" + "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "node_modules/findup-sync/node_modules/braces/package.json" }, { - "path": "node_modules/isobject/package.json" + "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/responselike/package.json" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": "node_modules/pseudomap/package.json" + "path": "node_modules/querystring/package.json" }, { - "path": "node_modules/hash-base/package.json" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/espurify/package.json" + "path": "node_modules/entities/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/define-properties/package.json" }, { - "path": "node_modules/crypto-browserify/package.json" + "path": "node_modules/aproba/package.json" }, { - "path": "node_modules/power-assert-renderer-diagram/package.json" + "path": "node_modules/has-yarn/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/buffer-from/package.json" }, { - "path": "node_modules/espower-source/package.json" + "path": "node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/espower-source/node_modules/acorn/package.json" + "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" }, { - "path": "node_modules/normalize-url/package.json" + "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" }, { - "path": "node_modules/infer-owner/package.json" + "path": "node_modules/hash-base/package.json" }, { - "path": "node_modules/wordwrap/package.json" + "path": "node_modules/min-indent/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/p-defer/package.json" }, { - "path": "node_modules/table/package.json" + "path": "node_modules/underscore/package.json" }, { - "path": "node_modules/handlebars/package.json" + "path": "node_modules/power-assert-renderer-diagram/package.json" }, { - "path": "node_modules/object-assign/package.json" + "path": "node_modules/browser-stdout/package.json" }, { - "path": "node_modules/es6-weak-map/package.json" + "path": "node_modules/registry-url/package.json" }, { - "path": "node_modules/protobufjs/package.json" + "path": "node_modules/which/package.json" }, { - "path": "node_modules/protobufjs/cli/package.json" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": "node_modules/protobufjs/cli/package-lock.json" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + "path": "node_modules/@babel/parser/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + "path": "node_modules/strip-indent/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + "path": "node_modules/map-obj/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + "path": "node_modules/duplexer3/package.json" }, { - "path": "node_modules/protobufjs/node_modules/@types/node/package.json" + "path": "node_modules/isexe/package.json" }, { - "path": "node_modules/normalize-path/package.json" + "path": "node_modules/klaw/package.json" }, { - "path": "node_modules/cyclist/package.json" + "path": "node_modules/inherits/package.json" }, { - "path": "node_modules/espower/package.json" + "path": "node_modules/lodash.at/package.json" }, { - "path": "node_modules/espower/node_modules/source-map/package.json" + "path": "node_modules/pump/package.json" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": "node_modules/depd/package.json" }, { - "path": "node_modules/brorand/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/p-is-promise/package.json" + "path": "node_modules/string-width/package.json" }, { - "path": "node_modules/array-find-index/package.json" + "path": "node_modules/lines-and-columns/package.json" }, { "path": "node_modules/astral-regex/package.json" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": "node_modules/rimraf/package.json" }, { - "path": "node_modules/test-exclude/package.json" + "path": "node_modules/restore-cursor/package.json" }, { - "path": "node_modules/es6-promisify/package.json" + "path": "node_modules/yallist/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/kind-of/package.json" }, { - "path": "node_modules/optionator/package.json" + "path": "node_modules/flush-write-stream/package.json" }, { - "path": "node_modules/is-plain-object/package.json" + "path": "node_modules/object-visit/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/emoji-regex/package.json" }, { - "path": "node_modules/c8/package.json" + "path": "system-test/install.ts" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": "system-test/fixtures/sample/src/index.ts" }, { - "path": "node_modules/statuses/package.json" + "path": "system-test/fixtures/sample/src/index.js" }, { - "path": "node_modules/semver-diff/package.json" + "path": ".git/config" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": ".git/index" }, { - "path": "node_modules/signal-exit/package.json" + "path": ".git/packed-refs" }, { - "path": "node_modules/jsdoc/package.json" + "path": ".git/shallow" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": ".git/HEAD" }, { - "path": "node_modules/map-age-cleaner/package.json" + "path": ".git/refs/heads/autosynth" }, { - "path": "node_modules/resolve-url/package.json" + "path": ".git/refs/heads/master" }, { - "path": "node_modules/duplexify/package.json" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": "node_modules/ret/package.json" + "path": ".git/objects/pack/pack-12776461e2913846501d03bc3cd35c9894d45c4d.idx" }, { - "path": "node_modules/object-is/package.json" + "path": ".git/objects/pack/pack-12776461e2913846501d03bc3cd35c9894d45c4d.pack" }, { - "path": "node_modules/tslib/package.json" + "path": ".git/logs/HEAD" }, { - "path": "node_modules/extend/package.json" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": "node_modules/is-wsl/package.json" + "path": ".git/logs/refs/heads/master" }, { - "path": "node_modules/power-assert-context-reducer-ast/package.json" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + "path": "src/index.ts" }, { - "path": "node_modules/css-what/package.json" + "path": "src/v1/index.ts" }, { - "path": "node_modules/power-assert-renderer-comparison/package.json" + "path": "src/v1/device_manager_client_config.json" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": "src/v1/device_manager_proto_list.json" }, { - "path": "node_modules/unique-slug/package.json" + "path": "src/v1/device_manager_client.ts" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "src/v1/doc/google/iam/v1/doc_options.js" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "src/v1/doc/google/iam/v1/doc_policy.js" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "src/v1/doc/google/cloud/iot/v1/doc_resources.js" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "src/v1/doc/google/cloud/iot/v1/doc_device_manager.js" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "src/v1/doc/google/type/doc_expr.js" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "src/v1/doc/google/rpc/doc_status.js" }, { - "path": "node_modules/upath/package.json" + "path": "src/v1/doc/google/protobuf/doc_empty.js" }, { - "path": "node_modules/markdown-it/package.json" + "path": "src/v1/doc/google/protobuf/doc_any.js" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": "src/v1/doc/google/protobuf/doc_timestamp.js" }, { - "path": "node_modules/buffer-from/package.json" + "path": "src/v1/doc/google/protobuf/doc_field_mask.js" }, { - "path": "node_modules/minizlib/package.json" + "path": "protos/protos.js" }, { - "path": "node_modules/minizlib/node_modules/yallist/package.json" + "path": "protos/protos.d.ts" }, { - "path": "node_modules/domelementtype/package.json" + "path": "protos/protos.json" }, { - "path": "node_modules/ci-info/package.json" + "path": "protos/google/cloud/common_resources.proto" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "protos/google/cloud/iot/v1/resources.proto" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "protos/google/cloud/iot/v1/device_manager.proto" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": ".kokoro/common.cfg" }, { - "path": "node_modules/@types/node/package.json" + "path": ".kokoro/publish.sh" }, { - "path": "node_modules/@types/long/package.json" + "path": ".kokoro/docs.sh" }, { - "path": "node_modules/serve-static/package.json" + "path": ".kokoro/lint.sh" }, { - "path": "node_modules/make-dir/package.json" + "path": ".kokoro/.gitattributes" }, { - "path": "node_modules/make-dir/node_modules/semver/package.json" + "path": ".kokoro/system-test.sh" }, { - "path": "node_modules/md5.js/package.json" + "path": ".kokoro/test.bat" }, { - "path": "node_modules/esquery/package.json" + "path": ".kokoro/test.sh" }, { - "path": "node_modules/ncp/package.json" + "path": ".kokoro/trampoline.sh" }, { - "path": "node_modules/emoji-regex/package.json" + "path": ".kokoro/samples-test.sh" }, { - "path": "node_modules/set-value/package.json" + "path": ".kokoro/presubmit/node10/common.cfg" }, { - "path": "node_modules/set-value/node_modules/extend-shallow/package.json" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": "node_modules/read-pkg/package.json" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": "node_modules/fast-diff/package.json" + "path": ".kokoro/presubmit/node10/test.cfg" }, { - "path": "node_modules/path-browserify/package.json" + "path": ".kokoro/presubmit/node10/samples-test.cfg" }, { - "path": "node_modules/xtend/package.json" + "path": ".kokoro/presubmit/node10/docs.cfg" }, { - "path": "node_modules/resolve/package.json" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": "node_modules/webpack-sources/package.json" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": "node_modules/is-extendable/package.json" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": ".kokoro/release/common.cfg" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": ".kokoro/release/publish.cfg" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": ".kokoro/release/docs.sh" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": ".kokoro/release/docs.cfg" }, { - "path": "node_modules/p-cancelable/package.json" + "path": ".kokoro/continuous/node10/common.cfg" }, { - "path": "node_modules/aproba/package.json" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": "node_modules/resolve-dir/package.json" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": ".kokoro/continuous/node10/samples-test.cfg" }, { - "path": "node_modules/interpret/package.json" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": "node_modules/power-assert-context-traversal/package.json" + "path": ".kokoro/continuous/node12/common.cfg" }, { - "path": "node_modules/long/package.json" + "path": ".kokoro/continuous/node12/test.cfg" }, { - "path": "node_modules/d/package.json" + "path": ".kokoro/continuous/node8/common.cfg" }, { - "path": "node_modules/debug/package.json" + "path": ".kokoro/continuous/node8/test.cfg" }, { - "path": "node_modules/mimic-fn/package.json" + "path": "samples/package.json" }, { - "path": "node_modules/bn.js/package.json" + "path": "samples/quickstart.js" }, { - "path": "node_modules/arr-union/package.json" + "path": "samples/.eslintrc.yml" }, { - "path": "node_modules/cipher-base/package.json" + "path": "samples/README.md" }, { - "path": "node_modules/typedarray/package.json" + "path": "samples/test/quickstart.test.js" }, { - "path": "node_modules/isexe/package.json" + "path": "build/system-test/install.js" }, { - "path": "node_modules/multi-stage-sourcemap/package.json" + "path": "build/system-test/install.d.ts" }, { - "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + "path": "build/system-test/install.js.map" }, { - "path": "node_modules/find-cache-dir/package.json" + "path": "build/src/index.js" }, { - "path": "node_modules/uc.micro/package.json" + "path": "build/src/index.js.map" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "build/src/index.d.ts" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "build/src/v1/device_manager_client_config.d.ts" }, { - "path": "node_modules/yargs/package.json" + "path": "build/src/v1/device_manager_client_config.json" }, { - "path": "node_modules/yargs/node_modules/locate-path/package.json" + "path": "build/src/v1/index.js" }, { - "path": "node_modules/yargs/node_modules/find-up/package.json" + "path": "build/src/v1/index.js.map" }, { - "path": "node_modules/yargs/node_modules/path-exists/package.json" + "path": "build/src/v1/device_manager_client.d.ts" }, { - "path": "node_modules/yargs/node_modules/p-locate/package.json" + "path": "build/src/v1/device_manager_client.js" }, { - "path": "node_modules/nice-try/package.json" + "path": "build/src/v1/device_manager_client.js.map" }, { - "path": "node_modules/static-extend/package.json" + "path": "build/src/v1/index.d.ts" }, { - "path": "node_modules/static-extend/node_modules/define-property/package.json" + "path": "build/protos/protos.js" }, { - "path": "node_modules/has/package.json" + "path": "build/protos/protos.d.ts" }, { - "path": "node_modules/xmlcreate/package.json" + "path": "build/protos/protos.json" }, { - "path": "node_modules/escallmatch/package.json" + "path": "build/protos/google/cloud/common_resources.proto" }, { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" + "path": "build/protos/google/cloud/iot/v1/resources.proto" }, { - "path": "node_modules/get-caller-file/package.json" + "path": "build/protos/google/cloud/iot/v1/device_manager.proto" }, { - "path": "node_modules/jwa/package.json" + "path": "build/test/gapic-device_manager-v1.d.ts" }, { - "path": "node_modules/json5/package.json" + "path": "build/test/gapic-device_manager-v1.js" }, { - "path": "node_modules/json5/node_modules/minimist/package.json" + "path": "build/test/gapic-device_manager-v1.js.map" }, { - "path": "smoke-test/device_manager_smoke_test.js" + "path": "test/mocha.opts" }, { - "path": "smoke-test/.eslintrc.yml" + "path": "test/gapic-device_manager-v1.ts" } ] } \ No newline at end of file diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index 2736aee84f7..c9aa74ec221 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/system-test/install.ts @@ -18,6 +18,7 @@ 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() { From 369e5608a9630800d657dc80cb8ff5e0a2ee196f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 6 Jan 2020 18:50:07 +0200 Subject: [PATCH 156/370] chore(deps): update dependency mocha to v7 (#245) --- packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 15252f8ef1d..4e8bb32abf2 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -59,7 +59,7 @@ "linkinator": "^1.5.0", "power-assert": "^1.6.0", "prettier": "^1.13.7", - "mocha": "^6.1.4", + "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "ts-loader": "^6.2.1", diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 4c9ddd48917..441e737f157 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -19,6 +19,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^6.0.0" + "mocha": "^7.0.0" } } From b388e649cc7c0ced9b13b86755fe849eff7fee54 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2020 11:06:20 -0800 Subject: [PATCH 157/370] chore: release 1.6.0 (#243) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] Co-authored-by: Alexander Fenster --- packages/google-cloud-iot/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index cc26823f27d..5ffaa8dfd98 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.6.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.5.0...v1.6.0) (2020-01-05) + + +### Features + +* move to typescript code generation ([#236](https://www.github.com/googleapis/nodejs-iot/issues/236)) ([beb3f18](https://www.github.com/googleapis/nodejs-iot/commit/beb3f18b32715b9cc72e7905bde8fffac58c494f)) + + +### Bug Fixes + +* **deps:** pin TypeScript below 3.7.0 ([d5f5ff2](https://www.github.com/googleapis/nodejs-iot/commit/d5f5ff2bbc885b7bcc6798c3620643407782d8fc)) +* better client close(), update .nycrc, require mocha explicitly ([2ca2d37](https://www.github.com/googleapis/nodejs-iot/commit/2ca2d378bcafe0d821506e0696e973d14c91af31)) + ## [1.5.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.4.0...v1.5.0) (2019-11-20) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 4e8bb32abf2..44e6cca2f72 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.5.0", + "version": "1.6.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 441e737f157..361a1e43bff 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.5.0" + "@google-cloud/iot": "^1.6.0" }, "devDependencies": { "chai": "^4.2.0", From 96be2d0e8abe829735edcd480b919056faf7ec3b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jan 2020 09:05:21 -0800 Subject: [PATCH 158/370] fix: proper routing headers --- .../src/v1/device_manager_client.ts | 4 +- packages/google-cloud-iot/synth.metadata | 3875 +---------------- 2 files changed, 5 insertions(+), 3874 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index d27bafdc828..5026aa60ef9 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -527,7 +527,7 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - device_registry_name: request.deviceRegistry!.name || '', + 'device_registry.name': request.deviceRegistry!.name || '', }); return this._innerApiCalls.updateDeviceRegistry(request, options, callback); } @@ -832,7 +832,7 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - device_name: request.device!.name || '', + 'device.name': request.device!.name || '', }); return this._innerApiCalls.updateDevice(request, options, callback); } diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index fe6ba7c171b..4c8f162e009 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2020-01-04T12:18:36.336996Z", + "updateTime": "2020-01-09T12:17:25.286718Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91ef2d9dd69807b0b79555f22566fb2d81e49ff9", - "internalRef": "287999179" + "sha": "6ace586805c08896fef43e28a261337fcf3f022b", + "internalRef": "288783603" } }, { @@ -27,3874 +27,5 @@ "generator": "gapic-generator-typescript" } } - ], - "newFiles": [ - { - "path": "package.json" - }, - { - "path": "webpack.config.js" - }, - { - "path": ".prettierignore" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "tsconfig.json" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": ".prettierrc" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": "renovate.json" - }, - { - "path": ".nycrc" - }, - { - "path": "LICENSE" - }, - { - "path": "synth.py" - }, - { - "path": ".eslintignore" - }, - { - "path": "linkinator.config.json" - }, - { - "path": ".readme-partials.yaml" - }, - { - "path": "package-lock.json" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": "tslint.json" - }, - { - "path": "README.md" - }, - { - "path": "synth.metadata" - }, - { - "path": ".gitignore" - }, - { - "path": "codecov.yaml" - }, - { - "path": ".jsdoc.js" - }, - { - "path": "smoke-test/device_manager_smoke_test.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": "node_modules/uc.micro/package.json" - }, - { - "path": "node_modules/minimalistic-crypto-utils/package.json" - }, - { - "path": "node_modules/eastasianwidth/package.json" - }, - { - "path": "node_modules/big.js/package.json" - }, - { - "path": "node_modules/strip-bom/package.json" - }, - { - "path": "node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/object-is/package.json" - }, - { - "path": "node_modules/is-arguments/package.json" - }, - { - "path": "node_modules/stream-browserify/package.json" - }, - { - "path": "node_modules/eventemitter3/package.json" - }, - { - "path": "node_modules/long/package.json" - }, - { - "path": "node_modules/events/package.json" - }, - { - "path": "node_modules/lodash/package.json" - }, - { - "path": "node_modules/diff/package.json" - }, - { - "path": "node_modules/has-flag/package.json" - }, - { - "path": "node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/source-map/package.json" - }, - { - "path": "node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/builtin-status-codes/package.json" - }, - { - "path": "node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/tmp/package.json" - }, - { - "path": "node_modules/get-value/package.json" - }, - { - "path": "node_modules/extglob/package.json" - }, - { - "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/extglob/node_modules/define-property/package.json" - }, - { - "path": "node_modules/extglob/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/extglob/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/got/package.json" - }, - { - "path": "node_modules/got/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/agent-base/package.json" - }, - { - "path": "node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/google-gax/package.json" - }, - { - "path": "node_modules/next-tick/package.json" - }, - { - "path": "node_modules/vm-browserify/package.json" - }, - { - "path": "node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/browserify-rsa/package.json" - }, - { - "path": "node_modules/is-symbol/package.json" - }, - { - "path": "node_modules/once/package.json" - }, - { - "path": "node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/ansi-escapes/package.json" - }, - { - "path": "node_modules/gcp-metadata/package.json" - }, - { - "path": "node_modules/espower-loader/package.json" - }, - { - "path": "node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/setimmediate/package.json" - }, - { - "path": "node_modules/bn.js/package.json" - }, - { - "path": "node_modules/doctrine/package.json" - }, - { - "path": "node_modules/power-assert-context-formatter/package.json" - }, - { - "path": "node_modules/marked/package.json" - }, - { - "path": "node_modules/jsdoc/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/terser-webpack-plugin/package.json" - }, - { - "path": "node_modules/terser-webpack-plugin/node_modules/source-map/package.json" - }, - { - "path": "node_modules/flat-cache/package.json" - }, - { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/domain-browser/package.json" - }, - { - "path": "node_modules/is-npm/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/base64-js/package.json" - }, - { - "path": "node_modules/is-glob/package.json" - }, - { - "path": "node_modules/errno/package.json" - }, - { - "path": "node_modules/taffydb/package.json" - }, - { - "path": "node_modules/mocha/package.json" - }, - { - "path": "node_modules/mocha/node_modules/diff/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/mocha/node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/mocha/node_modules/find-up/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/mocha/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/mocha/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ms/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-name/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/which/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/browserify-des/package.json" - }, - { - "path": "node_modules/minimist/package.json" - }, - { - "path": "node_modules/type/package.json" - }, - { - "path": "node_modules/yargs-unparser/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/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/find-up/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/chownr/package.json" - }, - { - "path": "node_modules/map-visit/package.json" - }, - { - "path": "node_modules/invert-kv/package.json" - }, - { - "path": "node_modules/css-select/package.json" - }, - { - "path": "node_modules/file-entry-cache/package.json" - }, - { - "path": "node_modules/import-local/package.json" - }, - { - "path": "node_modules/he/package.json" - }, - { - "path": "node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" - }, - { - "path": "node_modules/xmlcreate/package.json" - }, - { - "path": "node_modules/resolve-cwd/package.json" - }, - { - "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/stream-each/package.json" - }, - { - "path": "node_modules/micromatch/package.json" - }, - { - "path": "node_modules/des.js/package.json" - }, - { - "path": "node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/ecdsa-sig-formatter/package.json" - }, - { - "path": "node_modules/nice-try/package.json" - }, - { - "path": "node_modules/log-symbols/package.json" - }, - { - "path": "node_modules/commander/package.json" - }, - { - "path": "node_modules/object.getownpropertydescriptors/package.json" - }, - { - "path": "node_modules/safe-regex/package.json" - }, - { - "path": "node_modules/@protobufjs/path/package.json" - }, - { - "path": "node_modules/@protobufjs/pool/package.json" - }, - { - "path": "node_modules/@protobufjs/float/package.json" - }, - { - "path": "node_modules/@protobufjs/aspromise/package.json" - }, - { - "path": "node_modules/@protobufjs/fetch/package.json" - }, - { - "path": "node_modules/@protobufjs/utf8/package.json" - }, - { - "path": "node_modules/@protobufjs/codegen/package.json" - }, - { - "path": "node_modules/@protobufjs/inquire/package.json" - }, - { - "path": "node_modules/@protobufjs/base64/package.json" - }, - { - "path": "node_modules/@protobufjs/eventemitter/package.json" - }, - { - "path": "node_modules/public-encrypt/package.json" - }, - { - "path": "node_modules/webpack-sources/package.json" - }, - { - "path": "node_modules/webpack-sources/node_modules/source-map/package.json" - }, - { - "path": "node_modules/gtoken/package.json" - }, - { - "path": "node_modules/arr-flatten/package.json" - }, - { - "path": "node_modules/through2/package.json" - }, - { - "path": "node_modules/p-limit/package.json" - }, - { - "path": "node_modules/argparse/package.json" - }, - { - "path": "node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/extend/package.json" - }, - { - "path": "node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/destroy/package.json" - }, - { - "path": "node_modules/power-assert-formatter/package.json" - }, - { - "path": "node_modules/atob/package.json" - }, - { - "path": "node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/map-age-cleaner/package.json" - }, - { - "path": "node_modules/fill-range/package.json" - }, - { - "path": "node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/unique-slug/package.json" - }, - { - "path": "node_modules/assign-symbols/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/core-util-is/package.json" - }, - { - "path": "node_modules/decode-uri-component/package.json" - }, - { - "path": "node_modules/string.prototype.trimright/package.json" - }, - { - "path": "node_modules/timers-browserify/package.json" - }, - { - "path": "node_modules/catharsis/package.json" - }, - { - "path": "node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/linkinator/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-npm/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/widest-line/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/boxen/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/redent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/chalk/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/meow/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/term-size/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/arrify/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/unique-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/configstore/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/indent-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/fresh/package.json" - }, - { - "path": "node_modules/mississippi/package.json" - }, - { - "path": "node_modules/mississippi/node_modules/through2/package.json" - }, - { - "path": "node_modules/safer-buffer/package.json" - }, - { - "path": "node_modules/is-stream-ended/package.json" - }, - { - "path": "node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/commondir/package.json" - }, - { - "path": "node_modules/requizzle/package.json" - }, - { - "path": "node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/figures/package.json" - }, - { - "path": "node_modules/power-assert-util-string-width/package.json" - }, - { - "path": "node_modules/serialize-javascript/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/abort-controller/package.json" - }, - { - "path": "node_modules/binary-extensions/package.json" - }, - { - "path": "node_modules/widest-line/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/string-width/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/boxen/package.json" - }, - { - "path": "node_modules/boxen/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/boxen/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/boxen/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/string-width/package.json" - }, - { - "path": "node_modules/boxen/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/glob/package.json" - }, - { - "path": "node_modules/buffer-equal-constant-time/package.json" - }, - { - "path": "node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/acorn-es7-plugin/package.json" - }, - { - "path": "node_modules/acorn/package.json" - }, - { - "path": "node_modules/ieee754/package.json" - }, - { - "path": "node_modules/parse-passwd/package.json" - }, - { - "path": "node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/asn1.js/package.json" - }, - { - "path": "node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/node-environment-flags/package.json" - }, - { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" - }, - { - "path": "node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/escallmatch/package.json" - }, - { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" - }, - { - "path": "node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/callsites/package.json" - }, - { - "path": "node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/type-fest/package.json" - }, - { - "path": "node_modules/espree/package.json" - }, - { - "path": "node_modules/server-destroy/package.json" - }, - { - "path": "node_modules/cache-base/package.json" - }, - { - "path": "node_modules/prr/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/fs.realpath/package.json" - }, - { - "path": "node_modules/es6-set/package.json" - }, - { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/ajv/package.json" - }, - { - "path": "node_modules/ret/package.json" - }, - { - "path": "node_modules/prettier-linter-helpers/package.json" - }, - { - "path": "node_modules/homedir-polyfill/package.json" - }, - { - "path": "node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/p-finally/package.json" - }, - { - "path": "node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/redent/package.json" - }, - { - "path": "node_modules/tsutils/package.json" - }, - { - "path": "node_modules/diff-match-patch/package.json" - }, - { - "path": "node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/core-js/package.json" - }, - { - "path": "node_modules/package-json/package.json" - }, - { - "path": "node_modules/package-json/node_modules/semver/package.json" - }, - { - "path": "node_modules/indexof/package.json" - }, - { - "path": "node_modules/.bin/sha.js" - }, - { - "path": "node_modules/path-type/package.json" - }, - { - "path": "node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/p-try/package.json" - }, - { - "path": "node_modules/empower/package.json" - }, - { - "path": "node_modules/pbkdf2/package.json" - }, - { - "path": "node_modules/external-editor/package.json" - }, - { - "path": "node_modules/has-value/package.json" - }, - { - "path": "node_modules/html-escaper/package.json" - }, - { - "path": "node_modules/chokidar/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/is-number/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/braces/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/picomatch/package.json" - }, - { - "path": "node_modules/pseudomap/package.json" - }, - { - "path": "node_modules/cipher-base/package.json" - }, - { - "path": "node_modules/async-each/package.json" - }, - { - "path": "node_modules/regexpp/package.json" - }, - { - "path": "node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/is-number/package.json" - }, - { - "path": "node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/encodeurl/package.json" - }, - { - "path": "node_modules/table/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/table/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/string-width/package.json" - }, - { - "path": "node_modules/table/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/has-symbols/package.json" - }, - { - "path": "node_modules/escodegen/package.json" - }, - { - "path": "node_modules/escodegen/node_modules/source-map/package.json" - }, - { - "path": "node_modules/escodegen/node_modules/esprima/package.json" - }, - { - "path": "node_modules/crypto-browserify/package.json" - }, - { - "path": "node_modules/null-loader/package.json" - }, - { - "path": "node_modules/to-object-path/package.json" - }, - { - "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/to-object-path/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/unpipe/package.json" - }, - { - "path": "node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/array-find-index/package.json" - }, - { - "path": "node_modules/array-unique/package.json" - }, - { - "path": "node_modules/elliptic/package.json" - }, - { - "path": "node_modules/es-abstract/package.json" - }, - { - "path": "node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/domutils/package.json" - }, - { - "path": "node_modules/brorand/package.json" - }, - { - "path": "node_modules/resolve-url/package.json" - }, - { - "path": "node_modules/find-up/package.json" - }, - { - "path": "node_modules/arr-union/package.json" - }, - { - "path": "node_modules/event-emitter/package.json" - }, - { - "path": "node_modules/parse-json/package.json" - }, - { - "path": "node_modules/process/package.json" - }, - { - "path": "node_modules/execa/package.json" - }, - { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/execa/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/execa/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/execa/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/execa/node_modules/which/package.json" - }, - { - "path": "node_modules/execa/node_modules/yallist/package.json" - }, - { - "path": "node_modules/source-list-map/package.json" - }, - { - "path": "node_modules/linkify-it/package.json" - }, - { - "path": "node_modules/ignore/package.json" - }, - { - "path": "node_modules/strip-eof/package.json" - }, - { - "path": "node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/etag/package.json" - }, - { - "path": "node_modules/empower-assert/package.json" - }, - { - "path": "node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/json-bigint/package.json" - }, - { - "path": "node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/traverse/package.json" - }, - { - "path": "node_modules/escope/package.json" - }, - { - "path": "node_modules/prettier/package.json" - }, - { - "path": "node_modules/mime/package.json" - }, - { - "path": "node_modules/google-auth-library/package.json" - }, - { - "path": "node_modules/pumpify/package.json" - }, - { - "path": "node_modules/pumpify/node_modules/pump/package.json" - }, - { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" - }, - { - "path": "node_modules/string.prototype.trimleft/package.json" - }, - { - "path": "node_modules/os-browserify/package.json" - }, - { - "path": "node_modules/get-stdin/package.json" - }, - { - "path": "node_modules/lcid/package.json" - }, - { - "path": "node_modules/espower/package.json" - }, - { - "path": "node_modules/espower/node_modules/source-map/package.json" - }, - { - "path": "node_modules/minimatch/package.json" - }, - { - "path": "node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/constants-browserify/package.json" - }, - { - "path": "node_modules/nth-check/package.json" - }, - { - "path": "node_modules/source-map-url/package.json" - }, - { - "path": "node_modules/is-date-object/package.json" - }, - { - "path": "node_modules/pkg-dir/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/find-up/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/onetime/package.json" - }, - { - "path": "node_modules/to-arraybuffer/package.json" - }, - { - "path": "node_modules/uri-js/package.json" - }, - { - "path": "node_modules/power-assert-renderer-comparison/package.json" - }, - { - "path": "node_modules/locate-path/package.json" - }, - { - "path": "node_modules/text-table/package.json" - }, - { - "path": "node_modules/p-timeout/package.json" - }, - { - "path": "node_modules/progress/package.json" - }, - { - "path": "node_modules/is-wsl/package.json" - }, - { - "path": "node_modules/global-prefix/package.json" - }, - { - "path": "node_modules/global-prefix/node_modules/which/package.json" - }, - { - "path": "node_modules/resolve-dir/package.json" - }, - { - "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" - }, - { - "path": "node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/es5-ext/package.json" - }, - { - "path": "node_modules/statuses/package.json" - }, - { - "path": "node_modules/repeat-string/package.json" - }, - { - "path": "node_modules/markdown-it-anchor/package.json" - }, - { - "path": "node_modules/fs-write-stream-atomic/package.json" - }, - { - "path": "node_modules/jsonexport/package.json" - }, - { - "path": "node_modules/domhandler/package.json" - }, - { - "path": "node_modules/terser/package.json" - }, - { - "path": "node_modules/terser/node_modules/source-map/package.json" - }, - { - "path": "node_modules/terser/node_modules/source-map-support/package.json" - }, - { - "path": "node_modules/ajv-keywords/package.json" - }, - { - "path": "node_modules/fragment-cache/package.json" - }, - { - "path": "node_modules/tty-browserify/package.json" - }, - { - "path": "node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/sha.js/package.json" - }, - { - "path": "node_modules/sha.js/.travis.yml" - }, - { - "path": "node_modules/sha.js/sha256.js" - }, - { - "path": "node_modules/sha.js/sha1.js" - }, - { - "path": "node_modules/sha.js/index.js" - }, - { - "path": "node_modules/sha.js/LICENSE" - }, - { - "path": "node_modules/sha.js/sha.js" - }, - { - "path": "node_modules/sha.js/sha384.js" - }, - { - "path": "node_modules/sha.js/hash.js" - }, - { - "path": "node_modules/sha.js/sha224.js" - }, - { - "path": "node_modules/sha.js/sha512.js" - }, - { - "path": "node_modules/sha.js/README.md" - }, - { - "path": "node_modules/sha.js/bin.js" - }, - { - "path": "node_modules/sha.js/test/hash.js" - }, - { - "path": "node_modules/sha.js/test/test.js" - }, - { - "path": "node_modules/sha.js/test/vectors.js" - }, - { - "path": "node_modules/upath/package.json" - }, - { - "path": "node_modules/set-value/package.json" - }, - { - "path": "node_modules/set-value/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/md5.js/package.json" - }, - { - "path": "node_modules/empower-core/package.json" - }, - { - "path": "node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/htmlparser2/package.json" - }, - { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/evp_bytestokey/package.json" - }, - { - "path": "node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/minizlib/package.json" - }, - { - "path": "node_modules/minizlib/node_modules/yallist/package.json" - }, - { - "path": "node_modules/send/package.json" - }, - { - "path": "node_modules/send/node_modules/mime/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/ms/package.json" - }, - { - "path": "node_modules/convert-source-map/package.json" - }, - { - "path": "node_modules/typedarray/package.json" - }, - { - "path": "node_modules/node-libs-browser/package.json" - }, - { - "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" - }, - { - "path": "node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/move-concurrently/package.json" - }, - { - "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/global-modules/package.json" - }, - { - "path": "node_modules/global-modules/node_modules/global-prefix/package.json" - }, - { - "path": "node_modules/global-modules/node_modules/which/package.json" - }, - { - "path": "node_modules/es6-weak-map/package.json" - }, - { - "path": "node_modules/array-filter/package.json" - }, - { - "path": "node_modules/es6-map/package.json" - }, - { - "path": "node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/type-name/package.json" - }, - { - "path": "node_modules/urix/package.json" - }, - { - "path": "node_modules/map-cache/package.json" - }, - { - "path": "node_modules/path-dirname/package.json" - }, - { - "path": "node_modules/browserify-cipher/package.json" - }, - { - "path": "node_modules/regexp.prototype.flags/package.json" - }, - { - "path": "node_modules/deep-equal/package.json" - }, - { - "path": "node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/chalk/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-name/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/write/package.json" - }, - { - "path": "node_modules/npm-bundled/package.json" - }, - { - "path": "node_modules/ext/package.json" - }, - { - "path": "node_modules/ext/node_modules/type/package.json" - }, - { - "path": "node_modules/yargs/package.json" - }, - { - "path": "node_modules/through/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" - }, - { - "path": "node_modules/parseurl/package.json" - }, - { - "path": "node_modules/setprototypeof/package.json" - }, - { - "path": "node_modules/jwa/package.json" - }, - { - "path": "node_modules/camelcase/package.json" - }, - { - "path": "node_modules/deep-extend/package.json" - }, - { - "path": "node_modules/inflight/package.json" - }, - { - "path": "node_modules/console-browserify/package.json" - }, - { - "path": "node_modules/istanbul-reports/package.json" - }, - { - "path": "node_modules/es6-iterator/package.json" - }, - { - "path": "node_modules/is-binary-path/package.json" - }, - { - "path": "node_modules/run-async/package.json" - }, - { - "path": "node_modules/loader-runner/package.json" - }, - { - "path": "node_modules/@bcoe/v8-coverage/package.json" - }, - { - "path": "node_modules/esquery/package.json" - }, - { - "path": "node_modules/resolve/package.json" - }, - { - "path": "node_modules/json5/package.json" - }, - { - "path": "node_modules/json5/node_modules/minimist/package.json" - }, - { - "path": "node_modules/functional-red-black-tree/package.json" - }, - { - "path": "node_modules/webpack-cli/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/find-up/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/yargs/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/path-key/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/color-name/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cliui/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/which/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/string-width/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/inquirer/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/loud-rejection/package.json" - }, - { - "path": "node_modules/meow/package.json" - }, - { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/meow/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/schema-utils/package.json" - }, - { - "path": "node_modules/npm-normalize-package-bin/package.json" - }, - { - "path": "node_modules/es-to-primitive/package.json" - }, - { - "path": "node_modules/ini/package.json" - }, - { - "path": "node_modules/static-extend/package.json" - }, - { - "path": "node_modules/static-extend/node_modules/define-property/package.json" - }, - { - "path": "node_modules/collection-visit/package.json" - }, - { - "path": "node_modules/parse-asn1/package.json" - }, - { - "path": "node_modules/call-signature/package.json" - }, - { - "path": "node_modules/dom-serializer/package.json" - }, - { - "path": "node_modules/on-finished/package.json" - }, - { - "path": "node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/browserify-aes/package.json" - }, - { - "path": "node_modules/ansi-colors/package.json" - }, - { - "path": "node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/supports-color/package.json" - }, - { - "path": "node_modules/eslint-visitor-keys/package.json" - }, - { - "path": "node_modules/detect-file/package.json" - }, - { - "path": "node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/ignore-walk/package.json" - }, - { - "path": "node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/markdown-it/package.json" - }, - { - "path": "node_modules/rxjs/package.json" - }, - { - "path": "node_modules/iconv-lite/package.json" - }, - { - "path": "node_modules/snapdragon-node/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/fast-text-encoding/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-fsm/package.json" - }, - { - "path": "node_modules/@webassemblyjs/leb128/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-opt/package.json" - }, - { - "path": "node_modules/@webassemblyjs/ieee754/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wast-printer/package.json" - }, - { - "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-gen/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-module-context/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-parser/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wast-parser/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-api-error/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-buffer/package.json" - }, - { - "path": "node_modules/@webassemblyjs/utf8/package.json" - }, - { - "path": "node_modules/@webassemblyjs/ast/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-edit/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" - }, - { - "path": "node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/test-exclude/package.json" - }, - { - "path": "node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/worker-farm/package.json" - }, - { - "path": "node_modules/for-in/package.json" - }, - { - "path": "node_modules/buffer-xor/package.json" - }, - { - "path": "node_modules/hash.js/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/punycode/package.json" - }, - { - "path": "node_modules/npm-packlist/package.json" - }, - { - "path": "node_modules/run-queue/package.json" - }, - { - "path": "node_modules/ee-first/package.json" - }, - { - "path": "node_modules/p-locate/package.json" - }, - { - "path": "node_modules/@types/long/package.json" - }, - { - "path": "node_modules/@types/mocha/package.json" - }, - { - "path": "node_modules/@types/minimist/package.json" - }, - { - "path": "node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/@types/is-windows/package.json" - }, - { - "path": "node_modules/@types/fs-extra/package.json" - }, - { - "path": "node_modules/@types/fs-extra/node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/@types/normalize-package-data/package.json" - }, - { - "path": "node_modules/wide-align/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/create-hash/package.json" - }, - { - "path": "node_modules/expand-tilde/package.json" - }, - { - "path": "node_modules/is-promise/package.json" - }, - { - "path": "node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/slice-ansi/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-name/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/load-json-file/package.json" - }, - { - "path": "node_modules/eslint-plugin-prettier/package.json" - }, - { - "path": "node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/repeat-element/package.json" - }, - { - "path": "node_modules/emojis-list/package.json" - }, - { - "path": "node_modules/currently-unhandled/package.json" - }, - { - "path": "node_modules/unique-filename/package.json" - }, - { - "path": "node_modules/parent-module/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/package.json" - }, - { - "path": "node_modules/domelementtype/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/figgy-pudding/package.json" - }, - { - "path": "node_modules/path-key/package.json" - }, - { - "path": "node_modules/isarray/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/responselike/package.json" - }, - { - "path": "node_modules/create-hmac/package.json" - }, - { - "path": "node_modules/istanbul-lib-coverage/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/amdefine/package.json" - }, - { - "path": "node_modules/estraverse/package.json" - }, - { - "path": "node_modules/http-errors/package.json" - }, - { - "path": "node_modules/mixin-deep/package.json" - }, - { - "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/term-size/package.json" - }, - { - "path": "node_modules/promise-inflight/package.json" - }, - { - "path": "node_modules/source-map-resolve/package.json" - }, - { - "path": "node_modules/browserify-zlib/package.json" - }, - { - "path": "node_modules/bluebird/package.json" - }, - { - "path": "node_modules/randomfill/package.json" - }, - { - "path": "node_modules/posix-character-classes/package.json" - }, - { - "path": "node_modules/create-ecdh/package.json" - }, - { - "path": "node_modules/natural-compare/package.json" - }, - { - "path": "node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/ansi-align/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/ansi-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/js2xmlparser/package.json" - }, - { - "path": "node_modules/minimalistic-assert/package.json" - }, - { - "path": "node_modules/espower-source/package.json" - }, - { - "path": "node_modules/espower-source/node_modules/acorn/package.json" - }, - { - "path": "node_modules/d/package.json" - }, - { - "path": "node_modules/find-cache-dir/package.json" - }, - { - "path": "node_modules/find-cache-dir/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/find-cache-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/find-cache-dir/node_modules/pify/package.json" - }, - { - "path": "node_modules/is-stream/package.json" - }, - { - "path": "node_modules/debug/package.json" - }, - { - "path": "node_modules/espurify/package.json" - }, - { - "path": "node_modules/wrappy/package.json" - }, - { - "path": "node_modules/import-fresh/package.json" - }, - { - "path": "node_modules/eslint/package.json" - }, - { - "path": "node_modules/eslint/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.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/path-key/package.json" - }, - { - "path": "node_modules/eslint/node_modules/debug/package.json" - }, - { - "path": "node_modules/eslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/eslint/node_modules/which/package.json" - }, - { - "path": "node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/tapable/package.json" - }, - { - "path": "node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/array-find/package.json" - }, - { - "path": "node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/globals/package.json" - }, - { - "path": "node_modules/is-ci/package.json" - }, - { - "path": "node_modules/mdurl/package.json" - }, - { - "path": "node_modules/https-browserify/package.json" - }, - { - "path": "node_modules/typescript/package.json" - }, - { - "path": "node_modules/error-ex/package.json" - }, - { - "path": "node_modules/mem/package.json" - }, - { - "path": "node_modules/object.pick/package.json" - }, - { - "path": "node_modules/is-url/package.json" - }, - { - "path": "node_modules/split-string/package.json" - }, - { - "path": "node_modules/tslint-config-prettier/package.json" - }, - { - "path": "node_modules/url/package.json" - }, - { - "path": "node_modules/url/node_modules/punycode/package.json" - }, - { - "path": "node_modules/interpret/package.json" - }, - { - "path": "node_modules/os-locale/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/execa/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/os-locale/node_modules/path-key/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/semver/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/which/package.json" - }, - { - "path": "node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/ci-info/package.json" - }, - { - "path": "node_modules/path-exists/package.json" - }, - { - "path": "node_modules/esrecurse/package.json" - }, - { - "path": "node_modules/browserify-sign/package.json" - }, - { - "path": "node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/retry-request/package.json" - }, - { - "path": "node_modules/retry-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/define-property/package.json" - }, - { - "path": "node_modules/define-property/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/define-property/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/merge-estraverse-visitors/package.json" - }, - { - "path": "node_modules/arrify/package.json" - }, - { - "path": "node_modules/is-windows/package.json" - }, - { - "path": "node_modules/call-matcher/package.json" - }, - { - "path": "node_modules/furi/package.json" - }, - { - "path": "node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/decamelize/package.json" - }, - { - "path": "node_modules/jws/package.json" - }, - { - "path": "node_modules/unique-string/package.json" - }, - { - "path": "node_modules/base/package.json" - }, - { - "path": "node_modules/base/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/base/node_modules/define-property/package.json" - }, - { - "path": "node_modules/base/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/css-what/package.json" - }, - { - "path": "node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/iferr/package.json" - }, - { - "path": "node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/object-copy/package.json" - }, - { - "path": "node_modules/object-copy/node_modules/define-property/package.json" - }, - { - "path": "node_modules/object-copy/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/object-copy/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/p-is-promise/package.json" - }, - { - "path": "node_modules/mamacro/package.json" - }, - { - "path": "node_modules/@istanbuljs/schema/package.json" - }, - { - "path": "node_modules/use/package.json" - }, - { - "path": "node_modules/parallel-transform/package.json" - }, - { - "path": "node_modules/ms/package.json" - }, - { - "path": "node_modules/webpack/package.json" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/webpack/node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/acorn/package.json" - }, - { - "path": "node_modules/webpack/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-number/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/braces/package.json" - }, - { - "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/make-dir/package.json" - }, - { - "path": "node_modules/make-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/arr-diff/package.json" - }, - { - "path": "node_modules/get-stream/package.json" - }, - { - "path": "node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/keyv/package.json" - }, - { - "path": "node_modules/semver/package.json" - }, - { - "path": "node_modules/esutils/package.json" - }, - { - "path": "node_modules/intelli-espower-loader/package.json" - }, - { - "path": "node_modules/color-name/package.json" - }, - { - "path": "node_modules/object-keys/package.json" - }, - { - "path": "node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/stringifier/package.json" - }, - { - "path": "node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/is-regex/package.json" - }, - { - "path": "node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/google-p12-pem/package.json" - }, - { - "path": "node_modules/v8-to-istanbul/package.json" - }, - { - "path": "node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/growl/package.json" - }, - { - "path": "node_modules/component-emitter/package.json" - }, - { - "path": "node_modules/flat/package.json" - }, - { - "path": "node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/path-parse/package.json" - }, - { - "path": "node_modules/node-forge/package.json" - }, - { - "path": "node_modules/levn/package.json" - }, - { - "path": "node_modules/unset-value/package.json" - }, - { - "path": "node_modules/unset-value/node_modules/has-value/package.json" - }, - { - "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" - }, - { - "path": "node_modules/unset-value/node_modules/has-values/package.json" - }, - { - "path": "node_modules/chardet/package.json" - }, - { - "path": "node_modules/lodash.camelcase/package.json" - }, - { - "path": "node_modules/gts/package.json" - }, - { - "path": "node_modules/gts/node_modules/chalk/package.json" - }, - { - "path": "node_modules/walkdir/package.json" - }, - { - "path": "node_modules/@xtuc/long/package.json" - }, - { - "path": "node_modules/@xtuc/ieee754/package.json" - }, - { - "path": "node_modules/anymatch/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/anymatch/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/is-number/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/braces/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/path-is-inside/package.json" - }, - { - "path": "node_modules/regex-not/package.json" - }, - { - "path": "node_modules/assert/package.json" - }, - { - "path": "node_modules/assert/node_modules/util/package.json" - }, - { - "path": "node_modules/assert/node_modules/inherits/package.json" - }, - { - "path": "node_modules/foreground-child/package.json" - }, - { - "path": "node_modules/stream-http/package.json" - }, - { - "path": "node_modules/is-plain-object/package.json" - }, - { - "path": "node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/serve-static/package.json" - }, - { - "path": "node_modules/which-module/package.json" - }, - { - "path": "node_modules/object-assign/package.json" - }, - { - "path": "node_modules/power-assert/package.json" - }, - { - "path": "node_modules/nanomatch/package.json" - }, - { - "path": "node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/watchpack/package.json" - }, - { - "path": "node_modules/copy-concurrently/package.json" - }, - { - "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/remove-trailing-separator/package.json" - }, - { - "path": "node_modules/ajv-errors/package.json" - }, - { - "path": "node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/power-assert-context-traversal/package.json" - }, - { - "path": "node_modules/class-utils/package.json" - }, - { - "path": "node_modules/class-utils/node_modules/define-property/package.json" - }, - { - "path": "node_modules/range-parser/package.json" - }, - { - "path": "node_modules/type-check/package.json" - }, - { - "path": "node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" - }, - { - "path": "node_modules/util/package.json" - }, - { - "path": "node_modules/util/node_modules/inherits/package.json" - }, - { - "path": "node_modules/pack-n-play/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/pascalcase/package.json" - }, - { - "path": "node_modules/snapdragon/package.json" - }, - { - "path": "node_modules/snapdragon/index.js" - }, - { - "path": "node_modules/snapdragon/LICENSE" - }, - { - "path": "node_modules/snapdragon/README.md" - }, - { - "path": "node_modules/snapdragon/node_modules/source-map/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/debug/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/define-property/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/ms/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/snapdragon/lib/parser.js" - }, - { - "path": "node_modules/snapdragon/lib/position.js" - }, - { - "path": "node_modules/snapdragon/lib/source-maps.js" - }, - { - "path": "node_modules/snapdragon/lib/utils.js" - }, - { - "path": "node_modules/snapdragon/lib/compiler.js" - }, - { - "path": "node_modules/ts-loader/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/semver/package.json" - }, - { - "path": "node_modules/cacache/package.json" - }, - { - "path": "node_modules/cacache/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/deep-is/package.json" - }, - { - "path": "node_modules/cli-boxes/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/optionator/package.json" - }, - { - "path": "node_modules/lodash.has/package.json" - }, - { - "path": "node_modules/from2/package.json" - }, - { - "path": "node_modules/xtend/package.json" - }, - { - "path": "node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/ripemd160/package.json" - }, - { - "path": "node_modules/concat-map/package.json" - }, - { - "path": "node_modules/duplexify/package.json" - }, - { - "path": "node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/hard-rejection/package.json" - }, - { - "path": "node_modules/power-assert-renderer-file/package.json" - }, - { - "path": "node_modules/chrome-trace-event/package.json" - }, - { - "path": "node_modules/has-values/package.json" - }, - { - "path": "node_modules/has-values/node_modules/is-number/package.json" - }, - { - "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/has-values/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/has-values/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/gaxios/package.json" - }, - { - "path": "node_modules/snapdragon-util/package.json" - }, - { - "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/union-value/package.json" - }, - { - "path": "node_modules/tar/package.json" - }, - { - "path": "node_modules/tar/node_modules/yallist/package.json" - }, - { - "path": "node_modules/y18n/package.json" - }, - { - "path": "node_modules/readdirp/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/readdirp/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/is-number/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/braces/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/clone-response/package.json" - }, - { - "path": "node_modules/is-obj/package.json" - }, - { - "path": "node_modules/toidentifier/package.json" - }, - { - "path": "node_modules/esprima/package.json" - }, - { - "path": "node_modules/pify/package.json" - }, - { - "path": "node_modules/is-callable/package.json" - }, - { - "path": "node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/cyclist/package.json" - }, - { - "path": "node_modules/diffie-hellman/package.json" - }, - { - "path": "node_modules/ncp/package.json" - }, - { - "path": "node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/expand-brackets/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/debug/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/define-property/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/ms/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/neo-async/package.json" - }, - { - "path": "node_modules/querystring-es3/package.json" - }, - { - "path": "node_modules/miller-rabin/package.json" - }, - { - "path": "node_modules/fast-diff/package.json" - }, - { - "path": "node_modules/configstore/package.json" - }, - { - "path": "node_modules/configstore/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/universal-deep-strict-equal/package.json" - }, - { - "path": "node_modules/power-assert-renderer-assertion/package.json" - }, - { - "path": "node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/object.assign/package.json" - }, - { - "path": "node_modules/color-convert/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/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/path-browserify/package.json" - }, - { - "path": "node_modules/cliui/package.json" - }, - { - "path": "node_modules/cheerio/package.json" - }, - { - "path": "node_modules/flatted/package.json" - }, - { - "path": "node_modules/buffer/package.json" - }, - { - "path": "node_modules/concat-stream/package.json" - }, - { - "path": "node_modules/braces/package.json" - }, - { - "path": "node_modules/parse5/package.json" - }, - { - "path": "node_modules/power-assert-renderer-base/package.json" - }, - { - "path": "node_modules/loader-utils/package.json" - }, - { - "path": "node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/indent-string/package.json" - }, - { - "path": "node_modules/minipass/package.json" - }, - { - "path": "node_modules/minipass/node_modules/yallist/package.json" - }, - { - "path": "node_modules/tslib/package.json" - }, - { - "path": "node_modules/randombytes/package.json" - }, - { - "path": "node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/semver-diff/node_modules/semver/package.json" - }, - { - "path": "node_modules/cli-width/package.json" - }, - { - "path": "node_modules/escape-html/package.json" - }, - { - "path": "node_modules/protobufjs/package.json" - }, - { - "path": "node_modules/protobufjs/node_modules/@types/node/package.json" - }, - { - "path": "node_modules/protobufjs/cli/package.json" - }, - { - "path": "node_modules/protobufjs/cli/package-lock.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/commander/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/uglify-js/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" - }, - { - "path": "node_modules/has/package.json" - }, - { - "path": "node_modules/boolbase/package.json" - }, - { - "path": "node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/mute-stream/package.json" - }, - { - "path": "node_modules/p-queue/package.json" - }, - { - "path": "node_modules/fs-minipass/package.json" - }, - { - "path": "node_modules/cli-cursor/package.json" - }, - { - "path": "node_modules/isobject/package.json" - }, - { - "path": "node_modules/pako/package.json" - }, - { - "path": "node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/hmac-drbg/package.json" - }, - { - "path": "node_modules/infer-owner/package.json" - }, - { - "path": "node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/require-directory/package.json" - }, - { - "path": "node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/c8/package.json" - }, - { - "path": "node_modules/ssri/package.json" - }, - { - "path": "node_modules/eslint-config-prettier/package.json" - }, - { - "path": "node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/to-regex/package.json" - }, - { - "path": "node_modules/function-bind/package.json" - }, - { - "path": "node_modules/copy-descriptor/package.json" - }, - { - "path": "node_modules/findup-sync/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/findup-sync/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/is-number/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/braces/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/istanbul-lib-report/package.json" - }, - { - "path": "node_modules/querystring/package.json" - }, - { - "path": "node_modules/object-inspect/package.json" - }, - { - "path": "node_modules/entities/package.json" - }, - { - "path": "node_modules/define-properties/package.json" - }, - { - "path": "node_modules/aproba/package.json" - }, - { - "path": "node_modules/has-yarn/package.json" - }, - { - "path": "node_modules/buffer-from/package.json" - }, - { - "path": "node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/hash-base/package.json" - }, - { - "path": "node_modules/min-indent/package.json" - }, - { - "path": "node_modules/p-defer/package.json" - }, - { - "path": "node_modules/underscore/package.json" - }, - { - "path": "node_modules/power-assert-renderer-diagram/package.json" - }, - { - "path": "node_modules/browser-stdout/package.json" - }, - { - "path": "node_modules/registry-url/package.json" - }, - { - "path": "node_modules/which/package.json" - }, - { - "path": "node_modules/@babel/highlight/package.json" - }, - { - "path": "node_modules/@babel/code-frame/package.json" - }, - { - "path": "node_modules/@babel/parser/package.json" - }, - { - "path": "node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/map-obj/package.json" - }, - { - "path": "node_modules/tslint/package.json" - }, - { - "path": "node_modules/tslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/isexe/package.json" - }, - { - "path": "node_modules/klaw/package.json" - }, - { - "path": "node_modules/inherits/package.json" - }, - { - "path": "node_modules/lodash.at/package.json" - }, - { - "path": "node_modules/pump/package.json" - }, - { - "path": "node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/depd/package.json" - }, - { - "path": "node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/string-width/package.json" - }, - { - "path": "node_modules/lines-and-columns/package.json" - }, - { - "path": "node_modules/astral-regex/package.json" - }, - { - "path": "node_modules/builtin-modules/package.json" - }, - { - "path": "node_modules/rimraf/package.json" - }, - { - "path": "node_modules/restore-cursor/package.json" - }, - { - "path": "node_modules/yallist/package.json" - }, - { - "path": "node_modules/kind-of/package.json" - }, - { - "path": "node_modules/flush-write-stream/package.json" - }, - { - "path": "node_modules/object-visit/package.json" - }, - { - "path": "node_modules/emoji-regex/package.json" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": ".git/config" - }, - { - "path": ".git/index" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/objects/pack/pack-12776461e2913846501d03bc3cd35c9894d45c4d.idx" - }, - { - "path": ".git/objects/pack/pack-12776461e2913846501d03bc3cd35c9894d45c4d.pack" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/heads/master" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "src/v1/device_manager_client_config.json" - }, - { - "path": "src/v1/device_manager_proto_list.json" - }, - { - "path": "src/v1/device_manager_client.ts" - }, - { - "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" - }, - { - "path": "src/v1/doc/google/iam/v1/doc_options.js" - }, - { - "path": "src/v1/doc/google/iam/v1/doc_policy.js" - }, - { - "path": "src/v1/doc/google/cloud/iot/v1/doc_resources.js" - }, - { - "path": "src/v1/doc/google/cloud/iot/v1/doc_device_manager.js" - }, - { - "path": "src/v1/doc/google/type/doc_expr.js" - }, - { - "path": "src/v1/doc/google/rpc/doc_status.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_empty.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_any.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/google/cloud/common_resources.proto" - }, - { - "path": "protos/google/cloud/iot/v1/resources.proto" - }, - { - "path": "protos/google/cloud/iot/v1/device_manager.proto" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.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/release/common.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.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": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "build/system-test/install.js" - }, - { - "path": "build/system-test/install.d.ts" - }, - { - "path": "build/system-test/install.js.map" - }, - { - "path": "build/src/index.js" - }, - { - "path": "build/src/index.js.map" - }, - { - "path": "build/src/index.d.ts" - }, - { - "path": "build/src/v1/device_manager_client_config.d.ts" - }, - { - "path": "build/src/v1/device_manager_client_config.json" - }, - { - "path": "build/src/v1/index.js" - }, - { - "path": "build/src/v1/index.js.map" - }, - { - "path": "build/src/v1/device_manager_client.d.ts" - }, - { - "path": "build/src/v1/device_manager_client.js" - }, - { - "path": "build/src/v1/device_manager_client.js.map" - }, - { - "path": "build/src/v1/index.d.ts" - }, - { - "path": "build/protos/protos.js" - }, - { - "path": "build/protos/protos.d.ts" - }, - { - "path": "build/protos/protos.json" - }, - { - "path": "build/protos/google/cloud/common_resources.proto" - }, - { - "path": "build/protos/google/cloud/iot/v1/resources.proto" - }, - { - "path": "build/protos/google/cloud/iot/v1/device_manager.proto" - }, - { - "path": "build/test/gapic-device_manager-v1.d.ts" - }, - { - "path": "build/test/gapic-device_manager-v1.js" - }, - { - "path": "build/test/gapic-device_manager-v1.js.map" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "test/gapic-device_manager-v1.ts" - } ] } \ No newline at end of file From aa514a830efa1886216969e9155ffdbbbb253986 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2020 13:27:08 -0800 Subject: [PATCH 159/370] chore: release 1.6.1 (#248) --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 5ffaa8dfd98..99776c4cf11 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.1](https://www.github.com/googleapis/nodejs-iot/compare/v1.6.0...v1.6.1) (2020-01-09) + + +### Bug Fixes + +* proper routing headers ([2fcf0f3](https://www.github.com/googleapis/nodejs-iot/commit/2fcf0f312ef16f6b7a3f149a14fb1bcf35140644)) + ## [1.6.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.5.0...v1.6.0) (2020-01-05) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 44e6cca2f72..6323c4e6f44 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.6.0", + "version": "1.6.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 361a1e43bff..fd40c23cc3b 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.6.0" + "@google-cloud/iot": "^1.6.1" }, "devDependencies": { "chai": "^4.2.0", From 8660470dacd81d2a77ec0e52a6f7e8d5a4faead5 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 Jan 2020 16:25:24 -0800 Subject: [PATCH 160/370] chore: clear synth.metadata --- packages/google-cloud-iot/synth.metadata | 31 ------------------------ 1 file changed, 31 deletions(-) delete mode 100644 packages/google-cloud-iot/synth.metadata diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata deleted file mode 100644 index 4c8f162e009..00000000000 --- a/packages/google-cloud-iot/synth.metadata +++ /dev/null @@ -1,31 +0,0 @@ -{ - "updateTime": "2020-01-09T12:17:25.286718Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6ace586805c08896fef43e28a261337fcf3f022b", - "internalRef": "288783603" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "iot", - "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" - } - } - ] -} \ No newline at end of file From 47704fbdedb084456aa85141d9b93adf088ba6fb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 27 Jan 2020 15:51:02 -0800 Subject: [PATCH 161/370] chore: regenerate synth.metadata (#253) --- packages/google-cloud-iot/synth.metadata | 324 +++++++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 packages/google-cloud-iot/synth.metadata diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata new file mode 100644 index 00000000000..f6a62746761 --- /dev/null +++ b/packages/google-cloud-iot/synth.metadata @@ -0,0 +1,324 @@ +{ + "updateTime": "2020-01-24T12:21:43.765325Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", + "internalRef": "291240093" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "iot", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ], + "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.yaml" + }, + { + "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/cloud/common_resources.proto" + }, + { + "path": "protos/google/cloud/iot/v1/device_manager.proto" + }, + { + "path": "protos/google/cloud/iot/v1/resources.proto" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "renovate.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/test/quickstart.test.js" + }, + { + "path": "smoke-test/.eslintrc.yml" + }, + { + "path": "smoke-test/device_manager_smoke_test.js" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/v1/device_manager_client.ts" + }, + { + "path": "src/v1/device_manager_client_config.json" + }, + { + "path": "src/v1/device_manager_proto_list.json" + }, + { + "path": "src/v1/doc/google/cloud/iot/v1/doc_device_manager.js" + }, + { + "path": "src/v1/doc/google/cloud/iot/v1/doc_resources.js" + }, + { + "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" + }, + { + "path": "src/v1/doc/google/iam/v1/doc_options.js" + }, + { + "path": "src/v1/doc/google/iam/v1/doc_policy.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_empty.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v1/doc/google/rpc/doc_status.js" + }, + { + "path": "src/v1/doc/google/type/doc_expr.js" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "synth.py" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "test/gapic-device_manager-v1.ts" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "tsconfig.json" + }, + { + "path": "tslint.json" + }, + { + "path": "webpack.config.js" + } + ] +} \ No newline at end of file From 14b5b82a251d2cac2baffe2a0501ef691982f948 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Jan 2020 14:11:53 -0800 Subject: [PATCH 162/370] fix: enum, bytes, and Long types now accept strings --- packages/google-cloud-iot/protos/protos.d.ts | 128 +++++++++---------- packages/google-cloud-iot/synth.metadata | 10 +- 2 files changed, 71 insertions(+), 67 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 976f7b076b6..330d794e67b 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -36,7 +36,7 @@ export namespace google { name?: (string|null); /** Device numId */ - numId?: (number|Long|null); + numId?: (number|Long|string|null); /** Device credentials */ credentials?: (google.cloud.iot.v1.IDeviceCredential[]|null); @@ -72,7 +72,7 @@ export namespace google { state?: (google.cloud.iot.v1.IDeviceState|null); /** Device logLevel */ - logLevel?: (google.cloud.iot.v1.LogLevel|null); + logLevel?: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel|null); /** Device metadata */ metadata?: ({ [k: string]: string }|null); @@ -97,7 +97,7 @@ export namespace google { public name: string; /** Device numId. */ - public numId: (number|Long); + public numId: (number|Long|string); /** Device credentials. */ public credentials: google.cloud.iot.v1.IDeviceCredential[]; @@ -133,7 +133,7 @@ export namespace google { public state?: (google.cloud.iot.v1.IDeviceState|null); /** Device logLevel. */ - public logLevel: google.cloud.iot.v1.LogLevel; + public logLevel: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel); /** Device metadata. */ public metadata: { [k: string]: string }; @@ -216,10 +216,10 @@ export namespace google { interface IGatewayConfig { /** GatewayConfig gatewayType */ - gatewayType?: (google.cloud.iot.v1.GatewayType|null); + gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); /** GatewayConfig gatewayAuthMethod */ - gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|null); + gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|keyof typeof google.cloud.iot.v1.GatewayAuthMethod|null); /** GatewayConfig lastAccessedGatewayId */ lastAccessedGatewayId?: (string|null); @@ -238,10 +238,10 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IGatewayConfig); /** GatewayConfig gatewayType. */ - public gatewayType: google.cloud.iot.v1.GatewayType; + public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); /** GatewayConfig gatewayAuthMethod. */ - public gatewayAuthMethod: google.cloud.iot.v1.GatewayAuthMethod; + public gatewayAuthMethod: (google.cloud.iot.v1.GatewayAuthMethod|keyof typeof google.cloud.iot.v1.GatewayAuthMethod); /** GatewayConfig lastAccessedGatewayId. */ public lastAccessedGatewayId: string; @@ -342,7 +342,7 @@ export namespace google { httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); /** DeviceRegistry logLevel */ - logLevel?: (google.cloud.iot.v1.LogLevel|null); + logLevel?: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel|null); /** DeviceRegistry credentials */ credentials?: (google.cloud.iot.v1.IRegistryCredential[]|null); @@ -376,7 +376,7 @@ export namespace google { public httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); /** DeviceRegistry logLevel. */ - public logLevel: google.cloud.iot.v1.LogLevel; + public logLevel: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel); /** DeviceRegistry credentials. */ public credentials: google.cloud.iot.v1.IRegistryCredential[]; @@ -456,7 +456,7 @@ export namespace google { interface IMqttConfig { /** MqttConfig mqttEnabledState */ - mqttEnabledState?: (google.cloud.iot.v1.MqttState|null); + mqttEnabledState?: (google.cloud.iot.v1.MqttState|keyof typeof google.cloud.iot.v1.MqttState|null); } /** Represents a MqttConfig. */ @@ -469,7 +469,7 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IMqttConfig); /** MqttConfig mqttEnabledState. */ - public mqttEnabledState: google.cloud.iot.v1.MqttState; + public mqttEnabledState: (google.cloud.iot.v1.MqttState|keyof typeof google.cloud.iot.v1.MqttState); /** * Creates a new MqttConfig instance using the specified properties. @@ -553,7 +553,7 @@ export namespace google { interface IHttpConfig { /** HttpConfig httpEnabledState */ - httpEnabledState?: (google.cloud.iot.v1.HttpState|null); + httpEnabledState?: (google.cloud.iot.v1.HttpState|keyof typeof google.cloud.iot.v1.HttpState|null); } /** Represents a HttpConfig. */ @@ -566,7 +566,7 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IHttpConfig); /** HttpConfig httpEnabledState. */ - public httpEnabledState: google.cloud.iot.v1.HttpState; + public httpEnabledState: (google.cloud.iot.v1.HttpState|keyof typeof google.cloud.iot.v1.HttpState); /** * Creates a new HttpConfig instance using the specified properties. @@ -1073,7 +1073,7 @@ export namespace google { interface IPublicKeyCertificate { /** PublicKeyCertificate format */ - format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|null); + format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|keyof typeof google.cloud.iot.v1.PublicKeyCertificateFormat|null); /** PublicKeyCertificate certificate */ certificate?: (string|null); @@ -1092,7 +1092,7 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IPublicKeyCertificate); /** PublicKeyCertificate format. */ - public format: google.cloud.iot.v1.PublicKeyCertificateFormat; + public format: (google.cloud.iot.v1.PublicKeyCertificateFormat|keyof typeof google.cloud.iot.v1.PublicKeyCertificateFormat); /** PublicKeyCertificate certificate. */ public certificate: string; @@ -1280,7 +1280,7 @@ export namespace google { interface IPublicKeyCredential { /** PublicKeyCredential format */ - format?: (google.cloud.iot.v1.PublicKeyFormat|null); + format?: (google.cloud.iot.v1.PublicKeyFormat|keyof typeof google.cloud.iot.v1.PublicKeyFormat|null); /** PublicKeyCredential key */ key?: (string|null); @@ -1296,7 +1296,7 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IPublicKeyCredential); /** PublicKeyCredential format. */ - public format: google.cloud.iot.v1.PublicKeyFormat; + public format: (google.cloud.iot.v1.PublicKeyFormat|keyof typeof google.cloud.iot.v1.PublicKeyFormat); /** PublicKeyCredential key. */ public key: string; @@ -1385,7 +1385,7 @@ export namespace google { interface IDeviceConfig { /** DeviceConfig version */ - version?: (number|Long|null); + version?: (number|Long|string|null); /** DeviceConfig cloudUpdateTime */ cloudUpdateTime?: (google.protobuf.ITimestamp|null); @@ -1394,7 +1394,7 @@ export namespace google { deviceAckTime?: (google.protobuf.ITimestamp|null); /** DeviceConfig binaryData */ - binaryData?: (Uint8Array|null); + binaryData?: (Uint8Array|string|null); } /** Represents a DeviceConfig. */ @@ -1407,7 +1407,7 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IDeviceConfig); /** DeviceConfig version. */ - public version: (number|Long); + public version: (number|Long|string); /** DeviceConfig cloudUpdateTime. */ public cloudUpdateTime?: (google.protobuf.ITimestamp|null); @@ -1416,7 +1416,7 @@ export namespace google { public deviceAckTime?: (google.protobuf.ITimestamp|null); /** DeviceConfig binaryData. */ - public binaryData: Uint8Array; + public binaryData: (Uint8Array|string); /** * Creates a new DeviceConfig instance using the specified properties. @@ -1496,7 +1496,7 @@ export namespace google { updateTime?: (google.protobuf.ITimestamp|null); /** DeviceState binaryData */ - binaryData?: (Uint8Array|null); + binaryData?: (Uint8Array|string|null); } /** Represents a DeviceState. */ @@ -1512,7 +1512,7 @@ export namespace google { public updateTime?: (google.protobuf.ITimestamp|null); /** DeviceState binaryData. */ - public binaryData: Uint8Array; + public binaryData: (Uint8Array|string); /** * Creates a new DeviceState instance using the specified properties. @@ -2963,7 +2963,7 @@ export namespace google { parent?: (string|null); /** ListDevicesRequest deviceNumIds */ - deviceNumIds?: ((number|Long)[]|null); + deviceNumIds?: ((number|Long|string)[]|null); /** ListDevicesRequest deviceIds */ deviceIds?: (string[]|null); @@ -2994,7 +2994,7 @@ export namespace google { public parent: string; /** ListDevicesRequest deviceNumIds. */ - public deviceNumIds: (number|Long)[]; + public deviceNumIds: (number|Long|string)[]; /** ListDevicesRequest deviceIds. */ public deviceIds: string[]; @@ -3086,7 +3086,7 @@ export namespace google { interface IGatewayListOptions { /** GatewayListOptions gatewayType */ - gatewayType?: (google.cloud.iot.v1.GatewayType|null); + gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); /** GatewayListOptions associationsGatewayId */ associationsGatewayId?: (string|null); @@ -3105,7 +3105,7 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); /** GatewayListOptions gatewayType. */ - public gatewayType: google.cloud.iot.v1.GatewayType; + public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); /** GatewayListOptions associationsGatewayId. */ public associationsGatewayId: string; @@ -3290,10 +3290,10 @@ export namespace google { name?: (string|null); /** ModifyCloudToDeviceConfigRequest versionToUpdate */ - versionToUpdate?: (number|Long|null); + versionToUpdate?: (number|Long|string|null); /** ModifyCloudToDeviceConfigRequest binaryData */ - binaryData?: (Uint8Array|null); + binaryData?: (Uint8Array|string|null); } /** Represents a ModifyCloudToDeviceConfigRequest. */ @@ -3309,10 +3309,10 @@ export namespace google { public name: string; /** ModifyCloudToDeviceConfigRequest versionToUpdate. */ - public versionToUpdate: (number|Long); + public versionToUpdate: (number|Long|string); /** ModifyCloudToDeviceConfigRequest binaryData. */ - public binaryData: Uint8Array; + public binaryData: (Uint8Array|string); /** * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. @@ -3764,7 +3764,7 @@ export namespace google { name?: (string|null); /** SendCommandToDeviceRequest binaryData */ - binaryData?: (Uint8Array|null); + binaryData?: (Uint8Array|string|null); /** SendCommandToDeviceRequest subfolder */ subfolder?: (string|null); @@ -3783,7 +3783,7 @@ export namespace google { public name: string; /** SendCommandToDeviceRequest binaryData. */ - public binaryData: Uint8Array; + public binaryData: (Uint8Array|string); /** SendCommandToDeviceRequest subfolder. */ public subfolder: string; @@ -4334,7 +4334,7 @@ export namespace google { nameField?: (string|null); /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|null); + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); /** ResourceDescriptor plural */ plural?: (string|null); @@ -4362,7 +4362,7 @@ export namespace google { public nameField: string; /** ResourceDescriptor history. */ - public history: google.api.ResourceDescriptor.History; + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); /** ResourceDescriptor plural. */ public plural: string; @@ -5591,10 +5591,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); @@ -5631,10 +5631,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; @@ -6409,7 +6409,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); @@ -6485,7 +6485,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; @@ -6734,13 +6734,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); @@ -6771,13 +6771,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; @@ -7276,7 +7276,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); @@ -7301,7 +7301,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[]; @@ -7397,16 +7397,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); @@ -7428,16 +7428,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; @@ -8024,7 +8024,7 @@ export namespace google { interface ITimestamp { /** Timestamp seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Timestamp nanos */ nanos?: (number|null); @@ -8040,7 +8040,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; @@ -8123,7 +8123,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents an Any. */ @@ -8139,7 +8139,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. @@ -9064,7 +9064,7 @@ export namespace google { bindings?: (google.iam.v1.IBinding[]|null); /** Policy etag */ - etag?: (Uint8Array|null); + etag?: (Uint8Array|string|null); } /** Represents a Policy. */ @@ -9083,7 +9083,7 @@ export namespace google { public bindings: google.iam.v1.IBinding[]; /** Policy etag. */ - public etag: Uint8Array; + public etag: (Uint8Array|string); /** * Creates a new Policy instance using the specified properties. @@ -9358,7 +9358,7 @@ export namespace google { interface IBindingDelta { /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|null); + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); /** BindingDelta role */ role?: (string|null); @@ -9380,7 +9380,7 @@ export namespace google { constructor(properties?: google.iam.v1.IBindingDelta); /** BindingDelta action. */ - public action: google.iam.v1.BindingDelta.Action; + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); /** BindingDelta role. */ public role: string; @@ -9476,7 +9476,7 @@ export namespace google { interface IAuditConfigDelta { /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|null); + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); /** AuditConfigDelta service */ service?: (string|null); @@ -9498,7 +9498,7 @@ export namespace google { constructor(properties?: google.iam.v1.IAuditConfigDelta); /** AuditConfigDelta action. */ - public action: google.iam.v1.AuditConfigDelta.Action; + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); /** AuditConfigDelta service. */ public service: string; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f6a62746761..f9c4196b9c1 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-01-24T12:21:43.765325Z", + "updateTime": "2020-01-28T12:22:36.181541Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", - "internalRef": "291240093" + "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", + "internalRef": "291821782", + "log": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\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\n" } }, { @@ -293,6 +294,9 @@ { "path": "src/v1/index.ts" }, + { + "path": "synth.metadata" + }, { "path": "synth.py" }, From 34b749c5a7718c283457938067dc0f80c0507769 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Jan 2020 16:34:15 +0100 Subject: [PATCH 163/370] chore(deps): update dependency @types/mocha to v7 --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 6323c4e6f44..eccdf7cd09a 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -44,7 +44,7 @@ "google-gax": "^1.9.0" }, "devDependencies": { - "@types/mocha": "^5.2.5", + "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", "c8": "^7.0.0", "eslint": "^6.0.0", From b6fcd14dcac8eb4516cebcada97558b52693adcd Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 30 Jan 2020 13:15:22 -0800 Subject: [PATCH 164/370] feat: bump release level to GA (#257) --- packages/google-cloud-iot/.repo-metadata.json | 2 +- packages/google-cloud-iot/README.md | 11 +- packages/google-cloud-iot/synth.metadata | 304 +----------------- 3 files changed, 11 insertions(+), 306 deletions(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index fa4c736063c..4a68138382f 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -3,7 +3,7 @@ "name_pretty": "Google Cloud Internet of Things (IoT) Core", "product_documentation": "https://cloud.google.com/iot", "client_documentation": "https://googleapis.dev/nodejs/iot/latest", - "release_level": "beta", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-iot", "distribution_name": "@google-cloud/iot", diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index b25b3f2220a..30019141650 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -4,7 +4,7 @@ # [Google Cloud Internet of Things (IoT) Core: Node.js Client](https://github.com/googleapis/nodejs-iot) -[![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/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) @@ -94,11 +94,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. diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f9c4196b9c1..9caf30f6eba 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,13 +1,13 @@ { - "updateTime": "2020-01-28T12:22:36.181541Z", + "updateTime": "2020-01-30T20:26:15.731011Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", - "internalRef": "291821782", - "log": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\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\n" + "sha": "7a15e7fe78ff4b6d5c9606a3264559e5bde341d1", + "internalRef": "292391607", + "log": "7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\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\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" } }, { @@ -28,301 +28,5 @@ "generator": "gapic-generator-typescript" } } - ], - "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.yaml" - }, - { - "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/cloud/common_resources.proto" - }, - { - "path": "protos/google/cloud/iot/v1/device_manager.proto" - }, - { - "path": "protos/google/cloud/iot/v1/resources.proto" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "renovate.json" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - }, - { - "path": "smoke-test/device_manager_smoke_test.js" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1/device_manager_client.ts" - }, - { - "path": "src/v1/device_manager_client_config.json" - }, - { - "path": "src/v1/device_manager_proto_list.json" - }, - { - "path": "src/v1/doc/google/cloud/iot/v1/doc_device_manager.js" - }, - { - "path": "src/v1/doc/google/cloud/iot/v1/doc_resources.js" - }, - { - "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" - }, - { - "path": "src/v1/doc/google/iam/v1/doc_options.js" - }, - { - "path": "src/v1/doc/google/iam/v1/doc_policy.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_any.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_empty.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "src/v1/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "src/v1/doc/google/rpc/doc_status.js" - }, - { - "path": "src/v1/doc/google/type/doc_expr.js" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "synth.metadata" - }, - { - "path": "synth.py" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "test/gapic-device_manager-v1.ts" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "tsconfig.json" - }, - { - "path": "tslint.json" - }, - { - "path": "webpack.config.js" - } ] } \ No newline at end of file From 969031d29523856e9ea5ff378518b0af0e613d37 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2020 14:25:51 -0800 Subject: [PATCH 165/370] chore: release 1.7.0 (#258) --- packages/google-cloud-iot/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 99776c4cf11..987eca288ca 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.7.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.6.1...v1.7.0) (2020-01-30) + + +### Features + +* bump release level to GA ([#257](https://www.github.com/googleapis/nodejs-iot/issues/257)) ([aeb5ff6](https://www.github.com/googleapis/nodejs-iot/commit/aeb5ff6f0e9dc01f68c41d7cf7eeda770ee4d35e)) + + +### Bug Fixes + +* enum, bytes, and Long types now accept strings ([629e2ed](https://www.github.com/googleapis/nodejs-iot/commit/629e2edcf7a693e156ca2a144615c2b5a4daa4ee)) + ### [1.6.1](https://www.github.com/googleapis/nodejs-iot/compare/v1.6.0...v1.6.1) (2020-01-09) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index eccdf7cd09a..8018783aa80 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.6.1", + "version": "1.7.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index fd40c23cc3b..52a26f22e40 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.6.1" + "@google-cloud/iot": "^1.7.0" }, "devDependencies": { "chai": "^4.2.0", From a12fd9692d537dbef788d1b05b0adeb516e628ec Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:22:45 -0800 Subject: [PATCH 166/370] chore: skip img.shields.io in docs test --- packages/google-cloud-iot/linkinator.config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/linkinator.config.json b/packages/google-cloud-iot/linkinator.config.json index d780d6bfff5..b555215ca02 100644 --- a/packages/google-cloud-iot/linkinator.config.json +++ b/packages/google-cloud-iot/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "img.shields.io" ] } From d11238ae1e332a497c98d101ccf61036c9555091 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Feb 2020 18:56:54 -0800 Subject: [PATCH 167/370] test: modernize mocha config (#259) --- packages/google-cloud-iot/.mocharc.json | 5 +++++ packages/google-cloud-iot/package.json | 2 -- packages/google-cloud-iot/test/mocha.opts | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-iot/.mocharc.json delete mode 100644 packages/google-cloud-iot/test/mocha.opts diff --git a/packages/google-cloud-iot/.mocharc.json b/packages/google-cloud-iot/.mocharc.json new file mode 100644 index 00000000000..670c5e2c24b --- /dev/null +++ b/packages/google-cloud-iot/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 8018783aa80..effdabbd147 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -51,13 +51,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", "gts": "^1.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "power-assert": "^1.6.0", "prettier": "^1.13.7", "mocha": "^7.0.0", "null-loader": "^3.0.0", diff --git a/packages/google-cloud-iot/test/mocha.opts b/packages/google-cloud-iot/test/mocha.opts deleted file mode 100644 index fdcf6d2300d..00000000000 --- a/packages/google-cloud-iot/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require intelli-espower-loader ---throw-deprecation ---timeout 10000 From e824e4499fba33f84a18385934eec28fd9c25861 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Feb 2020 10:28:56 -0800 Subject: [PATCH 168/370] fix: pass x-goog-request-params header for streaming calls --- packages/google-cloud-iot/.gitignore | 3 +- packages/google-cloud-iot/protos/protos.d.ts | 4660 +++--- packages/google-cloud-iot/protos/protos.js | 12178 ++++++++-------- packages/google-cloud-iot/protos/protos.json | 1370 +- .../src/v1/device_manager_client.ts | 160 +- .../src/v1/device_manager_proto_list.json | 4 +- packages/google-cloud-iot/synth.metadata | 10 +- .../test/gapic-device_manager-v1.ts | 42 +- 8 files changed, 9239 insertions(+), 9188 deletions(-) diff --git a/packages/google-cloud-iot/.gitignore b/packages/google-cloud-iot/.gitignore index af6629b80e6..5d32b23782f 100644 --- a/packages/google-cloud-iot/.gitignore +++ b/packages/google-cloud-iot/.gitignore @@ -1,6 +1,7 @@ **/*.log **/node_modules .coverage +coverage .nyc_output docs/ out/ @@ -9,5 +10,5 @@ system-test/secrets.js system-test/*key.json *.lock .DS_Store -__pycache__ package-lock.json +__pycache__ diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 330d794e67b..dcd723ac4a4 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -26,4526 +26,4300 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of a Device. */ - interface IDevice { - - /** Device id */ - id?: (string|null); - - /** Device name */ - name?: (string|null); - - /** Device numId */ - numId?: (number|Long|string|null); - - /** Device credentials */ - credentials?: (google.cloud.iot.v1.IDeviceCredential[]|null); - - /** Device lastHeartbeatTime */ - lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Device lastEventTime */ - lastEventTime?: (google.protobuf.ITimestamp|null); - - /** Device lastStateTime */ - lastStateTime?: (google.protobuf.ITimestamp|null); - - /** Device lastConfigAckTime */ - lastConfigAckTime?: (google.protobuf.ITimestamp|null); - - /** Device lastConfigSendTime */ - lastConfigSendTime?: (google.protobuf.ITimestamp|null); - - /** Device blocked */ - blocked?: (boolean|null); - - /** Device lastErrorTime */ - lastErrorTime?: (google.protobuf.ITimestamp|null); - - /** Device lastErrorStatus */ - lastErrorStatus?: (google.rpc.IStatus|null); - - /** Device config */ - config?: (google.cloud.iot.v1.IDeviceConfig|null); - - /** Device state */ - state?: (google.cloud.iot.v1.IDeviceState|null); - - /** Device logLevel */ - logLevel?: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel|null); - - /** Device metadata */ - metadata?: ({ [k: string]: string }|null); - - /** Device gatewayConfig */ - gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); - } - - /** Represents a Device. */ - class Device implements IDevice { + /** Represents a DeviceManager */ + class DeviceManager extends $protobuf.rpc.Service { /** - * Constructs a new Device. - * @param [properties] Properties to set + * Constructs a new DeviceManager service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.iot.v1.IDevice); - - /** Device id. */ - public id: string; - - /** Device name. */ - public name: string; - - /** Device numId. */ - public numId: (number|Long|string); - - /** Device credentials. */ - public credentials: google.cloud.iot.v1.IDeviceCredential[]; - - /** Device lastHeartbeatTime. */ - public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Device lastEventTime. */ - public lastEventTime?: (google.protobuf.ITimestamp|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Device lastStateTime. */ - public lastStateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates new DeviceManager 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): DeviceManager; - /** Device lastConfigAckTime. */ - public lastConfigAckTime?: (google.protobuf.ITimestamp|null); + /** + * Calls CreateDeviceRegistry. + * @param request CreateDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry + */ + public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback): void; - /** Device lastConfigSendTime. */ - public lastConfigSendTime?: (google.protobuf.ITimestamp|null); + /** + * Calls CreateDeviceRegistry. + * @param request CreateDeviceRegistryRequest message or plain object + * @returns Promise + */ + public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest): Promise; - /** Device blocked. */ - public blocked: boolean; + /** + * Calls GetDeviceRegistry. + * @param request GetDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry + */ + public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback): void; - /** Device lastErrorTime. */ - public lastErrorTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GetDeviceRegistry. + * @param request GetDeviceRegistryRequest message or plain object + * @returns Promise + */ + public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest): Promise; - /** Device lastErrorStatus. */ - public lastErrorStatus?: (google.rpc.IStatus|null); + /** + * Calls UpdateDeviceRegistry. + * @param request UpdateDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceRegistry + */ + public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback): void; - /** Device config. */ - public config?: (google.cloud.iot.v1.IDeviceConfig|null); + /** + * Calls UpdateDeviceRegistry. + * @param request UpdateDeviceRegistryRequest message or plain object + * @returns Promise + */ + public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): Promise; - /** Device state. */ - public state?: (google.cloud.iot.v1.IDeviceState|null); + /** + * Calls DeleteDeviceRegistry. + * @param request DeleteDeviceRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback): void; - /** Device logLevel. */ - public logLevel: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel); + /** + * Calls DeleteDeviceRegistry. + * @param request DeleteDeviceRegistryRequest message or plain object + * @returns Promise + */ + public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): Promise; - /** Device metadata. */ - public metadata: { [k: string]: string }; + /** + * Calls ListDeviceRegistries. + * @param request ListDeviceRegistriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse + */ + public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback): void; - /** Device gatewayConfig. */ - public gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + /** + * Calls ListDeviceRegistries. + * @param request ListDeviceRegistriesRequest message or plain object + * @returns Promise + */ + public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest): Promise; /** - * Creates a new Device instance using the specified properties. - * @param [properties] Properties to set - * @returns Device instance + * Calls CreateDevice. + * @param request CreateDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device */ - public static create(properties?: google.cloud.iot.v1.IDevice): google.cloud.iot.v1.Device; + public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceCallback): void; /** - * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. - * @param message Device message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateDevice. + * @param request CreateDeviceRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest): Promise; /** - * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. - * @param message Device message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetDevice. + * @param request GetDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device */ - public static encodeDelimited(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceCallback): void; /** - * Decodes a Device message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Device - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetDevice. + * @param request GetDeviceRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.Device; + public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest): Promise; /** - * Decodes a Device message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Device - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateDevice. + * @param request UpdateDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Device */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.Device; + public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback): void; /** - * Verifies a Device message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateDevice. + * @param request UpdateDeviceRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest): Promise; /** - * Creates a Device message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Device + * Calls DeleteDevice. + * @param request DeleteDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.Device; + public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback): void; /** - * Creates a plain object from a Device message. Also converts values to other types if specified. - * @param message Device - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteDevice. + * @param request DeleteDeviceRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.iot.v1.Device, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest): Promise; /** - * Converts this Device to JSON. - * @returns JSON object + * Calls ListDevices. + * @param request ListDevicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDevicesResponse */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GatewayConfig. */ - interface IGatewayConfig { - - /** GatewayConfig gatewayType */ - gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); - - /** GatewayConfig gatewayAuthMethod */ - gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|keyof typeof google.cloud.iot.v1.GatewayAuthMethod|null); - - /** GatewayConfig lastAccessedGatewayId */ - lastAccessedGatewayId?: (string|null); - - /** GatewayConfig lastAccessedGatewayTime */ - lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a GatewayConfig. */ - class GatewayConfig implements IGatewayConfig { + public listDevices(request: google.cloud.iot.v1.IListDevicesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDevicesCallback): void; /** - * Constructs a new GatewayConfig. - * @param [properties] Properties to set + * Calls ListDevices. + * @param request ListDevicesRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.iot.v1.IGatewayConfig); - - /** GatewayConfig gatewayType. */ - public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); - - /** GatewayConfig gatewayAuthMethod. */ - public gatewayAuthMethod: (google.cloud.iot.v1.GatewayAuthMethod|keyof typeof google.cloud.iot.v1.GatewayAuthMethod); - - /** GatewayConfig lastAccessedGatewayId. */ - public lastAccessedGatewayId: string; - - /** GatewayConfig lastAccessedGatewayTime. */ - public lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); + public listDevices(request: google.cloud.iot.v1.IListDevicesRequest): Promise; /** - * Creates a new GatewayConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GatewayConfig instance + * Calls ModifyCloudToDeviceConfig. + * @param request ModifyCloudToDeviceConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceConfig */ - public static create(properties?: google.cloud.iot.v1.IGatewayConfig): google.cloud.iot.v1.GatewayConfig; + public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, callback: google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback): void; /** - * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. - * @param message GatewayConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ModifyCloudToDeviceConfig. + * @param request ModifyCloudToDeviceConfigRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): Promise; /** - * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. - * @param message GatewayConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListDeviceConfigVersions. + * @param request ListDeviceConfigVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse */ - public static encodeDelimited(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback): void; /** - * Decodes a GatewayConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GatewayConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListDeviceConfigVersions. + * @param request ListDeviceConfigVersionsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayConfig; + public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): Promise; /** - * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GatewayConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListDeviceStates. + * @param request ListDeviceStatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceStatesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayConfig; + public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback): void; /** - * Verifies a GatewayConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListDeviceStates. + * @param request ListDeviceStatesRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest): Promise; /** - * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GatewayConfig + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayConfig; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback): void; /** - * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. - * @param message GatewayConfig - * @param [options] Conversion options - * @returns Plain object + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.iot.v1.GatewayConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; /** - * Converts this GatewayConfig to JSON. - * @returns JSON object + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeviceRegistry. */ - interface IDeviceRegistry { - - /** DeviceRegistry id */ - id?: (string|null); - - /** DeviceRegistry name */ - name?: (string|null); - - /** DeviceRegistry eventNotificationConfigs */ - eventNotificationConfigs?: (google.cloud.iot.v1.IEventNotificationConfig[]|null); - - /** DeviceRegistry stateNotificationConfig */ - stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); - - /** DeviceRegistry mqttConfig */ - mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); - - /** DeviceRegistry httpConfig */ - httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); - - /** DeviceRegistry logLevel */ - logLevel?: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel|null); - - /** DeviceRegistry credentials */ - credentials?: (google.cloud.iot.v1.IRegistryCredential[]|null); - } - - /** Represents a DeviceRegistry. */ - class DeviceRegistry implements IDeviceRegistry { + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback): void; /** - * Constructs a new DeviceRegistry. - * @param [properties] Properties to set + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.iot.v1.IDeviceRegistry); - - /** DeviceRegistry id. */ - public id: string; - - /** DeviceRegistry name. */ - public name: string; - - /** DeviceRegistry eventNotificationConfigs. */ - public eventNotificationConfigs: google.cloud.iot.v1.IEventNotificationConfig[]; - - /** DeviceRegistry stateNotificationConfig. */ - public stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); - - /** DeviceRegistry mqttConfig. */ - public mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); - - /** DeviceRegistry httpConfig. */ - public httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); - - /** DeviceRegistry logLevel. */ - public logLevel: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel); - - /** DeviceRegistry credentials. */ - public credentials: google.cloud.iot.v1.IRegistryCredential[]; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; /** - * Creates a new DeviceRegistry instance using the specified properties. - * @param [properties] Properties to set - * @returns DeviceRegistry instance + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static create(properties?: google.cloud.iot.v1.IDeviceRegistry): google.cloud.iot.v1.DeviceRegistry; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback): void; /** - * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. - * @param message DeviceRegistry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; /** - * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. - * @param message DeviceRegistry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SendCommandToDevice. + * @param request SendCommandToDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback): void; /** - * Decodes a DeviceRegistry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeviceRegistry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SendCommandToDevice. + * @param request SendCommandToDeviceRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceRegistry; + public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest): Promise; /** - * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeviceRegistry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BindDeviceToGateway. + * @param request BindDeviceToGatewayRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceRegistry; + public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback): void; /** - * Verifies a DeviceRegistry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls BindDeviceToGateway. + * @param request BindDeviceToGatewayRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest): Promise; /** - * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeviceRegistry + * Calls UnbindDeviceFromGateway. + * @param request UnbindDeviceFromGatewayRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceRegistry; + public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback): void; /** - * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. - * @param message DeviceRegistry - * @param [options] Conversion options - * @returns Plain object + * Calls UnbindDeviceFromGateway. + * @param request UnbindDeviceFromGatewayRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.iot.v1.DeviceRegistry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): Promise; + } + + namespace DeviceManager { /** - * Converts this DeviceRegistry to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry */ - public toJSON(): { [k: string]: any }; - } + type CreateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; - /** Properties of a MqttConfig. */ - interface IMqttConfig { + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry + */ + type GetDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; - /** MqttConfig mqttEnabledState */ - mqttEnabledState?: (google.cloud.iot.v1.MqttState|keyof typeof google.cloud.iot.v1.MqttState|null); - } + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * @param error Error, if any + * @param [response] DeviceRegistry + */ + type UpdateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; - /** Represents a MqttConfig. */ - class MqttConfig implements IMqttConfig { + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDeviceRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Constructs a new MqttConfig. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * @param error Error, if any + * @param [response] ListDeviceRegistriesResponse */ - constructor(properties?: google.cloud.iot.v1.IMqttConfig); + type ListDeviceRegistriesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceRegistriesResponse) => void; - /** MqttConfig mqttEnabledState. */ - public mqttEnabledState: (google.cloud.iot.v1.MqttState|keyof typeof google.cloud.iot.v1.MqttState); + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * @param error Error, if any + * @param [response] Device + */ + type CreateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Creates a new MqttConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MqttConfig instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * @param error Error, if any + * @param [response] Device */ - public static create(properties?: google.cloud.iot.v1.IMqttConfig): google.cloud.iot.v1.MqttConfig; + type GetDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. - * @param message MqttConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * @param error Error, if any + * @param [response] Device */ - public static encode(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. - * @param message MqttConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * @param error Error, if any + * @param [response] Empty */ - public static encodeDelimited(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteDeviceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a MqttConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MqttConfig - * @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.cloud.iot.v1.DeviceManager#listDevices}. + * @param error Error, if any + * @param [response] ListDevicesResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.MqttConfig; + type ListDevicesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDevicesResponse) => void; /** - * Decodes a MqttConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MqttConfig - * @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.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * @param error Error, if any + * @param [response] DeviceConfig */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.MqttConfig; + type ModifyCloudToDeviceConfigCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceConfig) => void; /** - * Verifies a MqttConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * @param error Error, if any + * @param [response] ListDeviceConfigVersionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListDeviceConfigVersionsCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceConfigVersionsResponse) => void; /** - * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MqttConfig + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * @param error Error, if any + * @param [response] ListDeviceStatesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.MqttConfig; + type ListDeviceStatesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceStatesResponse) => void; /** - * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. - * @param message MqttConfig - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static toObject(message: google.cloud.iot.v1.MqttConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Converts this MqttConfig to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public toJSON(): { [k: string]: any }; - } + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - /** MqttState enum. */ - enum MqttState { - MQTT_STATE_UNSPECIFIED = 0, - MQTT_ENABLED = 1, - MQTT_DISABLED = 2 + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * @param error Error, if any + * @param [response] SendCommandToDeviceResponse + */ + type SendCommandToDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.SendCommandToDeviceResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * @param error Error, if any + * @param [response] BindDeviceToGatewayResponse + */ + type BindDeviceToGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.BindDeviceToGatewayResponse) => void; + + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * @param error Error, if any + * @param [response] UnbindDeviceFromGatewayResponse + */ + type UnbindDeviceFromGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) => void; } - /** Properties of a HttpConfig. */ - interface IHttpConfig { + /** Properties of a CreateDeviceRegistryRequest. */ + interface ICreateDeviceRegistryRequest { - /** HttpConfig httpEnabledState */ - httpEnabledState?: (google.cloud.iot.v1.HttpState|keyof typeof google.cloud.iot.v1.HttpState|null); + /** CreateDeviceRegistryRequest parent */ + parent?: (string|null); + + /** CreateDeviceRegistryRequest deviceRegistry */ + deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); } - /** Represents a HttpConfig. */ - class HttpConfig implements IHttpConfig { + /** Represents a CreateDeviceRegistryRequest. */ + class CreateDeviceRegistryRequest implements ICreateDeviceRegistryRequest { /** - * Constructs a new HttpConfig. + * Constructs a new CreateDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IHttpConfig); + constructor(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest); - /** HttpConfig httpEnabledState. */ - public httpEnabledState: (google.cloud.iot.v1.HttpState|keyof typeof google.cloud.iot.v1.HttpState); + /** CreateDeviceRegistryRequest parent. */ + public parent: string; + + /** CreateDeviceRegistryRequest deviceRegistry. */ + public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); /** - * Creates a new HttpConfig instance using the specified properties. + * Creates a new CreateDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns HttpConfig instance + * @returns CreateDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IHttpConfig): google.cloud.iot.v1.HttpConfig; + public static create(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. - * @param message HttpConfig message or plain object to encode + * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @param message CreateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. - * @param message HttpConfig message or plain object to encode + * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * @param message CreateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpConfig message from the specified reader or buffer. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpConfig + * @returns CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.HttpConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Decodes a HttpConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpConfig + * @returns CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.HttpConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Verifies a HttpConfig message. + * Verifies a CreateDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpConfig + * @returns CreateDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.HttpConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRegistryRequest; /** - * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. - * @param message HttpConfig + * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message CreateDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.HttpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.CreateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpConfig to JSON. + * Converts this CreateDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** HttpState enum. */ - enum HttpState { - HTTP_STATE_UNSPECIFIED = 0, - HTTP_ENABLED = 1, - HTTP_DISABLED = 2 - } + /** Properties of a GetDeviceRegistryRequest. */ + interface IGetDeviceRegistryRequest { - /** LogLevel enum. */ - enum LogLevel { - LOG_LEVEL_UNSPECIFIED = 0, - NONE = 10, - ERROR = 20, - INFO = 30, - DEBUG = 40 + /** GetDeviceRegistryRequest name */ + name?: (string|null); } - /** GatewayType enum. */ - enum GatewayType { - GATEWAY_TYPE_UNSPECIFIED = 0, - GATEWAY = 1, - NON_GATEWAY = 2 - } - - /** GatewayAuthMethod enum. */ - enum GatewayAuthMethod { - GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, - ASSOCIATION_ONLY = 1, - DEVICE_AUTH_TOKEN_ONLY = 2, - ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 - } - - /** Properties of an EventNotificationConfig. */ - interface IEventNotificationConfig { - - /** EventNotificationConfig subfolderMatches */ - subfolderMatches?: (string|null); - - /** EventNotificationConfig pubsubTopicName */ - pubsubTopicName?: (string|null); - } - - /** Represents an EventNotificationConfig. */ - class EventNotificationConfig implements IEventNotificationConfig { + /** Represents a GetDeviceRegistryRequest. */ + class GetDeviceRegistryRequest implements IGetDeviceRegistryRequest { /** - * Constructs a new EventNotificationConfig. + * Constructs a new GetDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IEventNotificationConfig); - - /** EventNotificationConfig subfolderMatches. */ - public subfolderMatches: string; + constructor(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest); - /** EventNotificationConfig pubsubTopicName. */ - public pubsubTopicName: string; + /** GetDeviceRegistryRequest name. */ + public name: string; /** - * Creates a new EventNotificationConfig instance using the specified properties. + * Creates a new GetDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EventNotificationConfig instance + * @returns GetDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IEventNotificationConfig): google.cloud.iot.v1.EventNotificationConfig; + public static create(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. - * @param message EventNotificationConfig message or plain object to encode + * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @param message GetDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. - * @param message EventNotificationConfig message or plain object to encode + * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * @param message GetDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventNotificationConfig + * @returns GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.EventNotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventNotificationConfig + * @returns GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.EventNotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Verifies an EventNotificationConfig message. + * Verifies a GetDeviceRegistryRequest message. * @param message Plain 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 EventNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventNotificationConfig + * @returns GetDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.EventNotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRegistryRequest; /** - * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. - * @param message EventNotificationConfig + * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message GetDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.EventNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.GetDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventNotificationConfig to JSON. + * Converts this GetDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StateNotificationConfig. */ - interface IStateNotificationConfig { + /** Properties of a DeleteDeviceRegistryRequest. */ + interface IDeleteDeviceRegistryRequest { - /** StateNotificationConfig pubsubTopicName */ - pubsubTopicName?: (string|null); + /** DeleteDeviceRegistryRequest name */ + name?: (string|null); } - /** Represents a StateNotificationConfig. */ - class StateNotificationConfig implements IStateNotificationConfig { + /** Represents a DeleteDeviceRegistryRequest. */ + class DeleteDeviceRegistryRequest implements IDeleteDeviceRegistryRequest { /** - * Constructs a new StateNotificationConfig. + * Constructs a new DeleteDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IStateNotificationConfig); + constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest); - /** StateNotificationConfig pubsubTopicName. */ - public pubsubTopicName: string; + /** DeleteDeviceRegistryRequest name. */ + public name: string; /** - * Creates a new StateNotificationConfig instance using the specified properties. + * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StateNotificationConfig instance + * @returns DeleteDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IStateNotificationConfig): google.cloud.iot.v1.StateNotificationConfig; + public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. - * @param message StateNotificationConfig message or plain object to encode + * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @param message DeleteDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. - * @param message StateNotificationConfig message or plain object to encode + * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * @param message DeleteDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StateNotificationConfig + * @returns DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.StateNotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StateNotificationConfig + * @returns DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.StateNotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Verifies a StateNotificationConfig message. + * Verifies a DeleteDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StateNotificationConfig + * @returns DeleteDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.StateNotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRegistryRequest; /** - * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. - * @param message StateNotificationConfig + * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message DeleteDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.StateNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeleteDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StateNotificationConfig to JSON. + * Converts this DeleteDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RegistryCredential. */ - interface IRegistryCredential { + /** Properties of an UpdateDeviceRegistryRequest. */ + interface IUpdateDeviceRegistryRequest { - /** RegistryCredential publicKeyCertificate */ - publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); + /** UpdateDeviceRegistryRequest deviceRegistry */ + deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + + /** UpdateDeviceRegistryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a RegistryCredential. */ - class RegistryCredential implements IRegistryCredential { + /** Represents an UpdateDeviceRegistryRequest. */ + class UpdateDeviceRegistryRequest implements IUpdateDeviceRegistryRequest { /** - * Constructs a new RegistryCredential. + * Constructs a new UpdateDeviceRegistryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IRegistryCredential); + constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest); - /** RegistryCredential publicKeyCertificate. */ - public publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); + /** UpdateDeviceRegistryRequest deviceRegistry. */ + public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); - /** RegistryCredential credential. */ - public credential?: "publicKeyCertificate"; + /** UpdateDeviceRegistryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new RegistryCredential instance using the specified properties. + * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RegistryCredential instance + * @returns UpdateDeviceRegistryRequest instance */ - public static create(properties?: google.cloud.iot.v1.IRegistryCredential): google.cloud.iot.v1.RegistryCredential; + public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. - * @param message RegistryCredential message or plain object to encode + * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @param message UpdateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. - * @param message RegistryCredential message or plain object to encode + * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * @param message UpdateDeviceRegistryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RegistryCredential message from the specified reader or buffer. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RegistryCredential + * @returns UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.RegistryCredential; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RegistryCredential + * @returns UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.RegistryCredential; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Verifies a RegistryCredential message. + * Verifies an UpdateDeviceRegistryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RegistryCredential + * @returns UpdateDeviceRegistryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.RegistryCredential; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRegistryRequest; /** - * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. - * @param message RegistryCredential + * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. + * @param message UpdateDeviceRegistryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.RegistryCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.UpdateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RegistryCredential to JSON. + * Converts this UpdateDeviceRegistryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a X509CertificateDetails. */ - interface IX509CertificateDetails { - - /** X509CertificateDetails issuer */ - issuer?: (string|null); - - /** X509CertificateDetails subject */ - subject?: (string|null); - - /** X509CertificateDetails startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ListDeviceRegistriesRequest. */ + interface IListDeviceRegistriesRequest { - /** X509CertificateDetails expiryTime */ - expiryTime?: (google.protobuf.ITimestamp|null); + /** ListDeviceRegistriesRequest parent */ + parent?: (string|null); - /** X509CertificateDetails signatureAlgorithm */ - signatureAlgorithm?: (string|null); + /** ListDeviceRegistriesRequest pageSize */ + pageSize?: (number|null); - /** X509CertificateDetails publicKeyType */ - publicKeyType?: (string|null); + /** ListDeviceRegistriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a X509CertificateDetails. */ - class X509CertificateDetails implements IX509CertificateDetails { + /** Represents a ListDeviceRegistriesRequest. */ + class ListDeviceRegistriesRequest implements IListDeviceRegistriesRequest { /** - * Constructs a new X509CertificateDetails. + * Constructs a new ListDeviceRegistriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IX509CertificateDetails); - - /** X509CertificateDetails issuer. */ - public issuer: string; + constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest); - /** X509CertificateDetails subject. */ - public subject: string; + /** ListDeviceRegistriesRequest parent. */ + public parent: string; - /** X509CertificateDetails startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** X509CertificateDetails expiryTime. */ - public expiryTime?: (google.protobuf.ITimestamp|null); - - /** X509CertificateDetails signatureAlgorithm. */ - public signatureAlgorithm: string; + /** ListDeviceRegistriesRequest pageSize. */ + public pageSize: number; - /** X509CertificateDetails publicKeyType. */ - public publicKeyType: string; + /** ListDeviceRegistriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new X509CertificateDetails instance using the specified properties. + * Creates a new ListDeviceRegistriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns X509CertificateDetails instance + * @returns ListDeviceRegistriesRequest instance */ - public static create(properties?: google.cloud.iot.v1.IX509CertificateDetails): google.cloud.iot.v1.X509CertificateDetails; + public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. - * @param message X509CertificateDetails message or plain object to encode + * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @param message ListDeviceRegistriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. - * @param message X509CertificateDetails message or plain object to encode + * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * @param message ListDeviceRegistriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns X509CertificateDetails + * @returns ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.X509CertificateDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns X509CertificateDetails + * @returns ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.X509CertificateDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Verifies a X509CertificateDetails message. + * Verifies a ListDeviceRegistriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns X509CertificateDetails + * @returns ListDeviceRegistriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.X509CertificateDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesRequest; /** - * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. - * @param message X509CertificateDetails + * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. + * @param message ListDeviceRegistriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.X509CertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this X509CertificateDetails to JSON. + * Converts this ListDeviceRegistriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PublicKeyCertificate. */ - interface IPublicKeyCertificate { - - /** PublicKeyCertificate format */ - format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|keyof typeof google.cloud.iot.v1.PublicKeyCertificateFormat|null); + /** Properties of a ListDeviceRegistriesResponse. */ + interface IListDeviceRegistriesResponse { - /** PublicKeyCertificate certificate */ - certificate?: (string|null); + /** ListDeviceRegistriesResponse deviceRegistries */ + deviceRegistries?: (google.cloud.iot.v1.IDeviceRegistry[]|null); - /** PublicKeyCertificate x509Details */ - x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); + /** ListDeviceRegistriesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a PublicKeyCertificate. */ - class PublicKeyCertificate implements IPublicKeyCertificate { + /** Represents a ListDeviceRegistriesResponse. */ + class ListDeviceRegistriesResponse implements IListDeviceRegistriesResponse { /** - * Constructs a new PublicKeyCertificate. + * Constructs a new ListDeviceRegistriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IPublicKeyCertificate); - - /** PublicKeyCertificate format. */ - public format: (google.cloud.iot.v1.PublicKeyCertificateFormat|keyof typeof google.cloud.iot.v1.PublicKeyCertificateFormat); + constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse); - /** PublicKeyCertificate certificate. */ - public certificate: string; + /** ListDeviceRegistriesResponse deviceRegistries. */ + public deviceRegistries: google.cloud.iot.v1.IDeviceRegistry[]; - /** PublicKeyCertificate x509Details. */ - public x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); + /** ListDeviceRegistriesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new PublicKeyCertificate instance using the specified properties. + * Creates a new ListDeviceRegistriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PublicKeyCertificate instance + * @returns ListDeviceRegistriesResponse instance */ - public static create(properties?: google.cloud.iot.v1.IPublicKeyCertificate): google.cloud.iot.v1.PublicKeyCertificate; + public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. - * @param message PublicKeyCertificate message or plain object to encode + * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @param message ListDeviceRegistriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. - * @param message PublicKeyCertificate message or plain object to encode + * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * @param message ListDeviceRegistriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PublicKeyCertificate + * @returns ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCertificate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PublicKeyCertificate + * @returns ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCertificate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Verifies a PublicKeyCertificate message. + * Verifies a ListDeviceRegistriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PublicKeyCertificate + * @returns ListDeviceRegistriesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCertificate; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesResponse; /** - * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. - * @param message PublicKeyCertificate + * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. + * @param message ListDeviceRegistriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.PublicKeyCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PublicKeyCertificate to JSON. + * Converts this ListDeviceRegistriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** PublicKeyCertificateFormat enum. */ - enum PublicKeyCertificateFormat { - UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, - X509_CERTIFICATE_PEM = 1 - } - - /** Properties of a DeviceCredential. */ - interface IDeviceCredential { + /** Properties of a CreateDeviceRequest. */ + interface ICreateDeviceRequest { - /** DeviceCredential publicKey */ - publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + /** CreateDeviceRequest parent */ + parent?: (string|null); - /** DeviceCredential expirationTime */ - expirationTime?: (google.protobuf.ITimestamp|null); + /** CreateDeviceRequest device */ + device?: (google.cloud.iot.v1.IDevice|null); } - /** Represents a DeviceCredential. */ - class DeviceCredential implements IDeviceCredential { + /** Represents a CreateDeviceRequest. */ + class CreateDeviceRequest implements ICreateDeviceRequest { /** - * Constructs a new DeviceCredential. + * Constructs a new CreateDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceCredential); - - /** DeviceCredential publicKey. */ - public publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + constructor(properties?: google.cloud.iot.v1.ICreateDeviceRequest); - /** DeviceCredential expirationTime. */ - public expirationTime?: (google.protobuf.ITimestamp|null); + /** CreateDeviceRequest parent. */ + public parent: string; - /** DeviceCredential credential. */ - public credential?: "publicKey"; + /** CreateDeviceRequest device. */ + public device?: (google.cloud.iot.v1.IDevice|null); /** - * Creates a new DeviceCredential instance using the specified properties. + * Creates a new CreateDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceCredential instance + * @returns CreateDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceCredential): google.cloud.iot.v1.DeviceCredential; + public static create(properties?: google.cloud.iot.v1.ICreateDeviceRequest): google.cloud.iot.v1.CreateDeviceRequest; /** - * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. - * @param message DeviceCredential message or plain object to encode + * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @param message CreateDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. - * @param message DeviceCredential message or plain object to encode + * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * @param message CreateDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceCredential message from the specified reader or buffer. + * Decodes a CreateDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceCredential + * @returns CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceCredential; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRequest; /** - * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceCredential + * @returns CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceCredential; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRequest; /** - * Verifies a DeviceCredential message. + * Verifies a CreateDeviceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceCredential + * @returns CreateDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceCredential; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRequest; /** - * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. - * @param message DeviceCredential + * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. + * @param message CreateDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.CreateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceCredential to JSON. + * Converts this CreateDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PublicKeyCredential. */ - interface IPublicKeyCredential { + /** Properties of a GetDeviceRequest. */ + interface IGetDeviceRequest { - /** PublicKeyCredential format */ - format?: (google.cloud.iot.v1.PublicKeyFormat|keyof typeof google.cloud.iot.v1.PublicKeyFormat|null); + /** GetDeviceRequest name */ + name?: (string|null); - /** PublicKeyCredential key */ - key?: (string|null); + /** GetDeviceRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); } - /** Represents a PublicKeyCredential. */ - class PublicKeyCredential implements IPublicKeyCredential { + /** Represents a GetDeviceRequest. */ + class GetDeviceRequest implements IGetDeviceRequest { /** - * Constructs a new PublicKeyCredential. + * Constructs a new GetDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IPublicKeyCredential); + constructor(properties?: google.cloud.iot.v1.IGetDeviceRequest); - /** PublicKeyCredential format. */ - public format: (google.cloud.iot.v1.PublicKeyFormat|keyof typeof google.cloud.iot.v1.PublicKeyFormat); + /** GetDeviceRequest name. */ + public name: string; - /** PublicKeyCredential key. */ - public key: string; + /** GetDeviceRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new PublicKeyCredential instance using the specified properties. + * Creates a new GetDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PublicKeyCredential instance + * @returns GetDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IPublicKeyCredential): google.cloud.iot.v1.PublicKeyCredential; + public static create(properties?: google.cloud.iot.v1.IGetDeviceRequest): google.cloud.iot.v1.GetDeviceRequest; /** - * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. - * @param message PublicKeyCredential message or plain object to encode + * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @param message GetDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. - * @param message PublicKeyCredential message or plain object to encode + * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * @param message GetDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer. + * Decodes a GetDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PublicKeyCredential + * @returns GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCredential; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRequest; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PublicKeyCredential + * @returns GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCredential; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRequest; /** - * Verifies a PublicKeyCredential message. + * Verifies a GetDeviceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PublicKeyCredential + * @returns GetDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCredential; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRequest; /** - * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. - * @param message PublicKeyCredential + * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. + * @param message GetDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.PublicKeyCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.GetDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PublicKeyCredential to JSON. + * Converts this GetDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** PublicKeyFormat enum. */ - enum PublicKeyFormat { - UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, - RSA_PEM = 3, - RSA_X509_PEM = 1, - ES256_PEM = 2, - ES256_X509_PEM = 4 - } - - /** Properties of a DeviceConfig. */ - interface IDeviceConfig { - - /** DeviceConfig version */ - version?: (number|Long|string|null); - - /** DeviceConfig cloudUpdateTime */ - cloudUpdateTime?: (google.protobuf.ITimestamp|null); + /** Properties of an UpdateDeviceRequest. */ + interface IUpdateDeviceRequest { - /** DeviceConfig deviceAckTime */ - deviceAckTime?: (google.protobuf.ITimestamp|null); + /** UpdateDeviceRequest device */ + device?: (google.cloud.iot.v1.IDevice|null); - /** DeviceConfig binaryData */ - binaryData?: (Uint8Array|string|null); + /** UpdateDeviceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a DeviceConfig. */ - class DeviceConfig implements IDeviceConfig { + /** Represents an UpdateDeviceRequest. */ + class UpdateDeviceRequest implements IUpdateDeviceRequest { /** - * Constructs a new DeviceConfig. + * Constructs a new UpdateDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceConfig); - - /** DeviceConfig version. */ - public version: (number|Long|string); - - /** DeviceConfig cloudUpdateTime. */ - public cloudUpdateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRequest); - /** DeviceConfig deviceAckTime. */ - public deviceAckTime?: (google.protobuf.ITimestamp|null); + /** UpdateDeviceRequest device. */ + public device?: (google.cloud.iot.v1.IDevice|null); - /** DeviceConfig binaryData. */ - public binaryData: (Uint8Array|string); + /** UpdateDeviceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new DeviceConfig instance using the specified properties. + * Creates a new UpdateDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceConfig instance + * @returns UpdateDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceConfig): google.cloud.iot.v1.DeviceConfig; + public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRequest): google.cloud.iot.v1.UpdateDeviceRequest; /** - * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. - * @param message DeviceConfig message or plain object to encode + * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @param message UpdateDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. - * @param message DeviceConfig message or plain object to encode + * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * @param message UpdateDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceConfig message from the specified reader or buffer. + * Decodes an UpdateDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceConfig + * @returns UpdateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRequest; /** - * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceConfig + * @returns UpdateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRequest; /** - * Verifies a DeviceConfig message. + * Verifies an UpdateDeviceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceConfig + * @returns UpdateDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRequest; /** - * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. - * @param message DeviceConfig + * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. + * @param message UpdateDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.UpdateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceConfig to JSON. + * Converts this UpdateDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeviceState. */ - interface IDeviceState { - - /** DeviceState updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Properties of a DeleteDeviceRequest. */ + interface IDeleteDeviceRequest { - /** DeviceState binaryData */ - binaryData?: (Uint8Array|string|null); + /** DeleteDeviceRequest name */ + name?: (string|null); } - /** Represents a DeviceState. */ - class DeviceState implements IDeviceState { + /** Represents a DeleteDeviceRequest. */ + class DeleteDeviceRequest implements IDeleteDeviceRequest { /** - * Constructs a new DeviceState. + * Constructs a new DeleteDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeviceState); - - /** DeviceState updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRequest); - /** DeviceState binaryData. */ - public binaryData: (Uint8Array|string); + /** DeleteDeviceRequest name. */ + public name: string; /** - * Creates a new DeviceState instance using the specified properties. + * Creates a new DeleteDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceState instance + * @returns DeleteDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IDeviceState): google.cloud.iot.v1.DeviceState; + public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRequest): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. - * @param message DeviceState message or plain object to encode + * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @param message DeleteDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. - * @param message DeviceState message or plain object to encode + * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * @param message DeleteDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceState message from the specified reader or buffer. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceState + * @returns DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceState; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Decodes a DeviceState message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceState + * @returns DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceState; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Verifies a DeviceState message. + * Verifies a DeleteDeviceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceState + * @returns DeleteDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceState; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRequest; /** - * Creates a plain object from a DeviceState message. Also converts values to other types if specified. - * @param message DeviceState + * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * @param message DeleteDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeviceState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeleteDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceState to JSON. + * Converts this DeleteDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a DeviceManager */ - class DeviceManager extends $protobuf.rpc.Service { + /** Properties of a ListDevicesRequest. */ + interface IListDevicesRequest { - /** - * Constructs a new DeviceManager 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); + /** ListDevicesRequest parent */ + parent?: (string|null); - /** - * Creates new DeviceManager 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): DeviceManager; + /** ListDevicesRequest deviceNumIds */ + deviceNumIds?: ((number|Long|string)[]|null); - /** - * Calls CreateDeviceRegistry. - * @param request CreateDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceRegistry - */ - public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback): void; + /** ListDevicesRequest deviceIds */ + deviceIds?: (string[]|null); - /** - * Calls CreateDeviceRegistry. - * @param request CreateDeviceRegistryRequest message or plain object - * @returns Promise - */ - public createDeviceRegistry(request: google.cloud.iot.v1.ICreateDeviceRegistryRequest): Promise; + /** ListDevicesRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); - /** - * Calls GetDeviceRegistry. - * @param request GetDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceRegistry - */ - public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback): void; + /** ListDevicesRequest gatewayListOptions */ + gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); - /** - * Calls GetDeviceRegistry. - * @param request GetDeviceRegistryRequest message or plain object - * @returns Promise - */ - public getDeviceRegistry(request: google.cloud.iot.v1.IGetDeviceRegistryRequest): Promise; + /** ListDevicesRequest pageSize */ + pageSize?: (number|null); - /** - * Calls UpdateDeviceRegistry. - * @param request UpdateDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceRegistry - */ - public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback): void; + /** ListDevicesRequest pageToken */ + pageToken?: (string|null); + } - /** - * Calls UpdateDeviceRegistry. - * @param request UpdateDeviceRegistryRequest message or plain object - * @returns Promise - */ - public updateDeviceRegistry(request: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): Promise; + /** Represents a ListDevicesRequest. */ + class ListDevicesRequest implements IListDevicesRequest { /** - * Calls DeleteDeviceRegistry. - * @param request DeleteDeviceRegistryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Constructs a new ListDevicesRequest. + * @param [properties] Properties to set */ - public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback): void; + constructor(properties?: google.cloud.iot.v1.IListDevicesRequest); - /** - * Calls DeleteDeviceRegistry. - * @param request DeleteDeviceRegistryRequest message or plain object - * @returns Promise - */ - public deleteDeviceRegistry(request: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): Promise; + /** ListDevicesRequest parent. */ + public parent: string; - /** - * Calls ListDeviceRegistries. - * @param request ListDeviceRegistriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse - */ - public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback): void; + /** ListDevicesRequest deviceNumIds. */ + public deviceNumIds: (number|Long|string)[]; - /** - * Calls ListDeviceRegistries. - * @param request ListDeviceRegistriesRequest message or plain object - * @returns Promise - */ - public listDeviceRegistries(request: google.cloud.iot.v1.IListDeviceRegistriesRequest): Promise; + /** ListDevicesRequest deviceIds. */ + public deviceIds: string[]; + + /** ListDevicesRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListDevicesRequest gatewayListOptions. */ + public gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + + /** ListDevicesRequest pageSize. */ + public pageSize: number; + + /** ListDevicesRequest pageToken. */ + public pageToken: string; /** - * Calls CreateDevice. - * @param request CreateDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Device + * Creates a new ListDevicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDevicesRequest instance */ - public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.CreateDeviceCallback): void; + public static create(properties?: google.cloud.iot.v1.IListDevicesRequest): google.cloud.iot.v1.ListDevicesRequest; /** - * Calls CreateDevice. - * @param request CreateDeviceRequest message or plain object - * @returns Promise + * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @param message ListDevicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createDevice(request: google.cloud.iot.v1.ICreateDeviceRequest): Promise; + public static encode(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetDevice. - * @param request GetDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Device + * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * @param message ListDevicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.GetDeviceCallback): void; + public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetDevice. - * @param request GetDeviceRequest message or plain object - * @returns Promise + * Decodes a ListDevicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getDevice(request: google.cloud.iot.v1.IGetDeviceRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesRequest; /** - * Calls UpdateDevice. - * @param request UpdateDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Device + * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesRequest; /** - * Calls UpdateDevice. - * @param request UpdateDeviceRequest message or plain object - * @returns Promise + * Verifies a ListDevicesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateDevice(request: google.cloud.iot.v1.IUpdateDeviceRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteDevice. - * @param request DeleteDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDevicesRequest */ - public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesRequest; /** - * Calls DeleteDevice. - * @param request DeleteDeviceRequest message or plain object - * @returns Promise + * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. + * @param message ListDevicesRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteDevice(request: google.cloud.iot.v1.IDeleteDeviceRequest): Promise; + public static toObject(message: google.cloud.iot.v1.ListDevicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListDevices. - * @param request ListDevicesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDevicesResponse + * Converts this ListDevicesRequest to JSON. + * @returns JSON object */ - public listDevices(request: google.cloud.iot.v1.IListDevicesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDevicesCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GatewayListOptions. */ + interface IGatewayListOptions { + + /** GatewayListOptions gatewayType */ + gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); + + /** GatewayListOptions associationsGatewayId */ + associationsGatewayId?: (string|null); + + /** GatewayListOptions associationsDeviceId */ + associationsDeviceId?: (string|null); + } + + /** Represents a GatewayListOptions. */ + class GatewayListOptions implements IGatewayListOptions { /** - * Calls ListDevices. - * @param request ListDevicesRequest message or plain object - * @returns Promise + * Constructs a new GatewayListOptions. + * @param [properties] Properties to set */ - public listDevices(request: google.cloud.iot.v1.IListDevicesRequest): Promise; + constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); + + /** GatewayListOptions gatewayType. */ + public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); + + /** GatewayListOptions associationsGatewayId. */ + public associationsGatewayId: string; + + /** GatewayListOptions associationsDeviceId. */ + public associationsDeviceId: string; + + /** GatewayListOptions filter. */ + public filter?: ("gatewayType"|"associationsGatewayId"|"associationsDeviceId"); /** - * Calls ModifyCloudToDeviceConfig. - * @param request ModifyCloudToDeviceConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceConfig + * Creates a new GatewayListOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GatewayListOptions instance */ - public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, callback: google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback): void; + public static create(properties?: google.cloud.iot.v1.IGatewayListOptions): google.cloud.iot.v1.GatewayListOptions; /** - * Calls ModifyCloudToDeviceConfig. - * @param request ModifyCloudToDeviceConfigRequest message or plain object - * @returns Promise + * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @param message GatewayListOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public modifyCloudToDeviceConfig(request: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): Promise; + public static encode(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListDeviceConfigVersions. - * @param request ListDeviceConfigVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse + * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @param message GatewayListOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback): void; + public static encodeDelimited(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListDeviceConfigVersions. - * @param request ListDeviceConfigVersionsRequest message or plain object - * @returns Promise + * Decodes a GatewayListOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listDeviceConfigVersions(request: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayListOptions; /** - * Calls ListDeviceStates. - * @param request ListDeviceStatesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceStatesResponse + * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest, callback: google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayListOptions; /** - * Calls ListDeviceStates. - * @param request ListDeviceStatesRequest message or plain object - * @returns Promise + * Verifies a GatewayListOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listDeviceStates(request: google.cloud.iot.v1.IListDeviceStatesRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatewayListOptions */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayListOptions; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise + * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. + * @param message GatewayListOptions + * @param [options] Conversion options + * @returns Plain object */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + public static toObject(message: google.cloud.iot.v1.GatewayListOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Converts this GatewayListOptions to JSON. + * @returns JSON object */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDevicesResponse. */ + interface IListDevicesResponse { + + /** ListDevicesResponse devices */ + devices?: (google.cloud.iot.v1.IDevice[]|null); + + /** ListDevicesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDevicesResponse. */ + class ListDevicesResponse implements IListDevicesResponse { /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Constructs a new ListDevicesResponse. + * @param [properties] Properties to set */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + constructor(properties?: google.cloud.iot.v1.IListDevicesResponse); + + /** ListDevicesResponse devices. */ + public devices: google.cloud.iot.v1.IDevice[]; + + /** ListDevicesResponse nextPageToken. */ + public nextPageToken: string; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * Creates a new ListDevicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDevicesResponse instance */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback): void; + public static create(properties?: google.cloud.iot.v1.IListDevicesResponse): google.cloud.iot.v1.ListDevicesResponse; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise + * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @param message ListDevicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + public static encode(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SendCommandToDevice. - * @param request SendCommandToDeviceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse + * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @param message ListDevicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest, callback: google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback): void; + public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SendCommandToDevice. - * @param request SendCommandToDeviceRequest message or plain object - * @returns Promise + * Decodes a ListDevicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public sendCommandToDevice(request: google.cloud.iot.v1.ISendCommandToDeviceRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesResponse; /** - * Calls BindDeviceToGateway. - * @param request BindDeviceToGatewayRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse + * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesResponse; /** - * Calls BindDeviceToGateway. - * @param request BindDeviceToGatewayRequest message or plain object - * @returns Promise + * Verifies a ListDevicesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public bindDeviceToGateway(request: google.cloud.iot.v1.IBindDeviceToGatewayRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UnbindDeviceFromGateway. - * @param request UnbindDeviceFromGatewayRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse + * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDevicesResponse */ - public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, callback: google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesResponse; /** - * Calls UnbindDeviceFromGateway. - * @param request UnbindDeviceFromGatewayRequest message or plain object - * @returns Promise + * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. + * @param message ListDevicesResponse + * @param [options] Conversion options + * @returns Plain object */ - public unbindDeviceFromGateway(request: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): Promise; + public static toObject(message: google.cloud.iot.v1.ListDevicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDevicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - namespace DeviceManager { + /** Properties of a ModifyCloudToDeviceConfigRequest. */ + interface IModifyCloudToDeviceConfigRequest { + + /** ModifyCloudToDeviceConfigRequest name */ + name?: (string|null); + + /** ModifyCloudToDeviceConfigRequest versionToUpdate */ + versionToUpdate?: (number|Long|string|null); + + /** ModifyCloudToDeviceConfigRequest binaryData */ + binaryData?: (Uint8Array|string|null); + } + + /** Represents a ModifyCloudToDeviceConfigRequest. */ + class ModifyCloudToDeviceConfigRequest implements IModifyCloudToDeviceConfigRequest { /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. - * @param error Error, if any - * @param [response] DeviceRegistry + * Constructs a new ModifyCloudToDeviceConfigRequest. + * @param [properties] Properties to set */ - type CreateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + constructor(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest); + + /** ModifyCloudToDeviceConfigRequest name. */ + public name: string; + + /** ModifyCloudToDeviceConfigRequest versionToUpdate. */ + public versionToUpdate: (number|Long|string); + + /** ModifyCloudToDeviceConfigRequest binaryData. */ + public binaryData: (Uint8Array|string); /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. - * @param error Error, if any - * @param [response] DeviceRegistry + * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ModifyCloudToDeviceConfigRequest instance */ - type GetDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + public static create(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. - * @param error Error, if any - * @param [response] DeviceRegistry + * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; + public static encode(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. - * @param error Error, if any - * @param [response] Empty + * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteDeviceRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static encodeDelimited(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. - * @param error Error, if any - * @param [response] ListDeviceRegistriesResponse + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListDeviceRegistriesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceRegistriesResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. - * @param error Error, if any - * @param [response] Device + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. - * @param error Error, if any - * @param [response] Device + * Verifies a ModifyCloudToDeviceConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. - * @param error Error, if any - * @param [response] Device + * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModifyCloudToDeviceConfigRequest */ - type UpdateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. + * @param message ModifyCloudToDeviceConfigRequest + * @param [options] Conversion options + * @returns Plain object */ - type DeleteDeviceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. - * @param error Error, if any - * @param [response] ListDevicesResponse + * Converts this ModifyCloudToDeviceConfigRequest to JSON. + * @returns JSON object */ - type ListDevicesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDevicesResponse) => void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeviceConfigVersionsRequest. */ + interface IListDeviceConfigVersionsRequest { + + /** ListDeviceConfigVersionsRequest name */ + name?: (string|null); + + /** ListDeviceConfigVersionsRequest numVersions */ + numVersions?: (number|null); + } + + /** Represents a ListDeviceConfigVersionsRequest. */ + class ListDeviceConfigVersionsRequest implements IListDeviceConfigVersionsRequest { /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. - * @param error Error, if any - * @param [response] DeviceConfig + * Constructs a new ListDeviceConfigVersionsRequest. + * @param [properties] Properties to set */ - type ModifyCloudToDeviceConfigCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceConfig) => void; + constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest); + + /** ListDeviceConfigVersionsRequest name. */ + public name: string; + + /** ListDeviceConfigVersionsRequest numVersions. */ + public numVersions: number; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. - * @param error Error, if any - * @param [response] ListDeviceConfigVersionsResponse + * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceConfigVersionsRequest instance */ - type ListDeviceConfigVersionsCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceConfigVersionsResponse) => void; + public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. - * @param error Error, if any - * @param [response] ListDeviceStatesResponse + * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @param message ListDeviceConfigVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListDeviceStatesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceStatesResponse) => void; + public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * @param message ListDeviceConfigVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceConfigVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceConfigVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. - * @param error Error, if any - * @param [response] SendCommandToDeviceResponse + * Verifies a ListDeviceConfigVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type SendCommandToDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.SendCommandToDeviceResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. - * @param error Error, if any - * @param [response] BindDeviceToGatewayResponse + * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceConfigVersionsRequest */ - type BindDeviceToGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.BindDeviceToGatewayResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. - * @param error Error, if any - * @param [response] UnbindDeviceFromGatewayResponse + * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. + * @param message ListDeviceConfigVersionsRequest + * @param [options] Conversion options + * @returns Plain object */ - type UnbindDeviceFromGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) => void; - } + public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a CreateDeviceRegistryRequest. */ - interface ICreateDeviceRegistryRequest { + /** + * Converts this ListDeviceConfigVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CreateDeviceRegistryRequest parent */ - parent?: (string|null); + /** Properties of a ListDeviceConfigVersionsResponse. */ + interface IListDeviceConfigVersionsResponse { - /** CreateDeviceRegistryRequest deviceRegistry */ - deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** ListDeviceConfigVersionsResponse deviceConfigs */ + deviceConfigs?: (google.cloud.iot.v1.IDeviceConfig[]|null); } - /** Represents a CreateDeviceRegistryRequest. */ - class CreateDeviceRegistryRequest implements ICreateDeviceRegistryRequest { + /** Represents a ListDeviceConfigVersionsResponse. */ + class ListDeviceConfigVersionsResponse implements IListDeviceConfigVersionsResponse { /** - * Constructs a new CreateDeviceRegistryRequest. + * Constructs a new ListDeviceConfigVersionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest); - - /** CreateDeviceRegistryRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse); - /** CreateDeviceRegistryRequest deviceRegistry. */ - public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** ListDeviceConfigVersionsResponse deviceConfigs. */ + public deviceConfigs: google.cloud.iot.v1.IDeviceConfig[]; /** - * Creates a new CreateDeviceRegistryRequest instance using the specified properties. + * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateDeviceRegistryRequest instance + * @returns ListDeviceConfigVersionsResponse instance */ - public static create(properties?: google.cloud.iot.v1.ICreateDeviceRegistryRequest): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. - * @param message CreateDeviceRegistryRequest message or plain object to encode + * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @param message ListDeviceConfigVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. - * @param message CreateDeviceRegistryRequest message or plain object to encode + * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * @param message ListDeviceConfigVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateDeviceRegistryRequest + * @returns ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateDeviceRegistryRequest + * @returns ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Verifies a CreateDeviceRegistryRequest message. + * Verifies a ListDeviceConfigVersionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateDeviceRegistryRequest + * @returns ListDeviceConfigVersionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; /** - * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message CreateDeviceRegistryRequest + * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. + * @param message ListDeviceConfigVersionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.CreateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDeviceRegistryRequest to JSON. + * Converts this ListDeviceConfigVersionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetDeviceRegistryRequest. */ - interface IGetDeviceRegistryRequest { + /** Properties of a ListDeviceStatesRequest. */ + interface IListDeviceStatesRequest { - /** GetDeviceRegistryRequest name */ + /** ListDeviceStatesRequest name */ name?: (string|null); + + /** ListDeviceStatesRequest numStates */ + numStates?: (number|null); } - /** Represents a GetDeviceRegistryRequest. */ - class GetDeviceRegistryRequest implements IGetDeviceRegistryRequest { + /** Represents a ListDeviceStatesRequest. */ + class ListDeviceStatesRequest implements IListDeviceStatesRequest { /** - * Constructs a new GetDeviceRegistryRequest. + * Constructs a new ListDeviceStatesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest); + constructor(properties?: google.cloud.iot.v1.IListDeviceStatesRequest); - /** GetDeviceRegistryRequest name. */ + /** ListDeviceStatesRequest name. */ public name: string; + /** ListDeviceStatesRequest numStates. */ + public numStates: number; + /** - * Creates a new GetDeviceRegistryRequest instance using the specified properties. + * Creates a new ListDeviceStatesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetDeviceRegistryRequest instance + * @returns ListDeviceStatesRequest instance */ - public static create(properties?: google.cloud.iot.v1.IGetDeviceRegistryRequest): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.IListDeviceStatesRequest): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. - * @param message GetDeviceRegistryRequest message or plain object to encode + * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @param message ListDeviceStatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. - * @param message GetDeviceRegistryRequest message or plain object to encode + * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * @param message ListDeviceStatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeviceRegistryRequest + * @returns ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeviceRegistryRequest + * @returns ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Verifies a GetDeviceRegistryRequest message. + * Verifies a ListDeviceStatesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeviceRegistryRequest + * @returns ListDeviceStatesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesRequest; /** - * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message GetDeviceRegistryRequest + * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. + * @param message ListDeviceStatesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.GetDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeviceRegistryRequest to JSON. + * Converts this ListDeviceStatesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDeviceRegistryRequest. */ - interface IDeleteDeviceRegistryRequest { + /** Properties of a ListDeviceStatesResponse. */ + interface IListDeviceStatesResponse { - /** DeleteDeviceRegistryRequest name */ - name?: (string|null); + /** ListDeviceStatesResponse deviceStates */ + deviceStates?: (google.cloud.iot.v1.IDeviceState[]|null); } - /** Represents a DeleteDeviceRegistryRequest. */ - class DeleteDeviceRegistryRequest implements IDeleteDeviceRegistryRequest { + /** Represents a ListDeviceStatesResponse. */ + class ListDeviceStatesResponse implements IListDeviceStatesResponse { /** - * Constructs a new DeleteDeviceRegistryRequest. + * Constructs a new ListDeviceStatesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest); + constructor(properties?: google.cloud.iot.v1.IListDeviceStatesResponse); - /** DeleteDeviceRegistryRequest name. */ - public name: string; + /** ListDeviceStatesResponse deviceStates. */ + public deviceStates: google.cloud.iot.v1.IDeviceState[]; /** - * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. + * Creates a new ListDeviceStatesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDeviceRegistryRequest instance + * @returns ListDeviceStatesResponse instance */ - public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRegistryRequest): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.IListDeviceStatesResponse): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. - * @param message DeleteDeviceRegistryRequest message or plain object to encode + * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @param message ListDeviceStatesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. - * @param message DeleteDeviceRegistryRequest message or plain object to encode + * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * @param message ListDeviceStatesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDeviceRegistryRequest + * @returns ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDeviceRegistryRequest + * @returns ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Verifies a DeleteDeviceRegistryRequest message. + * Verifies a ListDeviceStatesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDeviceRegistryRequest + * @returns ListDeviceStatesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesResponse; /** - * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message DeleteDeviceRegistryRequest + * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. + * @param message ListDeviceStatesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeleteDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.ListDeviceStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDeviceRegistryRequest to JSON. + * Converts this ListDeviceStatesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateDeviceRegistryRequest. */ - interface IUpdateDeviceRegistryRequest { + /** Properties of a SendCommandToDeviceRequest. */ + interface ISendCommandToDeviceRequest { - /** UpdateDeviceRegistryRequest deviceRegistry */ - deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** SendCommandToDeviceRequest name */ + name?: (string|null); - /** UpdateDeviceRegistryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** SendCommandToDeviceRequest binaryData */ + binaryData?: (Uint8Array|string|null); + + /** SendCommandToDeviceRequest subfolder */ + subfolder?: (string|null); } - /** Represents an UpdateDeviceRegistryRequest. */ - class UpdateDeviceRegistryRequest implements IUpdateDeviceRegistryRequest { + /** Represents a SendCommandToDeviceRequest. */ + class SendCommandToDeviceRequest implements ISendCommandToDeviceRequest { /** - * Constructs a new UpdateDeviceRegistryRequest. + * Constructs a new SendCommandToDeviceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest); + constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest); - /** UpdateDeviceRegistryRequest deviceRegistry. */ - public deviceRegistry?: (google.cloud.iot.v1.IDeviceRegistry|null); + /** SendCommandToDeviceRequest name. */ + public name: string; - /** UpdateDeviceRegistryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SendCommandToDeviceRequest binaryData. */ + public binaryData: (Uint8Array|string); + + /** SendCommandToDeviceRequest subfolder. */ + public subfolder: string; /** - * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. + * Creates a new SendCommandToDeviceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDeviceRegistryRequest instance + * @returns SendCommandToDeviceRequest instance */ - public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRegistryRequest): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. - * @param message UpdateDeviceRegistryRequest message or plain object to encode + * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @param message SendCommandToDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. - * @param message UpdateDeviceRegistryRequest message or plain object to encode + * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * @param message SendCommandToDeviceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateDeviceRegistryRequest + * @returns SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDeviceRegistryRequest + * @returns SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Verifies an UpdateDeviceRegistryRequest message. + * Verifies a SendCommandToDeviceRequest message. * @param message Plain 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 UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDeviceRegistryRequest + * @returns SendCommandToDeviceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRegistryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceRequest; /** - * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. - * @param message UpdateDeviceRegistryRequest + * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. + * @param message SendCommandToDeviceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.UpdateDeviceRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDeviceRegistryRequest to JSON. + * Converts this SendCommandToDeviceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceRegistriesRequest. */ - interface IListDeviceRegistriesRequest { - - /** ListDeviceRegistriesRequest parent */ - parent?: (string|null); - - /** ListDeviceRegistriesRequest pageSize */ - pageSize?: (number|null); - - /** ListDeviceRegistriesRequest pageToken */ - pageToken?: (string|null); + /** Properties of a SendCommandToDeviceResponse. */ + interface ISendCommandToDeviceResponse { } - /** Represents a ListDeviceRegistriesRequest. */ - class ListDeviceRegistriesRequest implements IListDeviceRegistriesRequest { + /** Represents a SendCommandToDeviceResponse. */ + class SendCommandToDeviceResponse implements ISendCommandToDeviceResponse { /** - * Constructs a new ListDeviceRegistriesRequest. + * Constructs a new SendCommandToDeviceResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest); - - /** ListDeviceRegistriesRequest parent. */ - public parent: string; - - /** ListDeviceRegistriesRequest pageSize. */ - public pageSize: number; - - /** ListDeviceRegistriesRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse); /** - * Creates a new ListDeviceRegistriesRequest instance using the specified properties. + * Creates a new SendCommandToDeviceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceRegistriesRequest instance + * @returns SendCommandToDeviceResponse instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesRequest): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. - * @param message ListDeviceRegistriesRequest message or plain object to encode + * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @param message SendCommandToDeviceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. - * @param message ListDeviceRegistriesRequest message or plain object to encode + * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * @param message SendCommandToDeviceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceRegistriesRequest + * @returns SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceRegistriesRequest + * @returns SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Verifies a ListDeviceRegistriesRequest message. + * Verifies a SendCommandToDeviceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceRegistriesRequest + * @returns SendCommandToDeviceResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceResponse; /** - * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. - * @param message ListDeviceRegistriesRequest + * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. + * @param message SendCommandToDeviceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceRegistriesRequest to JSON. + * Converts this SendCommandToDeviceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceRegistriesResponse. */ - interface IListDeviceRegistriesResponse { + /** Properties of a BindDeviceToGatewayRequest. */ + interface IBindDeviceToGatewayRequest { - /** ListDeviceRegistriesResponse deviceRegistries */ - deviceRegistries?: (google.cloud.iot.v1.IDeviceRegistry[]|null); + /** BindDeviceToGatewayRequest parent */ + parent?: (string|null); - /** ListDeviceRegistriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** BindDeviceToGatewayRequest gatewayId */ + gatewayId?: (string|null); + + /** BindDeviceToGatewayRequest deviceId */ + deviceId?: (string|null); } - /** Represents a ListDeviceRegistriesResponse. */ - class ListDeviceRegistriesResponse implements IListDeviceRegistriesResponse { + /** Represents a BindDeviceToGatewayRequest. */ + class BindDeviceToGatewayRequest implements IBindDeviceToGatewayRequest { /** - * Constructs a new ListDeviceRegistriesResponse. + * Constructs a new BindDeviceToGatewayRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse); + constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest); - /** ListDeviceRegistriesResponse deviceRegistries. */ - public deviceRegistries: google.cloud.iot.v1.IDeviceRegistry[]; + /** BindDeviceToGatewayRequest parent. */ + public parent: string; - /** ListDeviceRegistriesResponse nextPageToken. */ - public nextPageToken: string; + /** BindDeviceToGatewayRequest gatewayId. */ + public gatewayId: string; + + /** BindDeviceToGatewayRequest deviceId. */ + public deviceId: string; /** - * Creates a new ListDeviceRegistriesResponse instance using the specified properties. + * Creates a new BindDeviceToGatewayRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceRegistriesResponse instance + * @returns BindDeviceToGatewayRequest instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceRegistriesResponse): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. - * @param message ListDeviceRegistriesResponse message or plain object to encode + * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @param message BindDeviceToGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. - * @param message ListDeviceRegistriesResponse message or plain object to encode + * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * @param message BindDeviceToGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceRegistriesResponse + * @returns BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceRegistriesResponse + * @returns BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Verifies a ListDeviceRegistriesResponse message. + * Verifies a BindDeviceToGatewayRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceRegistriesResponse + * @returns BindDeviceToGatewayRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceRegistriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayRequest; /** - * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. - * @param message ListDeviceRegistriesResponse + * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. + * @param message BindDeviceToGatewayRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceRegistriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceRegistriesResponse to JSON. + * Converts this BindDeviceToGatewayRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateDeviceRequest. */ - interface ICreateDeviceRequest { - - /** CreateDeviceRequest parent */ - parent?: (string|null); - - /** CreateDeviceRequest device */ - device?: (google.cloud.iot.v1.IDevice|null); + /** Properties of a BindDeviceToGatewayResponse. */ + interface IBindDeviceToGatewayResponse { } - /** Represents a CreateDeviceRequest. */ - class CreateDeviceRequest implements ICreateDeviceRequest { + /** Represents a BindDeviceToGatewayResponse. */ + class BindDeviceToGatewayResponse implements IBindDeviceToGatewayResponse { /** - * Constructs a new CreateDeviceRequest. + * Constructs a new BindDeviceToGatewayResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ICreateDeviceRequest); - - /** CreateDeviceRequest parent. */ - public parent: string; - - /** CreateDeviceRequest device. */ - public device?: (google.cloud.iot.v1.IDevice|null); + constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse); /** - * Creates a new CreateDeviceRequest instance using the specified properties. + * Creates a new BindDeviceToGatewayResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateDeviceRequest instance + * @returns BindDeviceToGatewayResponse instance */ - public static create(properties?: google.cloud.iot.v1.ICreateDeviceRequest): google.cloud.iot.v1.CreateDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. - * @param message CreateDeviceRequest message or plain object to encode + * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @param message BindDeviceToGatewayResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. - * @param message CreateDeviceRequest message or plain object to encode + * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * @param message BindDeviceToGatewayResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ICreateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateDeviceRequest + * @returns BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.CreateDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateDeviceRequest + * @returns BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.CreateDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Verifies a CreateDeviceRequest message. + * Verifies a BindDeviceToGatewayResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateDeviceRequest + * @returns BindDeviceToGatewayResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.CreateDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayResponse; /** - * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. - * @param message CreateDeviceRequest + * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. + * @param message BindDeviceToGatewayResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.CreateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDeviceRequest to JSON. + * Converts this BindDeviceToGatewayResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetDeviceRequest. */ - interface IGetDeviceRequest { + /** Properties of an UnbindDeviceFromGatewayRequest. */ + interface IUnbindDeviceFromGatewayRequest { - /** GetDeviceRequest name */ - name?: (string|null); + /** UnbindDeviceFromGatewayRequest parent */ + parent?: (string|null); - /** GetDeviceRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** UnbindDeviceFromGatewayRequest gatewayId */ + gatewayId?: (string|null); + + /** UnbindDeviceFromGatewayRequest deviceId */ + deviceId?: (string|null); } - /** Represents a GetDeviceRequest. */ - class GetDeviceRequest implements IGetDeviceRequest { + /** Represents an UnbindDeviceFromGatewayRequest. */ + class UnbindDeviceFromGatewayRequest implements IUnbindDeviceFromGatewayRequest { /** - * Constructs a new GetDeviceRequest. + * Constructs a new UnbindDeviceFromGatewayRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IGetDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest); - /** GetDeviceRequest name. */ - public name: string; + /** UnbindDeviceFromGatewayRequest parent. */ + public parent: string; - /** GetDeviceRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** UnbindDeviceFromGatewayRequest gatewayId. */ + public gatewayId: string; + + /** UnbindDeviceFromGatewayRequest deviceId. */ + public deviceId: string; /** - * Creates a new GetDeviceRequest instance using the specified properties. + * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetDeviceRequest instance + * @returns UnbindDeviceFromGatewayRequest instance */ - public static create(properties?: google.cloud.iot.v1.IGetDeviceRequest): google.cloud.iot.v1.GetDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. - * @param message GetDeviceRequest message or plain object to encode + * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @param message UnbindDeviceFromGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. - * @param message GetDeviceRequest message or plain object to encode + * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * @param message UnbindDeviceFromGatewayRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IGetDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeviceRequest + * @returns UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GetDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeviceRequest + * @returns UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GetDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Verifies a GetDeviceRequest message. + * Verifies an UnbindDeviceFromGatewayRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeviceRequest + * @returns UnbindDeviceFromGatewayRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GetDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; /** - * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. - * @param message GetDeviceRequest + * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. + * @param message UnbindDeviceFromGatewayRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.GetDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeviceRequest to JSON. + * Converts this UnbindDeviceFromGatewayRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateDeviceRequest. */ - interface IUpdateDeviceRequest { - - /** UpdateDeviceRequest device */ - device?: (google.cloud.iot.v1.IDevice|null); - - /** UpdateDeviceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of an UnbindDeviceFromGatewayResponse. */ + interface IUnbindDeviceFromGatewayResponse { } - /** Represents an UpdateDeviceRequest. */ - class UpdateDeviceRequest implements IUpdateDeviceRequest { + /** Represents an UnbindDeviceFromGatewayResponse. */ + class UnbindDeviceFromGatewayResponse implements IUnbindDeviceFromGatewayResponse { /** - * Constructs a new UpdateDeviceRequest. + * Constructs a new UnbindDeviceFromGatewayResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUpdateDeviceRequest); - - /** UpdateDeviceRequest device. */ - public device?: (google.cloud.iot.v1.IDevice|null); - - /** UpdateDeviceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse); /** - * Creates a new UpdateDeviceRequest instance using the specified properties. + * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDeviceRequest instance + * @returns UnbindDeviceFromGatewayResponse instance */ - public static create(properties?: google.cloud.iot.v1.IUpdateDeviceRequest): google.cloud.iot.v1.UpdateDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; /** - * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. - * @param message UpdateDeviceRequest message or plain object to encode + * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @param message UnbindDeviceFromGatewayResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. - * @param message UpdateDeviceRequest message or plain object to encode + * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * @param message UnbindDeviceFromGatewayResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUpdateDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateDeviceRequest + * @returns UnbindDeviceFromGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UpdateDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDeviceRequest + * @returns UnbindDeviceFromGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UpdateDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; /** - * Verifies an UpdateDeviceRequest message. + * Verifies an UnbindDeviceFromGatewayResponse message. * @param message Plain 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 UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDeviceRequest + * @returns UnbindDeviceFromGatewayResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UpdateDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; /** - * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. - * @param message UpdateDeviceRequest + * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. + * @param message UnbindDeviceFromGatewayResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.UpdateDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDeviceRequest to JSON. + * Converts this UnbindDeviceFromGatewayResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDeviceRequest. */ - interface IDeleteDeviceRequest { + /** Properties of a Device. */ + interface IDevice { - /** DeleteDeviceRequest name */ + /** Device id */ + id?: (string|null); + + /** Device name */ name?: (string|null); - } - /** Represents a DeleteDeviceRequest. */ - class DeleteDeviceRequest implements IDeleteDeviceRequest { + /** Device numId */ + numId?: (number|Long|string|null); - /** - * Constructs a new DeleteDeviceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.iot.v1.IDeleteDeviceRequest); + /** Device credentials */ + credentials?: (google.cloud.iot.v1.IDeviceCredential[]|null); - /** DeleteDeviceRequest name. */ - public name: string; + /** Device lastHeartbeatTime */ + lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a new DeleteDeviceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDeviceRequest instance - */ - public static create(properties?: google.cloud.iot.v1.IDeleteDeviceRequest): google.cloud.iot.v1.DeleteDeviceRequest; + /** Device lastEventTime */ + lastEventTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. - * @param message DeleteDeviceRequest message or plain object to encode + /** Device lastStateTime */ + lastStateTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigAckTime */ + lastConfigAckTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigSendTime */ + lastConfigSendTime?: (google.protobuf.ITimestamp|null); + + /** Device blocked */ + blocked?: (boolean|null); + + /** Device lastErrorTime */ + lastErrorTime?: (google.protobuf.ITimestamp|null); + + /** Device lastErrorStatus */ + lastErrorStatus?: (google.rpc.IStatus|null); + + /** Device config */ + config?: (google.cloud.iot.v1.IDeviceConfig|null); + + /** Device state */ + state?: (google.cloud.iot.v1.IDeviceState|null); + + /** Device logLevel */ + logLevel?: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel|null); + + /** Device metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Device gatewayConfig */ + gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + } + + /** Represents a Device. */ + class Device implements IDevice { + + /** + * Constructs a new Device. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iot.v1.IDevice); + + /** Device id. */ + public id: string; + + /** Device name. */ + public name: string; + + /** Device numId. */ + public numId: (number|Long|string); + + /** Device credentials. */ + public credentials: google.cloud.iot.v1.IDeviceCredential[]; + + /** Device lastHeartbeatTime. */ + public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); + + /** Device lastEventTime. */ + public lastEventTime?: (google.protobuf.ITimestamp|null); + + /** Device lastStateTime. */ + public lastStateTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigAckTime. */ + public lastConfigAckTime?: (google.protobuf.ITimestamp|null); + + /** Device lastConfigSendTime. */ + public lastConfigSendTime?: (google.protobuf.ITimestamp|null); + + /** Device blocked. */ + public blocked: boolean; + + /** Device lastErrorTime. */ + public lastErrorTime?: (google.protobuf.ITimestamp|null); + + /** Device lastErrorStatus. */ + public lastErrorStatus?: (google.rpc.IStatus|null); + + /** Device config. */ + public config?: (google.cloud.iot.v1.IDeviceConfig|null); + + /** Device state. */ + public state?: (google.cloud.iot.v1.IDeviceState|null); + + /** Device logLevel. */ + public logLevel: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel); + + /** Device metadata. */ + public metadata: { [k: string]: string }; + + /** Device gatewayConfig. */ + public gatewayConfig?: (google.cloud.iot.v1.IGatewayConfig|null); + + /** + * Creates a new Device instance using the specified properties. + * @param [properties] Properties to set + * @returns Device instance + */ + public static create(properties?: google.cloud.iot.v1.IDevice): google.cloud.iot.v1.Device; + + /** + * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @param message Device message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. - * @param message DeleteDeviceRequest message or plain object to encode + * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. + * @param message Device message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IDeleteDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDevice, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer. + * Decodes a Device message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDeviceRequest + * @returns Device * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeleteDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.Device; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a Device message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDeviceRequest + * @returns Device * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeleteDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.Device; /** - * Verifies a DeleteDeviceRequest message. + * Verifies a Device message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Device message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDeviceRequest + * @returns Device */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeleteDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.Device; /** - * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. - * @param message DeleteDeviceRequest + * Creates a plain object from a Device message. Also converts values to other types if specified. + * @param message Device * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.DeleteDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.Device, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDeviceRequest to JSON. + * Converts this Device to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDevicesRequest. */ - interface IListDevicesRequest { - - /** ListDevicesRequest parent */ - parent?: (string|null); - - /** ListDevicesRequest deviceNumIds */ - deviceNumIds?: ((number|Long|string)[]|null); - - /** ListDevicesRequest deviceIds */ - deviceIds?: (string[]|null); + /** Properties of a GatewayConfig. */ + interface IGatewayConfig { - /** ListDevicesRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** GatewayConfig gatewayType */ + gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); - /** ListDevicesRequest gatewayListOptions */ - gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + /** GatewayConfig gatewayAuthMethod */ + gatewayAuthMethod?: (google.cloud.iot.v1.GatewayAuthMethod|keyof typeof google.cloud.iot.v1.GatewayAuthMethod|null); - /** ListDevicesRequest pageSize */ - pageSize?: (number|null); + /** GatewayConfig lastAccessedGatewayId */ + lastAccessedGatewayId?: (string|null); - /** ListDevicesRequest pageToken */ - pageToken?: (string|null); + /** GatewayConfig lastAccessedGatewayTime */ + lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListDevicesRequest. */ - class ListDevicesRequest implements IListDevicesRequest { + /** Represents a GatewayConfig. */ + class GatewayConfig implements IGatewayConfig { /** - * Constructs a new ListDevicesRequest. + * Constructs a new GatewayConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDevicesRequest); - - /** ListDevicesRequest parent. */ - public parent: string; - - /** ListDevicesRequest deviceNumIds. */ - public deviceNumIds: (number|Long|string)[]; - - /** ListDevicesRequest deviceIds. */ - public deviceIds: string[]; + constructor(properties?: google.cloud.iot.v1.IGatewayConfig); - /** ListDevicesRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** GatewayConfig gatewayType. */ + public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); - /** ListDevicesRequest gatewayListOptions. */ - public gatewayListOptions?: (google.cloud.iot.v1.IGatewayListOptions|null); + /** GatewayConfig gatewayAuthMethod. */ + public gatewayAuthMethod: (google.cloud.iot.v1.GatewayAuthMethod|keyof typeof google.cloud.iot.v1.GatewayAuthMethod); - /** ListDevicesRequest pageSize. */ - public pageSize: number; + /** GatewayConfig lastAccessedGatewayId. */ + public lastAccessedGatewayId: string; - /** ListDevicesRequest pageToken. */ - public pageToken: string; + /** GatewayConfig lastAccessedGatewayTime. */ + public lastAccessedGatewayTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListDevicesRequest instance using the specified properties. + * Creates a new GatewayConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListDevicesRequest instance + * @returns GatewayConfig instance */ - public static create(properties?: google.cloud.iot.v1.IListDevicesRequest): google.cloud.iot.v1.ListDevicesRequest; + public static create(properties?: google.cloud.iot.v1.IGatewayConfig): google.cloud.iot.v1.GatewayConfig; /** - * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. - * @param message ListDevicesRequest message or plain object to encode + * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @param message GatewayConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. - * @param message ListDevicesRequest message or plain object to encode + * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. + * @param message GatewayConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IGatewayConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer. + * Decodes a GatewayConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDevicesRequest + * @returns GatewayConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayConfig; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. + * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDevicesRequest + * @returns GatewayConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayConfig; /** - * Verifies a ListDevicesRequest message. + * Verifies a GatewayConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDevicesRequest + * @returns GatewayConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayConfig; /** - * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. - * @param message ListDevicesRequest + * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. + * @param message GatewayConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDevicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.GatewayConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDevicesRequest to JSON. + * Converts this GatewayConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GatewayListOptions. */ - interface IGatewayListOptions { + /** Properties of a DeviceRegistry. */ + interface IDeviceRegistry { - /** GatewayListOptions gatewayType */ - gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); + /** DeviceRegistry id */ + id?: (string|null); - /** GatewayListOptions associationsGatewayId */ - associationsGatewayId?: (string|null); + /** DeviceRegistry name */ + name?: (string|null); - /** GatewayListOptions associationsDeviceId */ - associationsDeviceId?: (string|null); + /** DeviceRegistry eventNotificationConfigs */ + eventNotificationConfigs?: (google.cloud.iot.v1.IEventNotificationConfig[]|null); + + /** DeviceRegistry stateNotificationConfig */ + stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + + /** DeviceRegistry mqttConfig */ + mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + + /** DeviceRegistry httpConfig */ + httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + + /** DeviceRegistry logLevel */ + logLevel?: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel|null); + + /** DeviceRegistry credentials */ + credentials?: (google.cloud.iot.v1.IRegistryCredential[]|null); } - /** Represents a GatewayListOptions. */ - class GatewayListOptions implements IGatewayListOptions { + /** Represents a DeviceRegistry. */ + class DeviceRegistry implements IDeviceRegistry { /** - * Constructs a new GatewayListOptions. + * Constructs a new DeviceRegistry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); + constructor(properties?: google.cloud.iot.v1.IDeviceRegistry); - /** GatewayListOptions gatewayType. */ - public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); + /** DeviceRegistry id. */ + public id: string; - /** GatewayListOptions associationsGatewayId. */ - public associationsGatewayId: string; + /** DeviceRegistry name. */ + public name: string; - /** GatewayListOptions associationsDeviceId. */ - public associationsDeviceId: string; + /** DeviceRegistry eventNotificationConfigs. */ + public eventNotificationConfigs: google.cloud.iot.v1.IEventNotificationConfig[]; - /** GatewayListOptions filter. */ - public filter?: ("gatewayType"|"associationsGatewayId"|"associationsDeviceId"); + /** DeviceRegistry stateNotificationConfig. */ + public stateNotificationConfig?: (google.cloud.iot.v1.IStateNotificationConfig|null); + + /** DeviceRegistry mqttConfig. */ + public mqttConfig?: (google.cloud.iot.v1.IMqttConfig|null); + + /** DeviceRegistry httpConfig. */ + public httpConfig?: (google.cloud.iot.v1.IHttpConfig|null); + + /** DeviceRegistry logLevel. */ + public logLevel: (google.cloud.iot.v1.LogLevel|keyof typeof google.cloud.iot.v1.LogLevel); + + /** DeviceRegistry credentials. */ + public credentials: google.cloud.iot.v1.IRegistryCredential[]; /** - * Creates a new GatewayListOptions instance using the specified properties. + * Creates a new DeviceRegistry instance using the specified properties. * @param [properties] Properties to set - * @returns GatewayListOptions instance + * @returns DeviceRegistry instance */ - public static create(properties?: google.cloud.iot.v1.IGatewayListOptions): google.cloud.iot.v1.GatewayListOptions; + public static create(properties?: google.cloud.iot.v1.IDeviceRegistry): google.cloud.iot.v1.DeviceRegistry; /** - * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. - * @param message GatewayListOptions message or plain object to encode + * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @param message DeviceRegistry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. - * @param message GatewayListOptions message or plain object to encode + * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. + * @param message DeviceRegistry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IGatewayListOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceRegistry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GatewayListOptions message from the specified reader or buffer. + * Decodes a DeviceRegistry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GatewayListOptions + * @returns DeviceRegistry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.GatewayListOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceRegistry; /** - * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. + * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GatewayListOptions + * @returns DeviceRegistry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.GatewayListOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceRegistry; /** - * Verifies a GatewayListOptions message. + * Verifies a DeviceRegistry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GatewayListOptions + * @returns DeviceRegistry */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.GatewayListOptions; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceRegistry; /** - * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. - * @param message GatewayListOptions + * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. + * @param message DeviceRegistry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.GatewayListOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeviceRegistry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GatewayListOptions to JSON. + * Converts this DeviceRegistry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDevicesResponse. */ - interface IListDevicesResponse { - - /** ListDevicesResponse devices */ - devices?: (google.cloud.iot.v1.IDevice[]|null); + /** Properties of a MqttConfig. */ + interface IMqttConfig { - /** ListDevicesResponse nextPageToken */ - nextPageToken?: (string|null); + /** MqttConfig mqttEnabledState */ + mqttEnabledState?: (google.cloud.iot.v1.MqttState|keyof typeof google.cloud.iot.v1.MqttState|null); } - /** Represents a ListDevicesResponse. */ - class ListDevicesResponse implements IListDevicesResponse { + /** Represents a MqttConfig. */ + class MqttConfig implements IMqttConfig { /** - * Constructs a new ListDevicesResponse. + * Constructs a new MqttConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDevicesResponse); - - /** ListDevicesResponse devices. */ - public devices: google.cloud.iot.v1.IDevice[]; + constructor(properties?: google.cloud.iot.v1.IMqttConfig); - /** ListDevicesResponse nextPageToken. */ - public nextPageToken: string; + /** MqttConfig mqttEnabledState. */ + public mqttEnabledState: (google.cloud.iot.v1.MqttState|keyof typeof google.cloud.iot.v1.MqttState); /** - * Creates a new ListDevicesResponse instance using the specified properties. + * Creates a new MqttConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListDevicesResponse instance + * @returns MqttConfig instance */ - public static create(properties?: google.cloud.iot.v1.IListDevicesResponse): google.cloud.iot.v1.ListDevicesResponse; + public static create(properties?: google.cloud.iot.v1.IMqttConfig): google.cloud.iot.v1.MqttConfig; /** - * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. - * @param message ListDevicesResponse message or plain object to encode + * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @param message MqttConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. - * @param message ListDevicesResponse message or plain object to encode + * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * @param message MqttConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IMqttConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer. + * Decodes a MqttConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDevicesResponse + * @returns MqttConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDevicesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.MqttConfig; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. + * Decodes a MqttConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDevicesResponse + * @returns MqttConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDevicesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.MqttConfig; /** - * Verifies a ListDevicesResponse message. + * Verifies a MqttConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDevicesResponse + * @returns MqttConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDevicesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.MqttConfig; /** - * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. - * @param message ListDevicesResponse + * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. + * @param message MqttConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDevicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.MqttConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDevicesResponse to JSON. + * Converts this MqttConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ModifyCloudToDeviceConfigRequest. */ - interface IModifyCloudToDeviceConfigRequest { - - /** ModifyCloudToDeviceConfigRequest name */ - name?: (string|null); + /** MqttState enum. */ + enum MqttState { + MQTT_STATE_UNSPECIFIED = 0, + MQTT_ENABLED = 1, + MQTT_DISABLED = 2 + } - /** ModifyCloudToDeviceConfigRequest versionToUpdate */ - versionToUpdate?: (number|Long|string|null); + /** Properties of a HttpConfig. */ + interface IHttpConfig { - /** ModifyCloudToDeviceConfigRequest binaryData */ - binaryData?: (Uint8Array|string|null); + /** HttpConfig httpEnabledState */ + httpEnabledState?: (google.cloud.iot.v1.HttpState|keyof typeof google.cloud.iot.v1.HttpState|null); } - /** Represents a ModifyCloudToDeviceConfigRequest. */ - class ModifyCloudToDeviceConfigRequest implements IModifyCloudToDeviceConfigRequest { + /** Represents a HttpConfig. */ + class HttpConfig implements IHttpConfig { /** - * Constructs a new ModifyCloudToDeviceConfigRequest. + * Constructs a new HttpConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest); - - /** ModifyCloudToDeviceConfigRequest name. */ - public name: string; - - /** ModifyCloudToDeviceConfigRequest versionToUpdate. */ - public versionToUpdate: (number|Long|string); + constructor(properties?: google.cloud.iot.v1.IHttpConfig); - /** ModifyCloudToDeviceConfigRequest binaryData. */ - public binaryData: (Uint8Array|string); + /** HttpConfig httpEnabledState. */ + public httpEnabledState: (google.cloud.iot.v1.HttpState|keyof typeof google.cloud.iot.v1.HttpState); /** - * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. + * Creates a new HttpConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ModifyCloudToDeviceConfigRequest instance + * @returns HttpConfig instance */ - public static create(properties?: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public static create(properties?: google.cloud.iot.v1.IHttpConfig): google.cloud.iot.v1.HttpConfig; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. - * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode + * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @param message HttpConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. - * @param message ModifyCloudToDeviceConfigRequest message or plain object to encode + * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * @param message HttpConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IHttpConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. + * Decodes a HttpConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ModifyCloudToDeviceConfigRequest + * @returns HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.HttpConfig; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ModifyCloudToDeviceConfigRequest + * @returns HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.HttpConfig; /** - * Verifies a ModifyCloudToDeviceConfigRequest message. + * Verifies a HttpConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ModifyCloudToDeviceConfigRequest + * @returns HttpConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.HttpConfig; /** - * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. - * @param message ModifyCloudToDeviceConfigRequest + * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. + * @param message HttpConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.HttpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ModifyCloudToDeviceConfigRequest to JSON. + * Converts this HttpConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceConfigVersionsRequest. */ - interface IListDeviceConfigVersionsRequest { + /** HttpState enum. */ + enum HttpState { + HTTP_STATE_UNSPECIFIED = 0, + HTTP_ENABLED = 1, + HTTP_DISABLED = 2 + } - /** ListDeviceConfigVersionsRequest name */ - name?: (string|null); + /** LogLevel enum. */ + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0, + NONE = 10, + ERROR = 20, + INFO = 30, + DEBUG = 40 + } - /** ListDeviceConfigVersionsRequest numVersions */ - numVersions?: (number|null); + /** GatewayType enum. */ + enum GatewayType { + GATEWAY_TYPE_UNSPECIFIED = 0, + GATEWAY = 1, + NON_GATEWAY = 2 } - /** Represents a ListDeviceConfigVersionsRequest. */ - class ListDeviceConfigVersionsRequest implements IListDeviceConfigVersionsRequest { + /** GatewayAuthMethod enum. */ + enum GatewayAuthMethod { + GATEWAY_AUTH_METHOD_UNSPECIFIED = 0, + ASSOCIATION_ONLY = 1, + DEVICE_AUTH_TOKEN_ONLY = 2, + ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3 + } + + /** Properties of an EventNotificationConfig. */ + interface IEventNotificationConfig { + + /** EventNotificationConfig subfolderMatches */ + subfolderMatches?: (string|null); + + /** EventNotificationConfig pubsubTopicName */ + pubsubTopicName?: (string|null); + } + + /** Represents an EventNotificationConfig. */ + class EventNotificationConfig implements IEventNotificationConfig { /** - * Constructs a new ListDeviceConfigVersionsRequest. + * Constructs a new EventNotificationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest); + constructor(properties?: google.cloud.iot.v1.IEventNotificationConfig); - /** ListDeviceConfigVersionsRequest name. */ - public name: string; + /** EventNotificationConfig subfolderMatches. */ + public subfolderMatches: string; - /** ListDeviceConfigVersionsRequest numVersions. */ - public numVersions: number; + /** EventNotificationConfig pubsubTopicName. */ + public pubsubTopicName: string; /** - * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. + * Creates a new EventNotificationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceConfigVersionsRequest instance + * @returns EventNotificationConfig instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsRequest): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + public static create(properties?: google.cloud.iot.v1.IEventNotificationConfig): google.cloud.iot.v1.EventNotificationConfig; /** - * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. - * @param message ListDeviceConfigVersionsRequest message or plain object to encode + * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @param message EventNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. - * @param message ListDeviceConfigVersionsRequest message or plain object to encode + * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * @param message EventNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IEventNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. + * Decodes an EventNotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceConfigVersionsRequest + * @returns EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.EventNotificationConfig; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceConfigVersionsRequest + * @returns EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.EventNotificationConfig; /** - * Verifies a ListDeviceConfigVersionsRequest message. + * Verifies an EventNotificationConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceConfigVersionsRequest + * @returns EventNotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.EventNotificationConfig; /** - * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. - * @param message ListDeviceConfigVersionsRequest + * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. + * @param message EventNotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.EventNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceConfigVersionsRequest to JSON. + * Converts this EventNotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceConfigVersionsResponse. */ - interface IListDeviceConfigVersionsResponse { + /** Properties of a StateNotificationConfig. */ + interface IStateNotificationConfig { - /** ListDeviceConfigVersionsResponse deviceConfigs */ - deviceConfigs?: (google.cloud.iot.v1.IDeviceConfig[]|null); + /** StateNotificationConfig pubsubTopicName */ + pubsubTopicName?: (string|null); } - /** Represents a ListDeviceConfigVersionsResponse. */ - class ListDeviceConfigVersionsResponse implements IListDeviceConfigVersionsResponse { + /** Represents a StateNotificationConfig. */ + class StateNotificationConfig implements IStateNotificationConfig { /** - * Constructs a new ListDeviceConfigVersionsResponse. + * Constructs a new StateNotificationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse); + constructor(properties?: google.cloud.iot.v1.IStateNotificationConfig); - /** ListDeviceConfigVersionsResponse deviceConfigs. */ - public deviceConfigs: google.cloud.iot.v1.IDeviceConfig[]; + /** StateNotificationConfig pubsubTopicName. */ + public pubsubTopicName: string; /** - * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. + * Creates a new StateNotificationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceConfigVersionsResponse instance + * @returns StateNotificationConfig instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceConfigVersionsResponse): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + public static create(properties?: google.cloud.iot.v1.IStateNotificationConfig): google.cloud.iot.v1.StateNotificationConfig; /** - * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. - * @param message ListDeviceConfigVersionsResponse message or plain object to encode + * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @param message StateNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. - * @param message ListDeviceConfigVersionsResponse message or plain object to encode + * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * @param message StateNotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceConfigVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IStateNotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. + * Decodes a StateNotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceConfigVersionsResponse + * @returns StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.StateNotificationConfig; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceConfigVersionsResponse + * @returns StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.StateNotificationConfig; /** - * Verifies a ListDeviceConfigVersionsResponse message. + * Verifies a StateNotificationConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceConfigVersionsResponse + * @returns StateNotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceConfigVersionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.StateNotificationConfig; /** - * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. - * @param message ListDeviceConfigVersionsResponse + * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. + * @param message StateNotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceConfigVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.StateNotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceConfigVersionsResponse to JSON. + * Converts this StateNotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceStatesRequest. */ - interface IListDeviceStatesRequest { - - /** ListDeviceStatesRequest name */ - name?: (string|null); + /** Properties of a RegistryCredential. */ + interface IRegistryCredential { - /** ListDeviceStatesRequest numStates */ - numStates?: (number|null); + /** RegistryCredential publicKeyCertificate */ + publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); } - /** Represents a ListDeviceStatesRequest. */ - class ListDeviceStatesRequest implements IListDeviceStatesRequest { + /** Represents a RegistryCredential. */ + class RegistryCredential implements IRegistryCredential { /** - * Constructs a new ListDeviceStatesRequest. + * Constructs a new RegistryCredential. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceStatesRequest); + constructor(properties?: google.cloud.iot.v1.IRegistryCredential); - /** ListDeviceStatesRequest name. */ - public name: string; + /** RegistryCredential publicKeyCertificate. */ + public publicKeyCertificate?: (google.cloud.iot.v1.IPublicKeyCertificate|null); - /** ListDeviceStatesRequest numStates. */ - public numStates: number; + /** RegistryCredential credential. */ + public credential?: "publicKeyCertificate"; /** - * Creates a new ListDeviceStatesRequest instance using the specified properties. + * Creates a new RegistryCredential instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceStatesRequest instance + * @returns RegistryCredential instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceStatesRequest): google.cloud.iot.v1.ListDeviceStatesRequest; + public static create(properties?: google.cloud.iot.v1.IRegistryCredential): google.cloud.iot.v1.RegistryCredential; /** - * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. - * @param message ListDeviceStatesRequest message or plain object to encode + * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @param message RegistryCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. - * @param message ListDeviceStatesRequest message or plain object to encode + * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * @param message RegistryCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IRegistryCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. + * Decodes a RegistryCredential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceStatesRequest + * @returns RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.RegistryCredential; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. + * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceStatesRequest + * @returns RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.RegistryCredential; /** - * Verifies a ListDeviceStatesRequest message. + * Verifies a RegistryCredential message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceStatesRequest + * @returns RegistryCredential */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.RegistryCredential; /** - * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. - * @param message ListDeviceStatesRequest + * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. + * @param message RegistryCredential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.RegistryCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceStatesRequest to JSON. + * Converts this RegistryCredential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDeviceStatesResponse. */ - interface IListDeviceStatesResponse { - - /** ListDeviceStatesResponse deviceStates */ - deviceStates?: (google.cloud.iot.v1.IDeviceState[]|null); - } + /** Properties of a X509CertificateDetails. */ + interface IX509CertificateDetails { - /** Represents a ListDeviceStatesResponse. */ - class ListDeviceStatesResponse implements IListDeviceStatesResponse { + /** X509CertificateDetails issuer */ + issuer?: (string|null); + + /** X509CertificateDetails subject */ + subject?: (string|null); + + /** X509CertificateDetails startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails expiryTime */ + expiryTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails signatureAlgorithm */ + signatureAlgorithm?: (string|null); + + /** X509CertificateDetails publicKeyType */ + publicKeyType?: (string|null); + } + + /** Represents a X509CertificateDetails. */ + class X509CertificateDetails implements IX509CertificateDetails { /** - * Constructs a new ListDeviceStatesResponse. + * Constructs a new X509CertificateDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IListDeviceStatesResponse); + constructor(properties?: google.cloud.iot.v1.IX509CertificateDetails); - /** ListDeviceStatesResponse deviceStates. */ - public deviceStates: google.cloud.iot.v1.IDeviceState[]; + /** X509CertificateDetails issuer. */ + public issuer: string; + + /** X509CertificateDetails subject. */ + public subject: string; + + /** X509CertificateDetails startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails expiryTime. */ + public expiryTime?: (google.protobuf.ITimestamp|null); + + /** X509CertificateDetails signatureAlgorithm. */ + public signatureAlgorithm: string; + + /** X509CertificateDetails publicKeyType. */ + public publicKeyType: string; /** - * Creates a new ListDeviceStatesResponse instance using the specified properties. + * Creates a new X509CertificateDetails instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceStatesResponse instance + * @returns X509CertificateDetails instance */ - public static create(properties?: google.cloud.iot.v1.IListDeviceStatesResponse): google.cloud.iot.v1.ListDeviceStatesResponse; + public static create(properties?: google.cloud.iot.v1.IX509CertificateDetails): google.cloud.iot.v1.X509CertificateDetails; /** - * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. - * @param message ListDeviceStatesResponse message or plain object to encode + * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @param message X509CertificateDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. - * @param message ListDeviceStatesResponse message or plain object to encode + * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * @param message X509CertificateDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IListDeviceStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IX509CertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. + * Decodes a X509CertificateDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceStatesResponse + * @returns X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.ListDeviceStatesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.X509CertificateDetails; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. + * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceStatesResponse + * @returns X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.ListDeviceStatesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.X509CertificateDetails; /** - * Verifies a ListDeviceStatesResponse message. + * Verifies a X509CertificateDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceStatesResponse + * @returns X509CertificateDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.ListDeviceStatesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.X509CertificateDetails; /** - * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. - * @param message ListDeviceStatesResponse + * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. + * @param message X509CertificateDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.ListDeviceStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.X509CertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceStatesResponse to JSON. + * Converts this X509CertificateDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SendCommandToDeviceRequest. */ - interface ISendCommandToDeviceRequest { + /** Properties of a PublicKeyCertificate. */ + interface IPublicKeyCertificate { - /** SendCommandToDeviceRequest name */ - name?: (string|null); + /** PublicKeyCertificate format */ + format?: (google.cloud.iot.v1.PublicKeyCertificateFormat|keyof typeof google.cloud.iot.v1.PublicKeyCertificateFormat|null); - /** SendCommandToDeviceRequest binaryData */ - binaryData?: (Uint8Array|string|null); + /** PublicKeyCertificate certificate */ + certificate?: (string|null); - /** SendCommandToDeviceRequest subfolder */ - subfolder?: (string|null); + /** PublicKeyCertificate x509Details */ + x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); } - /** Represents a SendCommandToDeviceRequest. */ - class SendCommandToDeviceRequest implements ISendCommandToDeviceRequest { + /** Represents a PublicKeyCertificate. */ + class PublicKeyCertificate implements IPublicKeyCertificate { /** - * Constructs a new SendCommandToDeviceRequest. + * Constructs a new PublicKeyCertificate. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest); + constructor(properties?: google.cloud.iot.v1.IPublicKeyCertificate); - /** SendCommandToDeviceRequest name. */ - public name: string; + /** PublicKeyCertificate format. */ + public format: (google.cloud.iot.v1.PublicKeyCertificateFormat|keyof typeof google.cloud.iot.v1.PublicKeyCertificateFormat); - /** SendCommandToDeviceRequest binaryData. */ - public binaryData: (Uint8Array|string); + /** PublicKeyCertificate certificate. */ + public certificate: string; - /** SendCommandToDeviceRequest subfolder. */ - public subfolder: string; + /** PublicKeyCertificate x509Details. */ + public x509Details?: (google.cloud.iot.v1.IX509CertificateDetails|null); /** - * Creates a new SendCommandToDeviceRequest instance using the specified properties. + * Creates a new PublicKeyCertificate instance using the specified properties. * @param [properties] Properties to set - * @returns SendCommandToDeviceRequest instance + * @returns PublicKeyCertificate instance */ - public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceRequest): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static create(properties?: google.cloud.iot.v1.IPublicKeyCertificate): google.cloud.iot.v1.PublicKeyCertificate; /** - * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. - * @param message SendCommandToDeviceRequest message or plain object to encode + * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @param message PublicKeyCertificate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. - * @param message SendCommandToDeviceRequest message or plain object to encode + * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * @param message PublicKeyCertificate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCertificate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. + * Decodes a PublicKeyCertificate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SendCommandToDeviceRequest + * @returns PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCertificate; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SendCommandToDeviceRequest + * @returns PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCertificate; /** - * Verifies a SendCommandToDeviceRequest message. + * Verifies a PublicKeyCertificate message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SendCommandToDeviceRequest + * @returns PublicKeyCertificate */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCertificate; /** - * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. - * @param message SendCommandToDeviceRequest + * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. + * @param message PublicKeyCertificate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.PublicKeyCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SendCommandToDeviceRequest to JSON. + * Converts this PublicKeyCertificate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SendCommandToDeviceResponse. */ - interface ISendCommandToDeviceResponse { + /** PublicKeyCertificateFormat enum. */ + enum PublicKeyCertificateFormat { + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0, + X509_CERTIFICATE_PEM = 1 } - /** Represents a SendCommandToDeviceResponse. */ - class SendCommandToDeviceResponse implements ISendCommandToDeviceResponse { + /** Properties of a DeviceCredential. */ + interface IDeviceCredential { + + /** DeviceCredential publicKey */ + publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + + /** DeviceCredential expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeviceCredential. */ + class DeviceCredential implements IDeviceCredential { /** - * Constructs a new SendCommandToDeviceResponse. + * Constructs a new DeviceCredential. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse); + constructor(properties?: google.cloud.iot.v1.IDeviceCredential); + + /** DeviceCredential publicKey. */ + public publicKey?: (google.cloud.iot.v1.IPublicKeyCredential|null); + + /** DeviceCredential expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** DeviceCredential credential. */ + public credential?: "publicKey"; /** - * Creates a new SendCommandToDeviceResponse instance using the specified properties. + * Creates a new DeviceCredential instance using the specified properties. * @param [properties] Properties to set - * @returns SendCommandToDeviceResponse instance + * @returns DeviceCredential instance */ - public static create(properties?: google.cloud.iot.v1.ISendCommandToDeviceResponse): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static create(properties?: google.cloud.iot.v1.IDeviceCredential): google.cloud.iot.v1.DeviceCredential; /** - * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. - * @param message SendCommandToDeviceResponse message or plain object to encode + * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @param message DeviceCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. - * @param message SendCommandToDeviceResponse message or plain object to encode + * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * @param message DeviceCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.ISendCommandToDeviceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. + * Decodes a DeviceCredential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SendCommandToDeviceResponse + * @returns DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceCredential; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. + * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SendCommandToDeviceResponse + * @returns DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceCredential; /** - * Verifies a SendCommandToDeviceResponse message. + * Verifies a DeviceCredential message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SendCommandToDeviceResponse + * @returns DeviceCredential */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.SendCommandToDeviceResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceCredential; /** - * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. - * @param message SendCommandToDeviceResponse + * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. + * @param message DeviceCredential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.SendCommandToDeviceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeviceCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SendCommandToDeviceResponse to JSON. + * Converts this DeviceCredential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BindDeviceToGatewayRequest. */ - interface IBindDeviceToGatewayRequest { - - /** BindDeviceToGatewayRequest parent */ - parent?: (string|null); + /** Properties of a PublicKeyCredential. */ + interface IPublicKeyCredential { - /** BindDeviceToGatewayRequest gatewayId */ - gatewayId?: (string|null); + /** PublicKeyCredential format */ + format?: (google.cloud.iot.v1.PublicKeyFormat|keyof typeof google.cloud.iot.v1.PublicKeyFormat|null); - /** BindDeviceToGatewayRequest deviceId */ - deviceId?: (string|null); + /** PublicKeyCredential key */ + key?: (string|null); } - /** Represents a BindDeviceToGatewayRequest. */ - class BindDeviceToGatewayRequest implements IBindDeviceToGatewayRequest { + /** Represents a PublicKeyCredential. */ + class PublicKeyCredential implements IPublicKeyCredential { /** - * Constructs a new BindDeviceToGatewayRequest. + * Constructs a new PublicKeyCredential. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest); - - /** BindDeviceToGatewayRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.iot.v1.IPublicKeyCredential); - /** BindDeviceToGatewayRequest gatewayId. */ - public gatewayId: string; + /** PublicKeyCredential format. */ + public format: (google.cloud.iot.v1.PublicKeyFormat|keyof typeof google.cloud.iot.v1.PublicKeyFormat); - /** BindDeviceToGatewayRequest deviceId. */ - public deviceId: string; + /** PublicKeyCredential key. */ + public key: string; /** - * Creates a new BindDeviceToGatewayRequest instance using the specified properties. + * Creates a new PublicKeyCredential instance using the specified properties. * @param [properties] Properties to set - * @returns BindDeviceToGatewayRequest instance + * @returns PublicKeyCredential instance */ - public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayRequest): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static create(properties?: google.cloud.iot.v1.IPublicKeyCredential): google.cloud.iot.v1.PublicKeyCredential; /** - * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. - * @param message BindDeviceToGatewayRequest message or plain object to encode + * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @param message PublicKeyCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. - * @param message BindDeviceToGatewayRequest message or plain object to encode + * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * @param message PublicKeyCredential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IPublicKeyCredential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. + * Decodes a PublicKeyCredential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BindDeviceToGatewayRequest + * @returns PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.PublicKeyCredential; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BindDeviceToGatewayRequest + * @returns PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.PublicKeyCredential; /** - * Verifies a BindDeviceToGatewayRequest message. + * Verifies a PublicKeyCredential message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BindDeviceToGatewayRequest + * @returns PublicKeyCredential */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.PublicKeyCredential; /** - * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. - * @param message BindDeviceToGatewayRequest + * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. + * @param message PublicKeyCredential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.PublicKeyCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BindDeviceToGatewayRequest to JSON. + * Converts this PublicKeyCredential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BindDeviceToGatewayResponse. */ - interface IBindDeviceToGatewayResponse { + /** PublicKeyFormat enum. */ + enum PublicKeyFormat { + UNSPECIFIED_PUBLIC_KEY_FORMAT = 0, + RSA_PEM = 3, + RSA_X509_PEM = 1, + ES256_PEM = 2, + ES256_X509_PEM = 4 } - /** Represents a BindDeviceToGatewayResponse. */ - class BindDeviceToGatewayResponse implements IBindDeviceToGatewayResponse { + /** Properties of a DeviceConfig. */ + interface IDeviceConfig { + + /** DeviceConfig version */ + version?: (number|Long|string|null); + + /** DeviceConfig cloudUpdateTime */ + cloudUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig deviceAckTime */ + deviceAckTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig binaryData */ + binaryData?: (Uint8Array|string|null); + } + + /** Represents a DeviceConfig. */ + class DeviceConfig implements IDeviceConfig { /** - * Constructs a new BindDeviceToGatewayResponse. + * Constructs a new DeviceConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse); + constructor(properties?: google.cloud.iot.v1.IDeviceConfig); + + /** DeviceConfig version. */ + public version: (number|Long|string); + + /** DeviceConfig cloudUpdateTime. */ + public cloudUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig deviceAckTime. */ + public deviceAckTime?: (google.protobuf.ITimestamp|null); + + /** DeviceConfig binaryData. */ + public binaryData: (Uint8Array|string); /** - * Creates a new BindDeviceToGatewayResponse instance using the specified properties. + * Creates a new DeviceConfig instance using the specified properties. * @param [properties] Properties to set - * @returns BindDeviceToGatewayResponse instance + * @returns DeviceConfig instance */ - public static create(properties?: google.cloud.iot.v1.IBindDeviceToGatewayResponse): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static create(properties?: google.cloud.iot.v1.IDeviceConfig): google.cloud.iot.v1.DeviceConfig; /** - * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. - * @param message BindDeviceToGatewayResponse message or plain object to encode + * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @param message DeviceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. - * @param message BindDeviceToGatewayResponse message or plain object to encode + * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * @param message DeviceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IBindDeviceToGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. + * Decodes a DeviceConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BindDeviceToGatewayResponse + * @returns DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceConfig; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BindDeviceToGatewayResponse + * @returns DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceConfig; /** - * Verifies a BindDeviceToGatewayResponse message. + * Verifies a DeviceConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BindDeviceToGatewayResponse + * @returns DeviceConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.BindDeviceToGatewayResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceConfig; /** - * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. - * @param message BindDeviceToGatewayResponse + * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. + * @param message DeviceConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iot.v1.BindDeviceToGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iot.v1.DeviceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BindDeviceToGatewayResponse to JSON. + * Converts this DeviceConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UnbindDeviceFromGatewayRequest. */ - interface IUnbindDeviceFromGatewayRequest { - - /** UnbindDeviceFromGatewayRequest parent */ - parent?: (string|null); + /** Properties of a DeviceState. */ + interface IDeviceState { - /** UnbindDeviceFromGatewayRequest gatewayId */ - gatewayId?: (string|null); + /** DeviceState updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** UnbindDeviceFromGatewayRequest deviceId */ - deviceId?: (string|null); + /** DeviceState binaryData */ + binaryData?: (Uint8Array|string|null); } - /** Represents an UnbindDeviceFromGatewayRequest. */ - class UnbindDeviceFromGatewayRequest implements IUnbindDeviceFromGatewayRequest { + /** Represents a DeviceState. */ + class DeviceState implements IDeviceState { /** - * Constructs a new UnbindDeviceFromGatewayRequest. + * Constructs a new DeviceState. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest); - - /** UnbindDeviceFromGatewayRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.iot.v1.IDeviceState); - /** UnbindDeviceFromGatewayRequest gatewayId. */ - public gatewayId: string; + /** DeviceState updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** UnbindDeviceFromGatewayRequest deviceId. */ - public deviceId: string; + /** DeviceState binaryData. */ + public binaryData: (Uint8Array|string); /** - * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. + * Creates a new DeviceState instance using the specified properties. * @param [properties] Properties to set - * @returns UnbindDeviceFromGatewayRequest instance + * @returns DeviceState instance */ - public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static create(properties?: google.cloud.iot.v1.IDeviceState): google.cloud.iot.v1.DeviceState; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. - * @param message UnbindDeviceFromGatewayRequest message or plain object to encode + * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @param message DeviceState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. - * @param message UnbindDeviceFromGatewayRequest message or plain object to encode + * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * @param message DeviceState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iot.v1.IDeviceState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. + * Decodes a DeviceState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UnbindDeviceFromGatewayRequest + * @returns DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.DeviceState; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UnbindDeviceFromGatewayRequest + * @returns DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.DeviceState; /** - * Verifies an UnbindDeviceFromGatewayRequest message. + * Verifies a DeviceState message. * @param message Plain 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 UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UnbindDeviceFromGatewayRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayRequest; - - /** - * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. - * @param message UnbindDeviceFromGatewayRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnbindDeviceFromGatewayRequest to JSON. - * @returns JSON object + * @returns DeviceState */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UnbindDeviceFromGatewayResponse. */ - interface IUnbindDeviceFromGatewayResponse { - } - - /** Represents an UnbindDeviceFromGatewayResponse. */ - class UnbindDeviceFromGatewayResponse implements IUnbindDeviceFromGatewayResponse { - - /** - * Constructs a new UnbindDeviceFromGatewayResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse); - - /** - * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UnbindDeviceFromGatewayResponse instance - */ - public static create(properties?: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; - - /** - * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. - * @param message UnbindDeviceFromGatewayResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. - * @param message UnbindDeviceFromGatewayResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnbindDeviceFromGatewayResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; - - /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnbindDeviceFromGatewayResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; - - /** - * Verifies an UnbindDeviceFromGatewayResponse message. - * @param message Plain 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 UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnbindDeviceFromGatewayResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.UnbindDeviceFromGatewayResponse; - - /** - * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. - * @param message UnbindDeviceFromGatewayResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnbindDeviceFromGatewayResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** 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 }; + public static fromObject(object: { [k: string]: any }): google.cloud.iot.v1.DeviceState; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a DeviceState message. Also converts values to other types if specified. + * @param message DeviceState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iot.v1.DeviceState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } + } + + /** Namespace api. */ + namespace api { /** Properties of a Http. */ interface IHttp { @@ -4895,6 +4669,232 @@ export namespace google { 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 }; + } } /** Namespace protobuf. */ @@ -6754,11 +6754,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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index d929e5caa54..675cb417914 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -66,1429 +66,687 @@ */ var v1 = {}; - v1.Device = (function() { - - /** - * Properties of a Device. - * @memberof google.cloud.iot.v1 - * @interface IDevice - * @property {string|null} [id] Device id - * @property {string|null} [name] Device name - * @property {number|Long|null} [numId] Device numId - * @property {Array.|null} [credentials] Device credentials - * @property {google.protobuf.ITimestamp|null} [lastHeartbeatTime] Device lastHeartbeatTime - * @property {google.protobuf.ITimestamp|null} [lastEventTime] Device lastEventTime - * @property {google.protobuf.ITimestamp|null} [lastStateTime] Device lastStateTime - * @property {google.protobuf.ITimestamp|null} [lastConfigAckTime] Device lastConfigAckTime - * @property {google.protobuf.ITimestamp|null} [lastConfigSendTime] Device lastConfigSendTime - * @property {boolean|null} [blocked] Device blocked - * @property {google.protobuf.ITimestamp|null} [lastErrorTime] Device lastErrorTime - * @property {google.rpc.IStatus|null} [lastErrorStatus] Device lastErrorStatus - * @property {google.cloud.iot.v1.IDeviceConfig|null} [config] Device config - * @property {google.cloud.iot.v1.IDeviceState|null} [state] Device state - * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] Device logLevel - * @property {Object.|null} [metadata] Device metadata - * @property {google.cloud.iot.v1.IGatewayConfig|null} [gatewayConfig] Device gatewayConfig - */ + v1.DeviceManager = (function() { /** - * Constructs a new Device. + * Constructs a new DeviceManager service. * @memberof google.cloud.iot.v1 - * @classdesc Represents a Device. - * @implements IDevice + * @classdesc Represents a DeviceManager + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.iot.v1.IDevice=} [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 Device(properties) { - this.credentials = []; - this.metadata = {}; - if (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 DeviceManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (DeviceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceManager; + /** - * Device id. - * @member {string} id - * @memberof google.cloud.iot.v1.Device - * @instance + * Creates new DeviceManager service using the specified rpc implementation. + * @function create + * @memberof google.cloud.iot.v1.DeviceManager + * @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 {DeviceManager} RPC service. Useful where requests and/or responses are streamed. */ - Device.prototype.id = ""; + DeviceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Device name. - * @member {string} name - * @memberof google.cloud.iot.v1.Device - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef CreateDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry */ - Device.prototype.name = ""; /** - * Device numId. - * @member {number|Long} numId - * @memberof google.cloud.iot.v1.Device + * Calls CreateDeviceRegistry. + * @function createDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 */ - Device.prototype.numId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Object.defineProperty(DeviceManager.prototype.createDeviceRegistry = function createDeviceRegistry(request, callback) { + return this.rpcCall(createDeviceRegistry, $root.google.cloud.iot.v1.CreateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "CreateDeviceRegistry" }); /** - * Device credentials. - * @member {Array.} credentials - * @memberof google.cloud.iot.v1.Device + * Calls CreateDeviceRegistry. + * @function createDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Device.prototype.credentials = $util.emptyArray; /** - * Device lastHeartbeatTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastHeartbeatTime - * @memberof google.cloud.iot.v1.Device - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry */ - Device.prototype.lastHeartbeatTime = null; /** - * Device lastEventTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastEventTime - * @memberof google.cloud.iot.v1.Device + * Calls GetDeviceRegistry. + * @function getDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 */ - Device.prototype.lastEventTime = null; + Object.defineProperty(DeviceManager.prototype.getDeviceRegistry = function getDeviceRegistry(request, callback) { + return this.rpcCall(getDeviceRegistry, $root.google.cloud.iot.v1.GetDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "GetDeviceRegistry" }); /** - * Device lastStateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastStateTime - * @memberof google.cloud.iot.v1.Device + * Calls GetDeviceRegistry. + * @function getDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Device.prototype.lastStateTime = null; /** - * Device lastConfigAckTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastConfigAckTime - * @memberof google.cloud.iot.v1.Device - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UpdateDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry */ - Device.prototype.lastConfigAckTime = null; /** - * Device lastConfigSendTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastConfigSendTime - * @memberof google.cloud.iot.v1.Device + * Calls UpdateDeviceRegistry. + * @function updateDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry + * @returns {undefined} + * @variation 1 */ - Device.prototype.lastConfigSendTime = null; + Object.defineProperty(DeviceManager.prototype.updateDeviceRegistry = function updateDeviceRegistry(request, callback) { + return this.rpcCall(updateDeviceRegistry, $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); + }, "name", { value: "UpdateDeviceRegistry" }); /** - * Device blocked. - * @member {boolean} blocked - * @memberof google.cloud.iot.v1.Device + * Calls UpdateDeviceRegistry. + * @function updateDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Device.prototype.blocked = false; /** - * Device lastErrorTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastErrorTime - * @memberof google.cloud.iot.v1.Device - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef DeleteDeviceRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - Device.prototype.lastErrorTime = null; /** - * Device lastErrorStatus. - * @member {google.rpc.IStatus|null|undefined} lastErrorStatus - * @memberof google.cloud.iot.v1.Device + * Calls DeleteDeviceRegistry. + * @function deleteDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - Device.prototype.lastErrorStatus = null; + Object.defineProperty(DeviceManager.prototype.deleteDeviceRegistry = function deleteDeviceRegistry(request, callback) { + return this.rpcCall(deleteDeviceRegistry, $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDeviceRegistry" }); /** - * Device config. - * @member {google.cloud.iot.v1.IDeviceConfig|null|undefined} config - * @memberof google.cloud.iot.v1.Device + * Calls DeleteDeviceRegistry. + * @function deleteDeviceRegistry + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Device.prototype.config = null; /** - * Device state. - * @member {google.cloud.iot.v1.IDeviceState|null|undefined} state - * @memberof google.cloud.iot.v1.Device - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceRegistriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} [response] ListDeviceRegistriesResponse */ - Device.prototype.state = null; /** - * Device logLevel. - * @member {google.cloud.iot.v1.LogLevel} logLevel - * @memberof google.cloud.iot.v1.Device + * Calls ListDeviceRegistries. + * @function listDeviceRegistries + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback} callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse + * @returns {undefined} + * @variation 1 */ - Device.prototype.logLevel = 0; + Object.defineProperty(DeviceManager.prototype.listDeviceRegistries = function listDeviceRegistries(request, callback) { + return this.rpcCall(listDeviceRegistries, $root.google.cloud.iot.v1.ListDeviceRegistriesRequest, $root.google.cloud.iot.v1.ListDeviceRegistriesResponse, request, callback); + }, "name", { value: "ListDeviceRegistries" }); /** - * Device metadata. - * @member {Object.} metadata - * @memberof google.cloud.iot.v1.Device + * Calls ListDeviceRegistries. + * @function listDeviceRegistries + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Device.prototype.metadata = $util.emptyObject; /** - * Device gatewayConfig. - * @member {google.cloud.iot.v1.IGatewayConfig|null|undefined} gatewayConfig - * @memberof google.cloud.iot.v1.Device - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef CreateDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device */ - Device.prototype.gatewayConfig = null; /** - * Creates a new Device instance using the specified properties. - * @function create - * @memberof google.cloud.iot.v1.Device - * @static - * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set - * @returns {google.cloud.iot.v1.Device} Device instance - */ - Device.create = function create(properties) { - return new Device(properties); - }; - - /** - * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. - * @function encode - * @memberof google.cloud.iot.v1.Device - * @static - * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Device.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.numId != null && message.hasOwnProperty("numId")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.numId); - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) - $root.google.protobuf.Timestamp.encode(message.lastHeartbeatTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) - $root.google.protobuf.Timestamp.encode(message.lastEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) - $root.google.protobuf.Timestamp.encode(message.lastErrorTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) - $root.google.rpc.Status.encode(message.lastErrorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.credentials != null && message.credentials.length) - for (var i = 0; i < message.credentials.length; ++i) - $root.google.cloud.iot.v1.DeviceCredential.encode(message.credentials[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.config != null && message.hasOwnProperty("config")) - $root.google.cloud.iot.v1.DeviceConfig.encode(message.config, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) - $root.google.protobuf.Timestamp.encode(message.lastConfigAckTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.state != null && message.hasOwnProperty("state")) - $root.google.cloud.iot.v1.DeviceState.encode(message.state, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) - $root.google.protobuf.Timestamp.encode(message.lastConfigSendTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.blocked != null && message.hasOwnProperty("blocked")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.blocked); - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) - $root.google.protobuf.Timestamp.encode(message.lastStateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.logLevel); - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) - $root.google.cloud.iot.v1.GatewayConfig.encode(message.gatewayConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iot.v1.Device - * @static - * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Device.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Device message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iot.v1.Device - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.Device} Device - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Device.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.numId = reader.uint64(); - break; - case 12: - if (!(message.credentials && message.credentials.length)) - message.credentials = []; - message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); - break; - case 7: - message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 20: - message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 18: - message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 19: - message.blocked = reader.bool(); - break; - case 10: - message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 13: - message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); - break; - case 16: - message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); - break; - case 21: - message.logLevel = reader.int32(); - break; - case 17: - reader.skip().pos++; - if (message.metadata === $util.emptyObject) - message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); - break; - case 24: - message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Device message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iot.v1.Device - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.Device} Device - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Device.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Device message. - * @function verify - * @memberof google.cloud.iot.v1.Device - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Device.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.numId != null && message.hasOwnProperty("numId")) - if (!$util.isInteger(message.numId) && !(message.numId && $util.isInteger(message.numId.low) && $util.isInteger(message.numId.high))) - return "numId: integer|Long expected"; - if (message.credentials != null && message.hasOwnProperty("credentials")) { - if (!Array.isArray(message.credentials)) - return "credentials: array expected"; - for (var i = 0; i < message.credentials.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceCredential.verify(message.credentials[i]); - if (error) - return "credentials." + error; - } - } - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastHeartbeatTime); - if (error) - return "lastHeartbeatTime." + error; - } - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastEventTime); - if (error) - return "lastEventTime." + error; - } - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastStateTime); - if (error) - return "lastStateTime." + error; - } - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastConfigAckTime); - if (error) - return "lastConfigAckTime." + error; - } - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastConfigSendTime); - if (error) - return "lastConfigSendTime." + error; - } - if (message.blocked != null && message.hasOwnProperty("blocked")) - if (typeof message.blocked !== "boolean") - return "blocked: boolean expected"; - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastErrorTime); - if (error) - return "lastErrorTime." + error; - } - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) { - var error = $root.google.rpc.Status.verify(message.lastErrorStatus); - if (error) - return "lastErrorStatus." + error; - } - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.state != null && message.hasOwnProperty("state")) { - var error = $root.google.cloud.iot.v1.DeviceState.verify(message.state); - if (error) - return "state." + error; - } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - switch (message.logLevel) { - default: - return "logLevel: enum value expected"; - case 0: - case 10: - case 20: - case 30: - case 40: - break; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) { - var error = $root.google.cloud.iot.v1.GatewayConfig.verify(message.gatewayConfig); - if (error) - return "gatewayConfig." + error; - } - return null; - }; - - /** - * Creates a Device message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.Device - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.Device} Device - */ - Device.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.Device) - return object; - var message = new $root.google.cloud.iot.v1.Device(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.numId != null) - if ($util.Long) - (message.numId = $util.Long.fromValue(object.numId)).unsigned = true; - else if (typeof object.numId === "string") - message.numId = parseInt(object.numId, 10); - else if (typeof object.numId === "number") - message.numId = object.numId; - else if (typeof object.numId === "object") - message.numId = new $util.LongBits(object.numId.low >>> 0, object.numId.high >>> 0).toNumber(true); - if (object.credentials) { - if (!Array.isArray(object.credentials)) - throw TypeError(".google.cloud.iot.v1.Device.credentials: array expected"); - message.credentials = []; - for (var i = 0; i < object.credentials.length; ++i) { - if (typeof object.credentials[i] !== "object") - throw TypeError(".google.cloud.iot.v1.Device.credentials: object expected"); - message.credentials[i] = $root.google.cloud.iot.v1.DeviceCredential.fromObject(object.credentials[i]); - } - } - if (object.lastHeartbeatTime != null) { - if (typeof object.lastHeartbeatTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastHeartbeatTime: object expected"); - message.lastHeartbeatTime = $root.google.protobuf.Timestamp.fromObject(object.lastHeartbeatTime); - } - if (object.lastEventTime != null) { - if (typeof object.lastEventTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastEventTime: object expected"); - message.lastEventTime = $root.google.protobuf.Timestamp.fromObject(object.lastEventTime); - } - if (object.lastStateTime != null) { - if (typeof object.lastStateTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastStateTime: object expected"); - message.lastStateTime = $root.google.protobuf.Timestamp.fromObject(object.lastStateTime); - } - if (object.lastConfigAckTime != null) { - if (typeof object.lastConfigAckTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastConfigAckTime: object expected"); - message.lastConfigAckTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigAckTime); - } - if (object.lastConfigSendTime != null) { - if (typeof object.lastConfigSendTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastConfigSendTime: object expected"); - message.lastConfigSendTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigSendTime); - } - if (object.blocked != null) - message.blocked = Boolean(object.blocked); - if (object.lastErrorTime != null) { - if (typeof object.lastErrorTime !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastErrorTime: object expected"); - message.lastErrorTime = $root.google.protobuf.Timestamp.fromObject(object.lastErrorTime); - } - if (object.lastErrorStatus != null) { - if (typeof object.lastErrorStatus !== "object") - throw TypeError(".google.cloud.iot.v1.Device.lastErrorStatus: object expected"); - message.lastErrorStatus = $root.google.rpc.Status.fromObject(object.lastErrorStatus); - } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.iot.v1.Device.config: object expected"); - message.config = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.config); - } - if (object.state != null) { - if (typeof object.state !== "object") - throw TypeError(".google.cloud.iot.v1.Device.state: object expected"); - message.state = $root.google.cloud.iot.v1.DeviceState.fromObject(object.state); - } - switch (object.logLevel) { - case "LOG_LEVEL_UNSPECIFIED": - case 0: - message.logLevel = 0; - break; - case "NONE": - case 10: - message.logLevel = 10; - break; - case "ERROR": - case 20: - message.logLevel = 20; - break; - case "INFO": - case 30: - message.logLevel = 30; - break; - case "DEBUG": - case 40: - message.logLevel = 40; - break; - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.iot.v1.Device.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.gatewayConfig != null) { - if (typeof object.gatewayConfig !== "object") - throw TypeError(".google.cloud.iot.v1.Device.gatewayConfig: object expected"); - message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.fromObject(object.gatewayConfig); - } - return message; - }; - - /** - * Creates a plain object from a Device message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.Device - * @static - * @param {google.cloud.iot.v1.Device} message Device - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls CreateDevice. + * @function createDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 */ - Device.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.credentials = []; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.id = ""; - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.numId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numId = options.longs === String ? "0" : 0; - object.lastHeartbeatTime = null; - object.lastEventTime = null; - object.lastErrorTime = null; - object.lastErrorStatus = null; - object.config = null; - object.lastConfigAckTime = null; - object.state = null; - object.lastConfigSendTime = null; - object.blocked = false; - object.lastStateTime = null; - object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; - object.gatewayConfig = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.numId != null && message.hasOwnProperty("numId")) - if (typeof message.numId === "number") - object.numId = options.longs === String ? String(message.numId) : message.numId; - else - object.numId = options.longs === String ? $util.Long.prototype.toString.call(message.numId) : options.longs === Number ? new $util.LongBits(message.numId.low >>> 0, message.numId.high >>> 0).toNumber(true) : message.numId; - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) - object.lastHeartbeatTime = $root.google.protobuf.Timestamp.toObject(message.lastHeartbeatTime, options); - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) - object.lastEventTime = $root.google.protobuf.Timestamp.toObject(message.lastEventTime, options); - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) - object.lastErrorTime = $root.google.protobuf.Timestamp.toObject(message.lastErrorTime, options); - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) - object.lastErrorStatus = $root.google.rpc.Status.toObject(message.lastErrorStatus, options); - if (message.credentials && message.credentials.length) { - object.credentials = []; - for (var j = 0; j < message.credentials.length; ++j) - object.credentials[j] = $root.google.cloud.iot.v1.DeviceCredential.toObject(message.credentials[j], options); - } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.config, options); - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) - object.lastConfigAckTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigAckTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = $root.google.cloud.iot.v1.DeviceState.toObject(message.state, options); - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) - object.lastConfigSendTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigSendTime, options); - if (message.blocked != null && message.hasOwnProperty("blocked")) - object.blocked = message.blocked; - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) - object.lastStateTime = $root.google.protobuf.Timestamp.toObject(message.lastStateTime, options); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) - object.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.toObject(message.gatewayConfig, options); - return object; - }; + Object.defineProperty(DeviceManager.prototype.createDevice = function createDevice(request, callback) { + return this.rpcCall(createDevice, $root.google.cloud.iot.v1.CreateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "CreateDevice" }); /** - * Converts this Device to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.Device + * Calls CreateDevice. + * @function createDevice + * @memberof google.cloud.iot.v1.DeviceManager * @instance - * @returns {Object.} JSON object + * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Device.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return Device; - })(); + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device + */ - v1.GatewayConfig = (function() { + /** + * Calls GetDevice. + * @function getDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManager.prototype.getDevice = function getDevice(request, callback) { + return this.rpcCall(getDevice, $root.google.cloud.iot.v1.GetDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "GetDevice" }); /** - * Properties of a GatewayConfig. - * @memberof google.cloud.iot.v1 - * @interface IGatewayConfig - * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayConfig gatewayType - * @property {google.cloud.iot.v1.GatewayAuthMethod|null} [gatewayAuthMethod] GatewayConfig gatewayAuthMethod - * @property {string|null} [lastAccessedGatewayId] GatewayConfig lastAccessedGatewayId - * @property {google.protobuf.ITimestamp|null} [lastAccessedGatewayTime] GatewayConfig lastAccessedGatewayTime + * Calls GetDevice. + * @function getDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GatewayConfig. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a GatewayConfig. - * @implements IGatewayConfig - * @constructor - * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UpdateDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.Device} [response] Device */ - function GatewayConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * GatewayConfig gatewayType. - * @member {google.cloud.iot.v1.GatewayType} gatewayType - * @memberof google.cloud.iot.v1.GatewayConfig + * Calls UpdateDevice. + * @function updateDevice + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback} callback Node-style callback called with the error, if any, and Device + * @returns {undefined} + * @variation 1 */ - GatewayConfig.prototype.gatewayType = 0; + Object.defineProperty(DeviceManager.prototype.updateDevice = function updateDevice(request, callback) { + return this.rpcCall(updateDevice, $root.google.cloud.iot.v1.UpdateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); + }, "name", { value: "UpdateDevice" }); /** - * GatewayConfig gatewayAuthMethod. - * @member {google.cloud.iot.v1.GatewayAuthMethod} gatewayAuthMethod - * @memberof google.cloud.iot.v1.GatewayConfig + * Calls UpdateDevice. + * @function updateDevice + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayConfig.prototype.gatewayAuthMethod = 0; /** - * GatewayConfig lastAccessedGatewayId. - * @member {string} lastAccessedGatewayId - * @memberof google.cloud.iot.v1.GatewayConfig - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef DeleteDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GatewayConfig.prototype.lastAccessedGatewayId = ""; /** - * GatewayConfig lastAccessedGatewayTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastAccessedGatewayTime - * @memberof google.cloud.iot.v1.GatewayConfig + * Calls DeleteDevice. + * @function deleteDevice + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GatewayConfig.prototype.lastAccessedGatewayTime = null; + Object.defineProperty(DeviceManager.prototype.deleteDevice = function deleteDevice(request, callback) { + return this.rpcCall(deleteDevice, $root.google.cloud.iot.v1.DeleteDeviceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDevice" }); /** - * Creates a new GatewayConfig instance using the specified properties. - * @function create - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig instance + * Calls DeleteDevice. + * @function deleteDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayConfig.create = function create(properties) { - return new GatewayConfig(properties); - }; /** - * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDevicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDevicesResponse} [response] ListDevicesResponse */ - GatewayConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gatewayAuthMethod); - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAccessedGatewayId); - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) - $root.google.protobuf.Timestamp.encode(message.lastAccessedGatewayTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDevices. + * @function listDevices + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDevicesCallback} callback Node-style callback called with the error, if any, and ListDevicesResponse + * @returns {undefined} + * @variation 1 */ - GatewayConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DeviceManager.prototype.listDevices = function listDevices(request, callback) { + return this.rpcCall(listDevices, $root.google.cloud.iot.v1.ListDevicesRequest, $root.google.cloud.iot.v1.ListDevicesResponse, request, callback); + }, "name", { value: "ListDevices" }); /** - * Decodes a GatewayConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListDevices. + * @function listDevices + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gatewayType = reader.int32(); - break; - case 2: - message.gatewayAuthMethod = reader.int32(); - break; - case 3: - message.lastAccessedGatewayId = reader.string(); - break; - case 4: - message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig - * @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.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ModifyCloudToDeviceConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.DeviceConfig} [response] DeviceConfig */ - GatewayConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GatewayConfig message. - * @function verify - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ModifyCloudToDeviceConfig. + * @function modifyCloudToDeviceConfig + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback} callback Node-style callback called with the error, if any, and DeviceConfig + * @returns {undefined} + * @variation 1 */ - GatewayConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) - switch (message.gatewayType) { - default: - return "gatewayType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - switch (message.gatewayAuthMethod) { - default: - return "gatewayAuthMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) - if (!$util.isString(message.lastAccessedGatewayId)) - return "lastAccessedGatewayId: string expected"; - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastAccessedGatewayTime); - if (error) - return "lastAccessedGatewayTime." + error; - } - return null; - }; + Object.defineProperty(DeviceManager.prototype.modifyCloudToDeviceConfig = function modifyCloudToDeviceConfig(request, callback) { + return this.rpcCall(modifyCloudToDeviceConfig, $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, $root.google.cloud.iot.v1.DeviceConfig, request, callback); + }, "name", { value: "ModifyCloudToDeviceConfig" }); /** - * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig + * Calls ModifyCloudToDeviceConfig. + * @function modifyCloudToDeviceConfig + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GatewayConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GatewayConfig) - return object; - var message = new $root.google.cloud.iot.v1.GatewayConfig(); - switch (object.gatewayType) { - case "GATEWAY_TYPE_UNSPECIFIED": - case 0: - message.gatewayType = 0; - break; - case "GATEWAY": - case 1: - message.gatewayType = 1; - break; - case "NON_GATEWAY": - case 2: - message.gatewayType = 2; - break; - } - switch (object.gatewayAuthMethod) { - case "GATEWAY_AUTH_METHOD_UNSPECIFIED": - case 0: - message.gatewayAuthMethod = 0; - break; - case "ASSOCIATION_ONLY": - case 1: - message.gatewayAuthMethod = 1; - break; - case "DEVICE_AUTH_TOKEN_ONLY": - case 2: - message.gatewayAuthMethod = 2; - break; - case "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": - case 3: - message.gatewayAuthMethod = 3; - break; - } - if (object.lastAccessedGatewayId != null) - message.lastAccessedGatewayId = String(object.lastAccessedGatewayId); - if (object.lastAccessedGatewayTime != null) { - if (typeof object.lastAccessedGatewayTime !== "object") - throw TypeError(".google.cloud.iot.v1.GatewayConfig.lastAccessedGatewayTime: object expected"); - message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.fromObject(object.lastAccessedGatewayTime); - } - return message; - }; /** - * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.GatewayConfig - * @static - * @param {google.cloud.iot.v1.GatewayConfig} message GatewayConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceConfigVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} [response] ListDeviceConfigVersionsResponse */ - GatewayConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gatewayType = options.enums === String ? "GATEWAY_TYPE_UNSPECIFIED" : 0; - object.gatewayAuthMethod = options.enums === String ? "GATEWAY_AUTH_METHOD_UNSPECIFIED" : 0; - object.lastAccessedGatewayId = ""; - object.lastAccessedGatewayTime = null; - } - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) - object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) - object.lastAccessedGatewayId = message.lastAccessedGatewayId; - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) - object.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.toObject(message.lastAccessedGatewayTime, options); - return object; - }; /** - * Converts this GatewayConfig to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.GatewayConfig + * Calls ListDeviceConfigVersions. + * @function listDeviceConfigVersions + * @memberof google.cloud.iot.v1.DeviceManager * @instance - * @returns {Object.} JSON object + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback} callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse + * @returns {undefined} + * @variation 1 */ - GatewayConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DeviceManager.prototype.listDeviceConfigVersions = function listDeviceConfigVersions(request, callback) { + return this.rpcCall(listDeviceConfigVersions, $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest, $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse, request, callback); + }, "name", { value: "ListDeviceConfigVersions" }); - return GatewayConfig; - })(); + /** + * Calls ListDeviceConfigVersions. + * @function listDeviceConfigVersions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - v1.DeviceRegistry = (function() { + /** + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef ListDeviceStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.ListDeviceStatesResponse} [response] ListDeviceStatesResponse + */ /** - * Properties of a DeviceRegistry. - * @memberof google.cloud.iot.v1 - * @interface IDeviceRegistry - * @property {string|null} [id] DeviceRegistry id - * @property {string|null} [name] DeviceRegistry name - * @property {Array.|null} [eventNotificationConfigs] DeviceRegistry eventNotificationConfigs - * @property {google.cloud.iot.v1.IStateNotificationConfig|null} [stateNotificationConfig] DeviceRegistry stateNotificationConfig - * @property {google.cloud.iot.v1.IMqttConfig|null} [mqttConfig] DeviceRegistry mqttConfig - * @property {google.cloud.iot.v1.IHttpConfig|null} [httpConfig] DeviceRegistry httpConfig - * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] DeviceRegistry logLevel - * @property {Array.|null} [credentials] DeviceRegistry credentials + * Calls ListDeviceStates. + * @function listDeviceStates + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback} callback Node-style callback called with the error, if any, and ListDeviceStatesResponse + * @returns {undefined} + * @variation 1 */ + Object.defineProperty(DeviceManager.prototype.listDeviceStates = function listDeviceStates(request, callback) { + return this.rpcCall(listDeviceStates, $root.google.cloud.iot.v1.ListDeviceStatesRequest, $root.google.cloud.iot.v1.ListDeviceStatesResponse, request, callback); + }, "name", { value: "ListDeviceStates" }); /** - * Constructs a new DeviceRegistry. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceRegistry. - * @implements IDeviceRegistry - * @constructor - * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set + * Calls ListDeviceStates. + * @function listDeviceStates + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - function DeviceRegistry(properties) { - this.eventNotificationConfigs = []; - this.credentials = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * DeviceRegistry id. - * @member {string} id - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - DeviceRegistry.prototype.id = ""; /** - * DeviceRegistry name. - * @member {string} name - * @memberof google.cloud.iot.v1.DeviceRegistry + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - DeviceRegistry.prototype.name = ""; + Object.defineProperty(DeviceManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); /** - * DeviceRegistry eventNotificationConfigs. - * @member {Array.} eventNotificationConfigs - * @memberof google.cloud.iot.v1.DeviceRegistry + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeviceRegistry.prototype.eventNotificationConfigs = $util.emptyArray; /** - * DeviceRegistry stateNotificationConfig. - * @member {google.cloud.iot.v1.IStateNotificationConfig|null|undefined} stateNotificationConfig - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - DeviceRegistry.prototype.stateNotificationConfig = null; /** - * DeviceRegistry mqttConfig. - * @member {google.cloud.iot.v1.IMqttConfig|null|undefined} mqttConfig - * @memberof google.cloud.iot.v1.DeviceRegistry + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - DeviceRegistry.prototype.mqttConfig = null; + Object.defineProperty(DeviceManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); /** - * DeviceRegistry httpConfig. - * @member {google.cloud.iot.v1.IHttpConfig|null|undefined} httpConfig - * @memberof google.cloud.iot.v1.DeviceRegistry + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeviceRegistry.prototype.httpConfig = null; /** - * DeviceRegistry logLevel. - * @member {google.cloud.iot.v1.LogLevel} logLevel - * @memberof google.cloud.iot.v1.DeviceRegistry - * @instance + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse */ - DeviceRegistry.prototype.logLevel = 0; /** - * DeviceRegistry credentials. - * @member {Array.} credentials - * @memberof google.cloud.iot.v1.DeviceRegistry + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.iot.v1.DeviceManager * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - DeviceRegistry.prototype.credentials = $util.emptyArray; + Object.defineProperty(DeviceManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * Creates a new DeviceRegistry instance using the specified properties. - * @function create - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry instance + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeviceRegistry.create = function create(properties) { - return new DeviceRegistry(properties); - }; /** - * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. - * @function encode - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef SendCommandToDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} [response] SendCommandToDeviceResponse */ - DeviceRegistry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) - $root.google.cloud.iot.v1.MqttConfig.encode(message.mqttConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) - $root.google.cloud.iot.v1.StateNotificationConfig.encode(message.stateNotificationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.credentials != null && message.credentials.length) - for (var i = 0; i < message.credentials.length; ++i) - $root.google.cloud.iot.v1.RegistryCredential.encode(message.credentials[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) - $root.google.cloud.iot.v1.HttpConfig.encode(message.httpConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.eventNotificationConfigs != null && message.eventNotificationConfigs.length) - for (var i = 0; i < message.eventNotificationConfigs.length; ++i) - $root.google.cloud.iot.v1.EventNotificationConfig.encode(message.eventNotificationConfigs[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logLevel); - return writer; - }; /** - * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SendCommandToDevice. + * @function sendCommandToDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback} callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse + * @returns {undefined} + * @variation 1 */ - DeviceRegistry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DeviceManager.prototype.sendCommandToDevice = function sendCommandToDevice(request, callback) { + return this.rpcCall(sendCommandToDevice, $root.google.cloud.iot.v1.SendCommandToDeviceRequest, $root.google.cloud.iot.v1.SendCommandToDeviceResponse, request, callback); + }, "name", { value: "SendCommandToDevice" }); /** - * Decodes a DeviceRegistry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeviceRegistry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceRegistry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 10: - if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) - message.eventNotificationConfigs = []; - message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); - break; - case 7: - message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); - break; - case 4: - message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); - break; - case 9: - message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); - break; - case 11: - message.logLevel = reader.int32(); - break; - case 8: - if (!(message.credentials && message.credentials.length)) - message.credentials = []; - message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + * Calls SendCommandToDevice. + * @function sendCommandToDevice + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry - * @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.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef BindDeviceToGatewayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} [response] BindDeviceToGatewayResponse */ - DeviceRegistry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a DeviceRegistry message. - * @function verify - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls BindDeviceToGateway. + * @function bindDeviceToGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback} callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse + * @returns {undefined} + * @variation 1 */ - DeviceRegistry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.eventNotificationConfigs != null && message.hasOwnProperty("eventNotificationConfigs")) { - if (!Array.isArray(message.eventNotificationConfigs)) - return "eventNotificationConfigs: array expected"; - for (var i = 0; i < message.eventNotificationConfigs.length; ++i) { - var error = $root.google.cloud.iot.v1.EventNotificationConfig.verify(message.eventNotificationConfigs[i]); - if (error) - return "eventNotificationConfigs." + error; - } - } - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) { - var error = $root.google.cloud.iot.v1.StateNotificationConfig.verify(message.stateNotificationConfig); - if (error) - return "stateNotificationConfig." + error; - } - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) { - var error = $root.google.cloud.iot.v1.MqttConfig.verify(message.mqttConfig); - if (error) - return "mqttConfig." + error; - } - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) { - var error = $root.google.cloud.iot.v1.HttpConfig.verify(message.httpConfig); - if (error) - return "httpConfig." + error; - } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - switch (message.logLevel) { - default: - return "logLevel: enum value expected"; - case 0: - case 10: - case 20: - case 30: - case 40: - break; - } - if (message.credentials != null && message.hasOwnProperty("credentials")) { - if (!Array.isArray(message.credentials)) - return "credentials: array expected"; - for (var i = 0; i < message.credentials.length; ++i) { - var error = $root.google.cloud.iot.v1.RegistryCredential.verify(message.credentials[i]); - if (error) - return "credentials." + error; - } - } - return null; - }; + Object.defineProperty(DeviceManager.prototype.bindDeviceToGateway = function bindDeviceToGateway(request, callback) { + return this.rpcCall(bindDeviceToGateway, $root.google.cloud.iot.v1.BindDeviceToGatewayRequest, $root.google.cloud.iot.v1.BindDeviceToGatewayResponse, request, callback); + }, "name", { value: "BindDeviceToGateway" }); /** - * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry + * Calls BindDeviceToGateway. + * @function bindDeviceToGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeviceRegistry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceRegistry) - return object; - var message = new $root.google.cloud.iot.v1.DeviceRegistry(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.eventNotificationConfigs) { - if (!Array.isArray(object.eventNotificationConfigs)) - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: array expected"); - message.eventNotificationConfigs = []; - for (var i = 0; i < object.eventNotificationConfigs.length; ++i) { - if (typeof object.eventNotificationConfigs[i] !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: object expected"); - message.eventNotificationConfigs[i] = $root.google.cloud.iot.v1.EventNotificationConfig.fromObject(object.eventNotificationConfigs[i]); - } - } - if (object.stateNotificationConfig != null) { - if (typeof object.stateNotificationConfig !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.stateNotificationConfig: object expected"); - message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.fromObject(object.stateNotificationConfig); - } - if (object.mqttConfig != null) { - if (typeof object.mqttConfig !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.mqttConfig: object expected"); - message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.fromObject(object.mqttConfig); - } - if (object.httpConfig != null) { - if (typeof object.httpConfig !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.httpConfig: object expected"); - message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.fromObject(object.httpConfig); - } - switch (object.logLevel) { - case "LOG_LEVEL_UNSPECIFIED": - case 0: - message.logLevel = 0; - break; - case "NONE": - case 10: - message.logLevel = 10; - break; - case "ERROR": - case 20: - message.logLevel = 20; - break; - case "INFO": - case 30: - message.logLevel = 30; - break; - case "DEBUG": - case 40: - message.logLevel = 40; - break; - } - if (object.credentials) { - if (!Array.isArray(object.credentials)) - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: array expected"); - message.credentials = []; - for (var i = 0; i < object.credentials.length; ++i) { - if (typeof object.credentials[i] !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: object expected"); - message.credentials[i] = $root.google.cloud.iot.v1.RegistryCredential.fromObject(object.credentials[i]); - } - } - return message; - }; /** - * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.DeviceRegistry - * @static - * @param {google.cloud.iot.v1.DeviceRegistry} message DeviceRegistry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * @memberof google.cloud.iot.v1.DeviceManager + * @typedef UnbindDeviceFromGatewayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} [response] UnbindDeviceFromGatewayResponse */ - DeviceRegistry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.credentials = []; - object.eventNotificationConfigs = []; - } - if (options.defaults) { - object.id = ""; - object.name = ""; - object.mqttConfig = null; - object.stateNotificationConfig = null; - object.httpConfig = null; - object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) - object.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.toObject(message.mqttConfig, options); - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) - object.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.toObject(message.stateNotificationConfig, options); - if (message.credentials && message.credentials.length) { - object.credentials = []; - for (var j = 0; j < message.credentials.length; ++j) - object.credentials[j] = $root.google.cloud.iot.v1.RegistryCredential.toObject(message.credentials[j], options); - } - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) - object.httpConfig = $root.google.cloud.iot.v1.HttpConfig.toObject(message.httpConfig, options); - if (message.eventNotificationConfigs && message.eventNotificationConfigs.length) { - object.eventNotificationConfigs = []; - for (var j = 0; j < message.eventNotificationConfigs.length; ++j) - object.eventNotificationConfigs[j] = $root.google.cloud.iot.v1.EventNotificationConfig.toObject(message.eventNotificationConfigs[j], options); - } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; - return object; - }; /** - * Converts this DeviceRegistry to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.DeviceRegistry + * Calls UnbindDeviceFromGateway. + * @function unbindDeviceFromGateway + * @memberof google.cloud.iot.v1.DeviceManager * @instance - * @returns {Object.} JSON object + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object + * @param {google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback} callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse + * @returns {undefined} + * @variation 1 */ - DeviceRegistry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DeviceManager.prototype.unbindDeviceFromGateway = function unbindDeviceFromGateway(request, callback) { + return this.rpcCall(unbindDeviceFromGateway, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, request, callback); + }, "name", { value: "UnbindDeviceFromGateway" }); - return DeviceRegistry; + /** + * Calls UnbindDeviceFromGateway. + * @function unbindDeviceFromGateway + * @memberof google.cloud.iot.v1.DeviceManager + * @instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DeviceManager; })(); - v1.MqttConfig = (function() { + v1.CreateDeviceRegistryRequest = (function() { /** - * Properties of a MqttConfig. + * Properties of a CreateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IMqttConfig - * @property {google.cloud.iot.v1.MqttState|null} [mqttEnabledState] MqttConfig mqttEnabledState + * @interface ICreateDeviceRegistryRequest + * @property {string|null} [parent] CreateDeviceRegistryRequest parent + * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] CreateDeviceRegistryRequest deviceRegistry */ /** - * Constructs a new MqttConfig. + * Constructs a new CreateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a MqttConfig. - * @implements IMqttConfig + * @classdesc Represents a CreateDeviceRegistryRequest. + * @implements ICreateDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set */ - function MqttConfig(properties) { + function CreateDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1496,75 +754,88 @@ } /** - * MqttConfig mqttEnabledState. - * @member {google.cloud.iot.v1.MqttState} mqttEnabledState - * @memberof google.cloud.iot.v1.MqttConfig + * CreateDeviceRegistryRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @instance */ - MqttConfig.prototype.mqttEnabledState = 0; + CreateDeviceRegistryRequest.prototype.parent = ""; /** - * Creates a new MqttConfig instance using the specified properties. + * CreateDeviceRegistryRequest deviceRegistry. + * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @instance + */ + CreateDeviceRegistryRequest.prototype.deviceRegistry = null; + + /** + * Creates a new CreateDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig instance + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest instance */ - MqttConfig.create = function create(properties) { - return new MqttConfig(properties); + CreateDeviceRegistryRequest.create = function create(properties) { + return new CreateDeviceRegistryRequest(properties); }; /** - * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MqttConfig.encode = function encode(message, writer) { + CreateDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mqttEnabledState); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. + * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MqttConfig.encodeDelimited = function encodeDelimited(message, writer) { + CreateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MqttConfig message from the specified reader or buffer. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MqttConfig.decode = function decode(reader, length) { + CreateDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.MqttConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mqttEnabledState = reader.int32(); + message.parent = reader.string(); + break; + case 2: + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1575,141 +846,121 @@ }; /** - * Decodes a MqttConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MqttConfig.decodeDelimited = function decodeDelimited(reader) { + CreateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MqttConfig message. + * Verifies a CreateDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MqttConfig.verify = function verify(message) { + CreateDeviceRegistryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - switch (message.mqttEnabledState) { - default: - return "mqttEnabledState: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); + if (error) + return "deviceRegistry." + error; + } return null; }; /** - * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig + * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest */ - MqttConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.MqttConfig) + CreateDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.MqttConfig(); - switch (object.mqttEnabledState) { - case "MQTT_STATE_UNSPECIFIED": - case 0: - message.mqttEnabledState = 0; - break; - case "MQTT_ENABLED": - case 1: - message.mqttEnabledState = 1; - break; - case "MQTT_DISABLED": - case 2: - message.mqttEnabledState = 2; - break; + var message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deviceRegistry != null) { + if (typeof object.deviceRegistry !== "object") + throw TypeError(".google.cloud.iot.v1.CreateDeviceRegistryRequest.deviceRegistry: object expected"); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); } return message; }; /** - * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. + * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.MqttConfig} message MqttConfig + * @param {google.cloud.iot.v1.CreateDeviceRegistryRequest} message CreateDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MqttConfig.toObject = function toObject(message, options) { + CreateDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.mqttEnabledState = options.enums === String ? "MQTT_STATE_UNSPECIFIED" : 0; - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; + if (options.defaults) { + object.parent = ""; + object.deviceRegistry = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); return object; }; /** - * Converts this MqttConfig to JSON. + * Converts this CreateDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.MqttConfig + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - MqttConfig.prototype.toJSON = function toJSON() { + CreateDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MqttConfig; - })(); - - /** - * MqttState enum. - * @name google.cloud.iot.v1.MqttState - * @enum {string} - * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value - * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value - * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value - */ - v1.MqttState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MQTT_ENABLED"] = 1; - values[valuesById[2] = "MQTT_DISABLED"] = 2; - return values; + return CreateDeviceRegistryRequest; })(); - v1.HttpConfig = (function() { + v1.GetDeviceRegistryRequest = (function() { /** - * Properties of a HttpConfig. + * Properties of a GetDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IHttpConfig - * @property {google.cloud.iot.v1.HttpState|null} [httpEnabledState] HttpConfig httpEnabledState + * @interface IGetDeviceRegistryRequest + * @property {string|null} [name] GetDeviceRegistryRequest name */ /** - * Constructs a new HttpConfig. + * Constructs a new GetDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a HttpConfig. - * @implements IHttpConfig + * @classdesc Represents a GetDeviceRegistryRequest. + * @implements IGetDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set */ - function HttpConfig(properties) { + function GetDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1717,75 +968,75 @@ } /** - * HttpConfig httpEnabledState. - * @member {google.cloud.iot.v1.HttpState} httpEnabledState - * @memberof google.cloud.iot.v1.HttpConfig + * GetDeviceRegistryRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @instance */ - HttpConfig.prototype.httpEnabledState = 0; + GetDeviceRegistryRequest.prototype.name = ""; /** - * Creates a new HttpConfig instance using the specified properties. + * Creates a new GetDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig instance + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest instance */ - HttpConfig.create = function create(properties) { - return new HttpConfig(properties); + GetDeviceRegistryRequest.create = function create(properties) { + return new GetDeviceRegistryRequest(properties); }; /** - * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpConfig.encode = function encode(message, writer) { + GetDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.httpEnabledState); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. + * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpConfig.encodeDelimited = function encodeDelimited(message, writer) { + GetDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpConfig message from the specified reader or buffer. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpConfig.decode = function decode(reader, length) { + GetDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.HttpConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.httpEnabledState = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -1796,196 +1047,107 @@ }; /** - * Decodes a HttpConfig message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpConfig.decodeDelimited = function decodeDelimited(reader) { + GetDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpConfig message. + * Verifies a GetDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpConfig.verify = function verify(message) { + GetDeviceRegistryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - switch (message.httpEnabledState) { - default: - return "httpEnabledState: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig + * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest */ - HttpConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.HttpConfig) + GetDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GetDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.HttpConfig(); - switch (object.httpEnabledState) { - case "HTTP_STATE_UNSPECIFIED": - case 0: - message.httpEnabledState = 0; - break; - case "HTTP_ENABLED": - case 1: - message.httpEnabledState = 1; - break; - case "HTTP_DISABLED": - case 2: - message.httpEnabledState = 2; - break; - } + var message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. + * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.HttpConfig} message HttpConfig + * @param {google.cloud.iot.v1.GetDeviceRegistryRequest} message GetDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpConfig.toObject = function toObject(message, options) { + GetDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.httpEnabledState = options.enums === String ? "HTTP_STATE_UNSPECIFIED" : 0; - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this HttpConfig to JSON. + * Converts this GetDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.HttpConfig + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - HttpConfig.prototype.toJSON = function toJSON() { + GetDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpConfig; - })(); - - /** - * HttpState enum. - * @name google.cloud.iot.v1.HttpState - * @enum {string} - * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value - * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value - * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value - */ - v1.HttpState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTP_ENABLED"] = 1; - values[valuesById[2] = "HTTP_DISABLED"] = 2; - return values; - })(); - - /** - * LogLevel enum. - * @name google.cloud.iot.v1.LogLevel - * @enum {string} - * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value - * @property {number} NONE=10 NONE value - * @property {number} ERROR=20 ERROR value - * @property {number} INFO=30 INFO value - * @property {number} DEBUG=40 DEBUG value - */ - v1.LogLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[10] = "NONE"] = 10; - values[valuesById[20] = "ERROR"] = 20; - values[valuesById[30] = "INFO"] = 30; - values[valuesById[40] = "DEBUG"] = 40; - return values; - })(); - - /** - * GatewayType enum. - * @name google.cloud.iot.v1.GatewayType - * @enum {string} - * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value - * @property {number} GATEWAY=1 GATEWAY value - * @property {number} NON_GATEWAY=2 NON_GATEWAY value - */ - v1.GatewayType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GATEWAY"] = 1; - values[valuesById[2] = "NON_GATEWAY"] = 2; - return values; - })(); - - /** - * GatewayAuthMethod enum. - * @name google.cloud.iot.v1.GatewayAuthMethod - * @enum {string} - * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value - * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value - * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value - * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value - */ - v1.GatewayAuthMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; - values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; - values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; - return values; + return GetDeviceRegistryRequest; })(); - v1.EventNotificationConfig = (function() { + v1.DeleteDeviceRegistryRequest = (function() { /** - * Properties of an EventNotificationConfig. + * Properties of a DeleteDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IEventNotificationConfig - * @property {string|null} [subfolderMatches] EventNotificationConfig subfolderMatches - * @property {string|null} [pubsubTopicName] EventNotificationConfig pubsubTopicName + * @interface IDeleteDeviceRegistryRequest + * @property {string|null} [name] DeleteDeviceRegistryRequest name */ /** - * Constructs a new EventNotificationConfig. + * Constructs a new DeleteDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents an EventNotificationConfig. - * @implements IEventNotificationConfig + * @classdesc Represents a DeleteDeviceRegistryRequest. + * @implements IDeleteDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set */ - function EventNotificationConfig(properties) { + function DeleteDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1993,88 +1155,75 @@ } /** - * EventNotificationConfig subfolderMatches. - * @member {string} subfolderMatches - * @memberof google.cloud.iot.v1.EventNotificationConfig - * @instance - */ - EventNotificationConfig.prototype.subfolderMatches = ""; - - /** - * EventNotificationConfig pubsubTopicName. - * @member {string} pubsubTopicName - * @memberof google.cloud.iot.v1.EventNotificationConfig + * DeleteDeviceRegistryRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @instance */ - EventNotificationConfig.prototype.pubsubTopicName = ""; + DeleteDeviceRegistryRequest.prototype.name = ""; /** - * Creates a new EventNotificationConfig instance using the specified properties. + * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig instance + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest instance */ - EventNotificationConfig.create = function create(properties) { - return new EventNotificationConfig(properties); + DeleteDeviceRegistryRequest.create = function create(properties) { + return new DeleteDeviceRegistryRequest(properties); }; /** - * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventNotificationConfig.encode = function encode(message, writer) { + DeleteDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subfolderMatches); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. + * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventNotificationConfig.decode = function decode(reader, length) { + DeleteDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.EventNotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.subfolderMatches = reader.string(); - break; case 1: - message.pubsubTopicName = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -2085,116 +1234,108 @@ }; /** - * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventNotificationConfig.decodeDelimited = function decodeDelimited(reader) { + DeleteDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventNotificationConfig message. + * Verifies a DeleteDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventNotificationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) - if (!$util.isString(message.subfolderMatches)) - return "subfolderMatches: string expected"; - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - if (!$util.isString(message.pubsubTopicName)) - return "pubsubTopicName: string expected"; + DeleteDeviceRegistryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig + * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest */ - EventNotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.EventNotificationConfig) + DeleteDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.EventNotificationConfig(); - if (object.subfolderMatches != null) - message.subfolderMatches = String(object.subfolderMatches); - if (object.pubsubTopicName != null) - message.pubsubTopicName = String(object.pubsubTopicName); + var message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.EventNotificationConfig} message EventNotificationConfig + * @param {google.cloud.iot.v1.DeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventNotificationConfig.toObject = function toObject(message, options) { + DeleteDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pubsubTopicName = ""; - object.subfolderMatches = ""; - } - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - object.pubsubTopicName = message.pubsubTopicName; - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) - object.subfolderMatches = message.subfolderMatches; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this EventNotificationConfig to JSON. + * Converts this DeleteDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.EventNotificationConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - EventNotificationConfig.prototype.toJSON = function toJSON() { + DeleteDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EventNotificationConfig; + return DeleteDeviceRegistryRequest; })(); - v1.StateNotificationConfig = (function() { + v1.UpdateDeviceRegistryRequest = (function() { /** - * Properties of a StateNotificationConfig. + * Properties of an UpdateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @interface IStateNotificationConfig - * @property {string|null} [pubsubTopicName] StateNotificationConfig pubsubTopicName + * @interface IUpdateDeviceRegistryRequest + * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] UpdateDeviceRegistryRequest deviceRegistry + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRegistryRequest updateMask */ /** - * Constructs a new StateNotificationConfig. + * Constructs a new UpdateDeviceRegistryRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a StateNotificationConfig. - * @implements IStateNotificationConfig + * @classdesc Represents an UpdateDeviceRegistryRequest. + * @implements IUpdateDeviceRegistryRequest * @constructor - * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set */ - function StateNotificationConfig(properties) { + function UpdateDeviceRegistryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2202,75 +1343,88 @@ } /** - * StateNotificationConfig pubsubTopicName. - * @member {string} pubsubTopicName - * @memberof google.cloud.iot.v1.StateNotificationConfig + * UpdateDeviceRegistryRequest deviceRegistry. + * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @instance */ - StateNotificationConfig.prototype.pubsubTopicName = ""; + UpdateDeviceRegistryRequest.prototype.deviceRegistry = null; /** - * Creates a new StateNotificationConfig instance using the specified properties. + * UpdateDeviceRegistryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @instance + */ + UpdateDeviceRegistryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig instance + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest instance */ - StateNotificationConfig.create = function create(properties) { - return new StateNotificationConfig(properties); + UpdateDeviceRegistryRequest.create = function create(properties) { + return new UpdateDeviceRegistryRequest(properties); }; /** - * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StateNotificationConfig.encode = function encode(message, writer) { + UpdateDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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 StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. + * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StateNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StateNotificationConfig.decode = function decode(reader, length) { + UpdateDeviceRegistryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.StateNotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pubsubTopicName = reader.string(); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2281,107 +1435,128 @@ }; /** - * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StateNotificationConfig.decodeDelimited = function decodeDelimited(reader) { + UpdateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StateNotificationConfig message. + * Verifies an UpdateDeviceRegistryRequest message. * @function verify - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StateNotificationConfig.verify = function verify(message) { + UpdateDeviceRegistryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - if (!$util.isString(message.pubsubTopicName)) - return "pubsubTopicName: string expected"; + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); + if (error) + return "deviceRegistry." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig + * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest */ - StateNotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.StateNotificationConfig) + UpdateDeviceRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest) return object; - var message = new $root.google.cloud.iot.v1.StateNotificationConfig(); - if (object.pubsubTopicName != null) - message.pubsubTopicName = String(object.pubsubTopicName); + var message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); + if (object.deviceRegistry != null) { + if (typeof object.deviceRegistry !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.deviceRegistry: object expected"); + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @static - * @param {google.cloud.iot.v1.StateNotificationConfig} message StateNotificationConfig + * @param {google.cloud.iot.v1.UpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StateNotificationConfig.toObject = function toObject(message, options) { + UpdateDeviceRegistryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.pubsubTopicName = ""; - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) - object.pubsubTopicName = message.pubsubTopicName; + if (options.defaults) { + object.deviceRegistry = null; + object.updateMask = null; + } + if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this StateNotificationConfig to JSON. + * Converts this UpdateDeviceRegistryRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.StateNotificationConfig + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest * @instance * @returns {Object.} JSON object */ - StateNotificationConfig.prototype.toJSON = function toJSON() { + UpdateDeviceRegistryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StateNotificationConfig; + return UpdateDeviceRegistryRequest; })(); - v1.RegistryCredential = (function() { + v1.ListDeviceRegistriesRequest = (function() { /** - * Properties of a RegistryCredential. + * Properties of a ListDeviceRegistriesRequest. * @memberof google.cloud.iot.v1 - * @interface IRegistryCredential - * @property {google.cloud.iot.v1.IPublicKeyCertificate|null} [publicKeyCertificate] RegistryCredential publicKeyCertificate + * @interface IListDeviceRegistriesRequest + * @property {string|null} [parent] ListDeviceRegistriesRequest parent + * @property {number|null} [pageSize] ListDeviceRegistriesRequest pageSize + * @property {string|null} [pageToken] ListDeviceRegistriesRequest pageToken */ /** - * Constructs a new RegistryCredential. + * Constructs a new ListDeviceRegistriesRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a RegistryCredential. - * @implements IRegistryCredential + * @classdesc Represents a ListDeviceRegistriesRequest. + * @implements IListDeviceRegistriesRequest * @constructor - * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set */ - function RegistryCredential(properties) { + function ListDeviceRegistriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2389,89 +1564,101 @@ } /** - * RegistryCredential publicKeyCertificate. - * @member {google.cloud.iot.v1.IPublicKeyCertificate|null|undefined} publicKeyCertificate - * @memberof google.cloud.iot.v1.RegistryCredential + * ListDeviceRegistriesRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance */ - RegistryCredential.prototype.publicKeyCertificate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListDeviceRegistriesRequest.prototype.parent = ""; /** - * RegistryCredential credential. - * @member {"publicKeyCertificate"|undefined} credential - * @memberof google.cloud.iot.v1.RegistryCredential + * ListDeviceRegistriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @instance + */ + ListDeviceRegistriesRequest.prototype.pageSize = 0; + + /** + * ListDeviceRegistriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance */ - Object.defineProperty(RegistryCredential.prototype, "credential", { - get: $util.oneOfGetter($oneOfFields = ["publicKeyCertificate"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListDeviceRegistriesRequest.prototype.pageToken = ""; /** - * Creates a new RegistryCredential instance using the specified properties. + * Creates a new ListDeviceRegistriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest instance */ - RegistryCredential.create = function create(properties) { - return new RegistryCredential(properties); + ListDeviceRegistriesRequest.create = function create(properties) { + return new ListDeviceRegistriesRequest(properties); }; /** - * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegistryCredential.encode = function encode(message, writer) { + ListDeviceRegistriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) - $root.google.cloud.iot.v1.PublicKeyCertificate.encode(message.publicKeyCertificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegistryCredential.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceRegistriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RegistryCredential message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegistryCredential.decode = function decode(reader, length) { + ListDeviceRegistriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.RegistryCredential(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -2482,122 +1669,126 @@ }; /** - * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegistryCredential.decodeDelimited = function decodeDelimited(reader) { + ListDeviceRegistriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RegistryCredential message. + * Verifies a ListDeviceRegistriesRequest message. * @function verify - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RegistryCredential.verify = function verify(message) { + ListDeviceRegistriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { - properties.credential = 1; - { - var error = $root.google.cloud.iot.v1.PublicKeyCertificate.verify(message.publicKeyCertificate); - if (error) - return "publicKeyCertificate." + error; - } - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential + * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest */ - RegistryCredential.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.RegistryCredential) + ListDeviceRegistriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesRequest) return object; - var message = new $root.google.cloud.iot.v1.RegistryCredential(); - if (object.publicKeyCertificate != null) { - if (typeof object.publicKeyCertificate !== "object") - throw TypeError(".google.cloud.iot.v1.RegistryCredential.publicKeyCertificate: object expected"); - message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.fromObject(object.publicKeyCertificate); - } + var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); + 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 RegistryCredential message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @static - * @param {google.cloud.iot.v1.RegistryCredential} message RegistryCredential + * @param {google.cloud.iot.v1.ListDeviceRegistriesRequest} message ListDeviceRegistriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RegistryCredential.toObject = function toObject(message, options) { + ListDeviceRegistriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { - object.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.toObject(message.publicKeyCertificate, options); - if (options.oneofs) - object.credential = "publicKeyCertificate"; + 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 RegistryCredential to JSON. + * Converts this ListDeviceRegistriesRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.RegistryCredential + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest * @instance * @returns {Object.} JSON object */ - RegistryCredential.prototype.toJSON = function toJSON() { + ListDeviceRegistriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RegistryCredential; + return ListDeviceRegistriesRequest; })(); - v1.X509CertificateDetails = (function() { + v1.ListDeviceRegistriesResponse = (function() { /** - * Properties of a X509CertificateDetails. + * Properties of a ListDeviceRegistriesResponse. * @memberof google.cloud.iot.v1 - * @interface IX509CertificateDetails - * @property {string|null} [issuer] X509CertificateDetails issuer - * @property {string|null} [subject] X509CertificateDetails subject - * @property {google.protobuf.ITimestamp|null} [startTime] X509CertificateDetails startTime - * @property {google.protobuf.ITimestamp|null} [expiryTime] X509CertificateDetails expiryTime - * @property {string|null} [signatureAlgorithm] X509CertificateDetails signatureAlgorithm - * @property {string|null} [publicKeyType] X509CertificateDetails publicKeyType + * @interface IListDeviceRegistriesResponse + * @property {Array.|null} [deviceRegistries] ListDeviceRegistriesResponse deviceRegistries + * @property {string|null} [nextPageToken] ListDeviceRegistriesResponse nextPageToken */ /** - * Constructs a new X509CertificateDetails. + * Constructs a new ListDeviceRegistriesResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a X509CertificateDetails. - * @implements IX509CertificateDetails + * @classdesc Represents a ListDeviceRegistriesResponse. + * @implements IListDeviceRegistriesResponse * @constructor - * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set */ - function X509CertificateDetails(properties) { + function ListDeviceRegistriesResponse(properties) { + this.deviceRegistries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2605,140 +1796,91 @@ } /** - * X509CertificateDetails issuer. - * @member {string} issuer - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.issuer = ""; - - /** - * X509CertificateDetails subject. - * @member {string} subject - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.subject = ""; - - /** - * X509CertificateDetails startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.startTime = null; - - /** - * X509CertificateDetails expiryTime. - * @member {google.protobuf.ITimestamp|null|undefined} expiryTime - * @memberof google.cloud.iot.v1.X509CertificateDetails - * @instance - */ - X509CertificateDetails.prototype.expiryTime = null; - - /** - * X509CertificateDetails signatureAlgorithm. - * @member {string} signatureAlgorithm - * @memberof google.cloud.iot.v1.X509CertificateDetails + * ListDeviceRegistriesResponse deviceRegistries. + * @member {Array.} deviceRegistries + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @instance */ - X509CertificateDetails.prototype.signatureAlgorithm = ""; + ListDeviceRegistriesResponse.prototype.deviceRegistries = $util.emptyArray; /** - * X509CertificateDetails publicKeyType. - * @member {string} publicKeyType - * @memberof google.cloud.iot.v1.X509CertificateDetails + * ListDeviceRegistriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @instance */ - X509CertificateDetails.prototype.publicKeyType = ""; + ListDeviceRegistriesResponse.prototype.nextPageToken = ""; /** - * Creates a new X509CertificateDetails instance using the specified properties. + * Creates a new ListDeviceRegistriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails instance + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse instance */ - X509CertificateDetails.create = function create(properties) { - return new X509CertificateDetails(properties); + ListDeviceRegistriesResponse.create = function create(properties) { + return new ListDeviceRegistriesResponse(properties); }; /** - * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - X509CertificateDetails.encode = function encode(message, writer) { + ListDeviceRegistriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issuer != null && message.hasOwnProperty("issuer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); - if (message.subject != null && message.hasOwnProperty("subject")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) - $root.google.protobuf.Timestamp.encode(message.expiryTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signatureAlgorithm); - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.publicKeyType); + if (message.deviceRegistries != null && message.deviceRegistries.length) + for (var i = 0; i < message.deviceRegistries.length; ++i) + $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistries[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 X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. + * Encodes the specified ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - X509CertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceRegistriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - X509CertificateDetails.decode = function decode(reader, length) { + ListDeviceRegistriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.X509CertificateDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.issuer = reader.string(); + if (!(message.deviceRegistries && message.deviceRegistries.length)) + message.deviceRegistries = []; + message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); break; case 2: - message.subject = reader.string(); - break; - case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.signatureAlgorithm = reader.string(); - break; - case 6: - message.publicKeyType = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -2749,160 +1891,134 @@ }; /** - * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - X509CertificateDetails.decodeDelimited = function decodeDelimited(reader) { + ListDeviceRegistriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a X509CertificateDetails message. + * Verifies a ListDeviceRegistriesResponse message. * @function verify - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - X509CertificateDetails.verify = function verify(message) { + ListDeviceRegistriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.subject != null && message.hasOwnProperty("subject")) - if (!$util.isString(message.subject)) - return "subject: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expiryTime); - if (error) - return "expiryTime." + error; + if (message.deviceRegistries != null && message.hasOwnProperty("deviceRegistries")) { + if (!Array.isArray(message.deviceRegistries)) + return "deviceRegistries: array expected"; + for (var i = 0; i < message.deviceRegistries.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistries[i]); + if (error) + return "deviceRegistries." + error; + } } - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - if (!$util.isString(message.signatureAlgorithm)) - return "signatureAlgorithm: string expected"; - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) - if (!$util.isString(message.publicKeyType)) - return "publicKeyType: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails + * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse */ - X509CertificateDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.X509CertificateDetails) + ListDeviceRegistriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesResponse) return object; - var message = new $root.google.cloud.iot.v1.X509CertificateDetails(); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.subject != null) - message.subject = String(object.subject); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.expiryTime != null) { - if (typeof object.expiryTime !== "object") - throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.expiryTime: object expected"); - message.expiryTime = $root.google.protobuf.Timestamp.fromObject(object.expiryTime); + var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); + if (object.deviceRegistries) { + if (!Array.isArray(object.deviceRegistries)) + throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: array expected"); + message.deviceRegistries = []; + for (var i = 0; i < object.deviceRegistries.length; ++i) { + if (typeof object.deviceRegistries[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: object expected"); + message.deviceRegistries[i] = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistries[i]); + } } - if (object.signatureAlgorithm != null) - message.signatureAlgorithm = String(object.signatureAlgorithm); - if (object.publicKeyType != null) - message.publicKeyType = String(object.publicKeyType); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @static - * @param {google.cloud.iot.v1.X509CertificateDetails} message X509CertificateDetails + * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} message ListDeviceRegistriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - X509CertificateDetails.toObject = function toObject(message, options) { + ListDeviceRegistriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.issuer = ""; - object.subject = ""; - object.startTime = null; - object.expiryTime = null; - object.signatureAlgorithm = ""; - object.publicKeyType = ""; + if (options.arrays || options.defaults) + object.deviceRegistries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.deviceRegistries && message.deviceRegistries.length) { + object.deviceRegistries = []; + for (var j = 0; j < message.deviceRegistries.length; ++j) + object.deviceRegistries[j] = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistries[j], options); } - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.subject != null && message.hasOwnProperty("subject")) - object.subject = message.subject; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) - object.expiryTime = $root.google.protobuf.Timestamp.toObject(message.expiryTime, options); - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - object.signatureAlgorithm = message.signatureAlgorithm; - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) - object.publicKeyType = message.publicKeyType; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this X509CertificateDetails to JSON. + * Converts this ListDeviceRegistriesResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.X509CertificateDetails + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse * @instance * @returns {Object.} JSON object */ - X509CertificateDetails.prototype.toJSON = function toJSON() { + ListDeviceRegistriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return X509CertificateDetails; + return ListDeviceRegistriesResponse; })(); - v1.PublicKeyCertificate = (function() { + v1.CreateDeviceRequest = (function() { /** - * Properties of a PublicKeyCertificate. + * Properties of a CreateDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IPublicKeyCertificate - * @property {google.cloud.iot.v1.PublicKeyCertificateFormat|null} [format] PublicKeyCertificate format - * @property {string|null} [certificate] PublicKeyCertificate certificate - * @property {google.cloud.iot.v1.IX509CertificateDetails|null} [x509Details] PublicKeyCertificate x509Details + * @interface ICreateDeviceRequest + * @property {string|null} [parent] CreateDeviceRequest parent + * @property {google.cloud.iot.v1.IDevice|null} [device] CreateDeviceRequest device */ /** - * Constructs a new PublicKeyCertificate. + * Constructs a new CreateDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a PublicKeyCertificate. - * @implements IPublicKeyCertificate + * @classdesc Represents a CreateDeviceRequest. + * @implements ICreateDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set + * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set */ - function PublicKeyCertificate(properties) { + function CreateDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2910,101 +2026,88 @@ } /** - * PublicKeyCertificate format. - * @member {google.cloud.iot.v1.PublicKeyCertificateFormat} format - * @memberof google.cloud.iot.v1.PublicKeyCertificate - * @instance - */ - PublicKeyCertificate.prototype.format = 0; - - /** - * PublicKeyCertificate certificate. - * @member {string} certificate - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * CreateDeviceRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @instance */ - PublicKeyCertificate.prototype.certificate = ""; + CreateDeviceRequest.prototype.parent = ""; /** - * PublicKeyCertificate x509Details. - * @member {google.cloud.iot.v1.IX509CertificateDetails|null|undefined} x509Details - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * CreateDeviceRequest device. + * @member {google.cloud.iot.v1.IDevice|null|undefined} device + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @instance */ - PublicKeyCertificate.prototype.x509Details = null; + CreateDeviceRequest.prototype.device = null; /** - * Creates a new PublicKeyCertificate instance using the specified properties. + * Creates a new CreateDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate instance + * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest instance */ - PublicKeyCertificate.create = function create(properties) { - return new PublicKeyCertificate(properties); + CreateDeviceRequest.create = function create(properties) { + return new CreateDeviceRequest(properties); }; /** - * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCertificate.encode = function encode(message, writer) { + CreateDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && message.hasOwnProperty("format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.certificate != null && message.hasOwnProperty("certificate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificate); - if (message.x509Details != null && message.hasOwnProperty("x509Details")) - $root.google.cloud.iot.v1.X509CertificateDetails.encode(message.x509Details, 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.device != null && message.hasOwnProperty("device")) + $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. + * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode + * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCertificate.encodeDelimited = function encodeDelimited(message, writer) { + CreateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer. + * Decodes a CreateDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCertificate.decode = function decode(reader, length) { + CreateDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.format = reader.int32(); + message.parent = reader.string(); break; case 2: - message.certificate = reader.string(); - break; - case 3: - message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3015,157 +2118,122 @@ }; /** - * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. + * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCertificate.decodeDelimited = function decodeDelimited(reader) { + CreateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PublicKeyCertificate message. + * Verifies a CreateDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PublicKeyCertificate.verify = function verify(message) { + CreateDeviceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - break; - } - if (message.certificate != null && message.hasOwnProperty("certificate")) - if (!$util.isString(message.certificate)) - return "certificate: string expected"; - if (message.x509Details != null && message.hasOwnProperty("x509Details")) { - var error = $root.google.cloud.iot.v1.X509CertificateDetails.verify(message.x509Details); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.device != null && message.hasOwnProperty("device")) { + var error = $root.google.cloud.iot.v1.Device.verify(message.device); if (error) - return "x509Details." + error; + return "device." + error; } return null; }; /** - * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate + * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest */ - PublicKeyCertificate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.PublicKeyCertificate) + CreateDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); - switch (object.format) { - case "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": - case 0: - message.format = 0; - break; - case "X509_CERTIFICATE_PEM": - case 1: - message.format = 1; - break; - } - if (object.certificate != null) - message.certificate = String(object.certificate); - if (object.x509Details != null) { - if (typeof object.x509Details !== "object") - throw TypeError(".google.cloud.iot.v1.PublicKeyCertificate.x509Details: object expected"); - message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.fromObject(object.x509Details); + var message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.device != null) { + if (typeof object.device !== "object") + throw TypeError(".google.cloud.iot.v1.CreateDeviceRequest.device: object expected"); + message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); } return message; }; /** - * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. + * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @static - * @param {google.cloud.iot.v1.PublicKeyCertificate} message PublicKeyCertificate + * @param {google.cloud.iot.v1.CreateDeviceRequest} message CreateDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PublicKeyCertificate.toObject = function toObject(message, options) { + CreateDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT" : 0; - object.certificate = ""; - object.x509Details = null; + object.parent = ""; + object.device = null; } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; - if (message.certificate != null && message.hasOwnProperty("certificate")) - object.certificate = message.certificate; - if (message.x509Details != null && message.hasOwnProperty("x509Details")) - object.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.toObject(message.x509Details, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.device != null && message.hasOwnProperty("device")) + object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); return object; }; /** - * Converts this PublicKeyCertificate to JSON. + * Converts this CreateDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @memberof google.cloud.iot.v1.CreateDeviceRequest * @instance * @returns {Object.} JSON object */ - PublicKeyCertificate.prototype.toJSON = function toJSON() { + CreateDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PublicKeyCertificate; - })(); - - /** - * PublicKeyCertificateFormat enum. - * @name google.cloud.iot.v1.PublicKeyCertificateFormat - * @enum {string} - * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value - * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value - */ - v1.PublicKeyCertificateFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; - values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; - return values; + return CreateDeviceRequest; })(); - v1.DeviceCredential = (function() { + v1.GetDeviceRequest = (function() { /** - * Properties of a DeviceCredential. + * Properties of a GetDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IDeviceCredential - * @property {google.cloud.iot.v1.IPublicKeyCredential|null} [publicKey] DeviceCredential publicKey - * @property {google.protobuf.ITimestamp|null} [expirationTime] DeviceCredential expirationTime + * @interface IGetDeviceRequest + * @property {string|null} [name] GetDeviceRequest name + * @property {google.protobuf.IFieldMask|null} [fieldMask] GetDeviceRequest fieldMask */ /** - * Constructs a new DeviceCredential. + * Constructs a new GetDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceCredential. - * @implements IDeviceCredential + * @classdesc Represents a GetDeviceRequest. + * @implements IGetDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set + * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set */ - function DeviceCredential(properties) { + function GetDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3173,102 +2241,88 @@ } /** - * DeviceCredential publicKey. - * @member {google.cloud.iot.v1.IPublicKeyCredential|null|undefined} publicKey - * @memberof google.cloud.iot.v1.DeviceCredential - * @instance - */ - DeviceCredential.prototype.publicKey = null; - - /** - * DeviceCredential expirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} expirationTime - * @memberof google.cloud.iot.v1.DeviceCredential + * GetDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.GetDeviceRequest * @instance */ - DeviceCredential.prototype.expirationTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetDeviceRequest.prototype.name = ""; /** - * DeviceCredential credential. - * @member {"publicKey"|undefined} credential - * @memberof google.cloud.iot.v1.DeviceCredential + * GetDeviceRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.iot.v1.GetDeviceRequest * @instance */ - Object.defineProperty(DeviceCredential.prototype, "credential", { - get: $util.oneOfGetter($oneOfFields = ["publicKey"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetDeviceRequest.prototype.fieldMask = null; /** - * Creates a new DeviceCredential instance using the specified properties. + * Creates a new GetDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential instance + * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest instance */ - DeviceCredential.create = function create(properties) { - return new DeviceCredential(properties); + GetDeviceRequest.create = function create(properties) { + return new GetDeviceRequest(properties); }; /** - * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCredential.encode = function encode(message, writer) { + GetDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - $root.google.cloud.iot.v1.PublicKeyCredential.encode(message.publicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) - $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. + * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode + * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCredential.encodeDelimited = function encodeDelimited(message, writer) { + GetDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceCredential message from the specified reader or buffer. + * Decodes a GetDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCredential.decode = function decode(reader, length) { + GetDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceCredential(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); + case 1: + message.name = reader.string(); break; - case 6: - message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 2: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3279,132 +2333,122 @@ }; /** - * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCredential.decodeDelimited = function decodeDelimited(reader) { + GetDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceCredential message. + * Verifies a GetDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceCredential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - properties.credential = 1; - { - var error = $root.google.cloud.iot.v1.PublicKeyCredential.verify(message.publicKey); - if (error) - return "publicKey." + error; - } - } - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + GetDeviceRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) - return "expirationTime." + error; + return "fieldMask." + error; } return null; }; /** - * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential + * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest */ - DeviceCredential.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceCredential) + GetDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GetDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.DeviceCredential(); - if (object.publicKey != null) { - if (typeof object.publicKey !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceCredential.publicKey: object expected"); - message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.fromObject(object.publicKey); - } - if (object.expirationTime != null) { - if (typeof object.expirationTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceCredential.expirationTime: object expected"); - message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + var message = new $root.google.cloud.iot.v1.GetDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.iot.v1.GetDeviceRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); } return message; }; /** - * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. + * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @static - * @param {google.cloud.iot.v1.DeviceCredential} message DeviceCredential + * @param {google.cloud.iot.v1.GetDeviceRequest} message GetDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceCredential.toObject = function toObject(message, options) { + GetDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.expirationTime = null; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - object.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.toObject(message.publicKey, options); - if (options.oneofs) - object.credential = "publicKey"; + if (options.defaults) { + object.name = ""; + object.fieldMask = null; } - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) - object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); return object; }; /** - * Converts this DeviceCredential to JSON. + * Converts this GetDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeviceCredential + * @memberof google.cloud.iot.v1.GetDeviceRequest * @instance * @returns {Object.} JSON object */ - DeviceCredential.prototype.toJSON = function toJSON() { + GetDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceCredential; + return GetDeviceRequest; })(); - v1.PublicKeyCredential = (function() { + v1.UpdateDeviceRequest = (function() { /** - * Properties of a PublicKeyCredential. + * Properties of an UpdateDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IPublicKeyCredential - * @property {google.cloud.iot.v1.PublicKeyFormat|null} [format] PublicKeyCredential format - * @property {string|null} [key] PublicKeyCredential key + * @interface IUpdateDeviceRequest + * @property {google.cloud.iot.v1.IDevice|null} [device] UpdateDeviceRequest device + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRequest updateMask */ /** - * Constructs a new PublicKeyCredential. + * Constructs a new UpdateDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a PublicKeyCredential. - * @implements IPublicKeyCredential + * @classdesc Represents an UpdateDeviceRequest. + * @implements IUpdateDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set */ - function PublicKeyCredential(properties) { + function UpdateDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3412,88 +2456,88 @@ } /** - * PublicKeyCredential format. - * @member {google.cloud.iot.v1.PublicKeyFormat} format - * @memberof google.cloud.iot.v1.PublicKeyCredential + * UpdateDeviceRequest device. + * @member {google.cloud.iot.v1.IDevice|null|undefined} device + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @instance */ - PublicKeyCredential.prototype.format = 0; + UpdateDeviceRequest.prototype.device = null; /** - * PublicKeyCredential key. - * @member {string} key - * @memberof google.cloud.iot.v1.PublicKeyCredential + * UpdateDeviceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @instance */ - PublicKeyCredential.prototype.key = ""; + UpdateDeviceRequest.prototype.updateMask = null; /** - * Creates a new PublicKeyCredential instance using the specified properties. + * Creates a new UpdateDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential instance + * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest instance */ - PublicKeyCredential.create = function create(properties) { - return new PublicKeyCredential(properties); + UpdateDeviceRequest.create = function create(properties) { + return new UpdateDeviceRequest(properties); }; /** - * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCredential.encode = function encode(message, writer) { + UpdateDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && message.hasOwnProperty("format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.key != null && message.hasOwnProperty("key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.device != null && message.hasOwnProperty("device")) + $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. + * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode + * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKeyCredential.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer. + * Decodes an UpdateDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCredential.decode = function decode(reader, length) { + UpdateDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCredential(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; case 2: - message.key = reader.string(); + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3504,167 +2548,126 @@ }; /** - * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKeyCredential.decodeDelimited = function decodeDelimited(reader) { + UpdateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PublicKeyCredential message. + * Verifies an UpdateDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PublicKeyCredential.verify = function verify(message) { + UpdateDeviceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 3: - case 1: - case 2: - case 4: - break; - } - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; + if (message.device != null && message.hasOwnProperty("device")) { + var error = $root.google.cloud.iot.v1.Device.verify(message.device); + if (error) + return "device." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential + * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest */ - PublicKeyCredential.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.PublicKeyCredential) + UpdateDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.PublicKeyCredential(); - switch (object.format) { - case "UNSPECIFIED_PUBLIC_KEY_FORMAT": - case 0: - message.format = 0; - break; - case "RSA_PEM": - case 3: - message.format = 3; - break; - case "RSA_X509_PEM": - case 1: - message.format = 1; - break; - case "ES256_PEM": - case 2: - message.format = 2; - break; - case "ES256_X509_PEM": - case 4: - message.format = 4; - break; + var message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); + if (object.device != null) { + if (typeof object.device !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.device: object expected"); + message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.key != null) - message.key = String(object.key); return message; }; /** - * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @static - * @param {google.cloud.iot.v1.PublicKeyCredential} message PublicKeyCredential + * @param {google.cloud.iot.v1.UpdateDeviceRequest} message UpdateDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PublicKeyCredential.toObject = function toObject(message, options) { + UpdateDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_FORMAT" : 0; - object.key = ""; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; + object.device = null; + object.updateMask = null; + } + if (message.device != null && message.hasOwnProperty("device")) + object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this PublicKeyCredential to JSON. + * Converts this UpdateDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.PublicKeyCredential + * @memberof google.cloud.iot.v1.UpdateDeviceRequest * @instance * @returns {Object.} JSON object */ - PublicKeyCredential.prototype.toJSON = function toJSON() { + UpdateDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PublicKeyCredential; - })(); - - /** - * PublicKeyFormat enum. - * @name google.cloud.iot.v1.PublicKeyFormat - * @enum {string} - * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value - * @property {number} RSA_PEM=3 RSA_PEM value - * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value - * @property {number} ES256_PEM=2 ES256_PEM value - * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value - */ - v1.PublicKeyFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; - values[valuesById[3] = "RSA_PEM"] = 3; - values[valuesById[1] = "RSA_X509_PEM"] = 1; - values[valuesById[2] = "ES256_PEM"] = 2; - values[valuesById[4] = "ES256_X509_PEM"] = 4; - return values; + return UpdateDeviceRequest; })(); - v1.DeviceConfig = (function() { + v1.DeleteDeviceRequest = (function() { /** - * Properties of a DeviceConfig. + * Properties of a DeleteDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IDeviceConfig - * @property {number|Long|null} [version] DeviceConfig version - * @property {google.protobuf.ITimestamp|null} [cloudUpdateTime] DeviceConfig cloudUpdateTime - * @property {google.protobuf.ITimestamp|null} [deviceAckTime] DeviceConfig deviceAckTime - * @property {Uint8Array|null} [binaryData] DeviceConfig binaryData + * @interface IDeleteDeviceRequest + * @property {string|null} [name] DeleteDeviceRequest name */ /** - * Constructs a new DeviceConfig. + * Constructs a new DeleteDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceConfig. - * @implements IDeviceConfig + * @classdesc Represents a DeleteDeviceRequest. + * @implements IDeleteDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set */ - function DeviceConfig(properties) { + function DeleteDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3672,114 +2675,75 @@ } /** - * DeviceConfig version. - * @member {number|Long} version - * @memberof google.cloud.iot.v1.DeviceConfig - * @instance - */ - DeviceConfig.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DeviceConfig cloudUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} cloudUpdateTime - * @memberof google.cloud.iot.v1.DeviceConfig - * @instance - */ - DeviceConfig.prototype.cloudUpdateTime = null; - - /** - * DeviceConfig deviceAckTime. - * @member {google.protobuf.ITimestamp|null|undefined} deviceAckTime - * @memberof google.cloud.iot.v1.DeviceConfig - * @instance - */ - DeviceConfig.prototype.deviceAckTime = null; - - /** - * DeviceConfig binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.DeviceConfig + * DeleteDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @instance */ - DeviceConfig.prototype.binaryData = $util.newBuffer([]); + DeleteDeviceRequest.prototype.name = ""; /** - * Creates a new DeviceConfig instance using the specified properties. + * Creates a new DeleteDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig instance + * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest instance */ - DeviceConfig.create = function create(properties) { - return new DeviceConfig(properties); + DeleteDeviceRequest.create = function create(properties) { + return new DeleteDeviceRequest(properties); }; /** - * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceConfig.encode = function encode(message, writer) { + DeleteDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.cloudUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) - $root.google.protobuf.Timestamp.encode(message.deviceAckTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.binaryData); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. + * Encodes the specified DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static - * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode + * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceConfig message from the specified reader or buffer. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceConfig.decode = function decode(reader, length) { + DeleteDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.int64(); - break; - case 2: - message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.binaryData = reader.bytes(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -3790,166 +2754,115 @@ }; /** - * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceConfig.decodeDelimited = function decodeDelimited(reader) { + DeleteDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceConfig message. + * Verifies a DeleteDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceConfig.verify = function verify(message) { + DeleteDeviceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) - return "version: integer|Long expected"; - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.cloudUpdateTime); - if (error) - return "cloudUpdateTime." + error; - } - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deviceAckTime); - if (error) - return "deviceAckTime." + error; - } - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig - */ - DeviceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceConfig) - return object; - var message = new $root.google.cloud.iot.v1.DeviceConfig(); - if (object.version != null) - if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; - else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); - else if (typeof object.version === "number") - message.version = object.version; - else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); - if (object.cloudUpdateTime != null) { - if (typeof object.cloudUpdateTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceConfig.cloudUpdateTime: object expected"); - message.cloudUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.cloudUpdateTime); - } - if (object.deviceAckTime != null) { - if (typeof object.deviceAckTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceConfig.deviceAckTime: object expected"); - message.deviceAckTime = $root.google.protobuf.Timestamp.fromObject(object.deviceAckTime); - } - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; - return message; - }; - - /** - * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iot.v1.DeviceConfig - * @static - * @param {google.cloud.iot.v1.DeviceConfig} message DeviceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest */ - DeviceConfig.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.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.version = options.longs === String ? "0" : 0; - object.cloudUpdateTime = null; - object.deviceAckTime = null; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } - } - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; - else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) - object.cloudUpdateTime = $root.google.protobuf.Timestamp.toObject(message.cloudUpdateTime, options); - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) - object.deviceAckTime = $root.google.protobuf.Timestamp.toObject(message.deviceAckTime, options); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + DeleteDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRequest) + return object; + var message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {google.cloud.iot.v1.DeleteDeviceRequest} message DeleteDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDeviceRequest.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 DeviceConfig to JSON. + * Converts this DeleteDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeviceConfig + * @memberof google.cloud.iot.v1.DeleteDeviceRequest * @instance * @returns {Object.} JSON object */ - DeviceConfig.prototype.toJSON = function toJSON() { + DeleteDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceConfig; + return DeleteDeviceRequest; })(); - v1.DeviceState = (function() { + v1.ListDevicesRequest = (function() { /** - * Properties of a DeviceState. + * Properties of a ListDevicesRequest. * @memberof google.cloud.iot.v1 - * @interface IDeviceState - * @property {google.protobuf.ITimestamp|null} [updateTime] DeviceState updateTime - * @property {Uint8Array|null} [binaryData] DeviceState binaryData + * @interface IListDevicesRequest + * @property {string|null} [parent] ListDevicesRequest parent + * @property {Array.|null} [deviceNumIds] ListDevicesRequest deviceNumIds + * @property {Array.|null} [deviceIds] ListDevicesRequest deviceIds + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListDevicesRequest fieldMask + * @property {google.cloud.iot.v1.IGatewayListOptions|null} [gatewayListOptions] ListDevicesRequest gatewayListOptions + * @property {number|null} [pageSize] ListDevicesRequest pageSize + * @property {string|null} [pageToken] ListDevicesRequest pageToken */ /** - * Constructs a new DeviceState. + * Constructs a new ListDevicesRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceState. - * @implements IDeviceState + * @classdesc Represents a ListDevicesRequest. + * @implements IListDevicesRequest * @constructor - * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set */ - function DeviceState(properties) { + function ListDevicesRequest(properties) { + this.deviceNumIds = []; + this.deviceIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3957,88 +2870,167 @@ } /** - * DeviceState updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.iot.v1.DeviceState + * ListDevicesRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - DeviceState.prototype.updateTime = null; + ListDevicesRequest.prototype.parent = ""; /** - * DeviceState binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.DeviceState + * ListDevicesRequest deviceNumIds. + * @member {Array.} deviceNumIds + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance */ - DeviceState.prototype.binaryData = $util.newBuffer([]); + ListDevicesRequest.prototype.deviceNumIds = $util.emptyArray; /** - * Creates a new DeviceState instance using the specified properties. + * ListDevicesRequest deviceIds. + * @member {Array.} deviceIds + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.deviceIds = $util.emptyArray; + + /** + * ListDevicesRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.fieldMask = null; + + /** + * ListDevicesRequest gatewayListOptions. + * @member {google.cloud.iot.v1.IGatewayListOptions|null|undefined} gatewayListOptions + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.gatewayListOptions = null; + + /** + * ListDevicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.pageSize = 0; + + /** + * ListDevicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @instance + */ + ListDevicesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDevicesRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeviceState} DeviceState instance + * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest instance */ - DeviceState.create = function create(properties) { - return new DeviceState(properties); + ListDevicesRequest.create = function create(properties) { + return new ListDevicesRequest(properties); }; /** - * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode + * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceState.encode = function encode(message, writer) { + ListDevicesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deviceNumIds != null && message.deviceNumIds.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.deviceNumIds.length; ++i) + writer.uint64(message.deviceNumIds[i]); + writer.ldelim(); + } + if (message.deviceIds != null && message.deviceIds.length) + for (var i = 0; i < message.deviceIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceIds[i]); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + $root.google.cloud.iot.v1.GatewayListOptions.encode(message.gatewayListOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 100, wireType 0 =*/800).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.pageToken); return writer; }; /** - * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. + * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode + * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceState.encodeDelimited = function encodeDelimited(message, writer) { + ListDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceState message from the specified reader or buffer. + * Decodes a ListDevicesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceState.decode = function decode(reader, length) { + ListDevicesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceState(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.binaryData = reader.bytes(); + if (!(message.deviceNumIds && message.deviceNumIds.length)) + message.deviceNumIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.deviceNumIds.push(reader.uint64()); + } else + message.deviceNumIds.push(reader.uint64()); + break; + case 3: + if (!(message.deviceIds && message.deviceIds.length)) + message.deviceIds = []; + message.deviceIds.push(reader.string()); + break; + case 4: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 6: + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); + break; + case 100: + message.pageSize = reader.int32(); + break; + case 101: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4049,793 +3041,968 @@ }; /** - * Decodes a DeviceState message from the specified reader or buffer, length delimited. + * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceState.decodeDelimited = function decodeDelimited(reader) { + ListDevicesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceState message. + * Verifies a ListDevicesRequest message. * @function verify - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceState.verify = function verify(message) { + ListDevicesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deviceNumIds != null && message.hasOwnProperty("deviceNumIds")) { + if (!Array.isArray(message.deviceNumIds)) + return "deviceNumIds: array expected"; + for (var i = 0; i < message.deviceNumIds.length; ++i) + if (!$util.isInteger(message.deviceNumIds[i]) && !(message.deviceNumIds[i] && $util.isInteger(message.deviceNumIds[i].low) && $util.isInteger(message.deviceNumIds[i].high))) + return "deviceNumIds: integer|Long[] expected"; + } + if (message.deviceIds != null && message.hasOwnProperty("deviceIds")) { + if (!Array.isArray(message.deviceIds)) + return "deviceIds: array expected"; + for (var i = 0; i < message.deviceIds.length; ++i) + if (!$util.isString(message.deviceIds[i])) + return "deviceIds: string[] expected"; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) - return "updateTime." + error; + return "fieldMask." + error; } - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) { + var error = $root.google.cloud.iot.v1.GatewayListOptions.verify(message.gatewayListOptions); + if (error) + return "gatewayListOptions." + 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 DeviceState message from a plain object. Also converts values to their respective internal types. + * Creates a ListDevicesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeviceState} DeviceState + * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest */ - DeviceState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeviceState) + ListDevicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDevicesRequest) return object; - var message = new $root.google.cloud.iot.v1.DeviceState(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.iot.v1.DeviceState.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.cloud.iot.v1.ListDevicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deviceNumIds) { + if (!Array.isArray(object.deviceNumIds)) + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceNumIds: array expected"); + message.deviceNumIds = []; + for (var i = 0; i < object.deviceNumIds.length; ++i) + if ($util.Long) + (message.deviceNumIds[i] = $util.Long.fromValue(object.deviceNumIds[i])).unsigned = true; + else if (typeof object.deviceNumIds[i] === "string") + message.deviceNumIds[i] = parseInt(object.deviceNumIds[i], 10); + else if (typeof object.deviceNumIds[i] === "number") + message.deviceNumIds[i] = object.deviceNumIds[i]; + else if (typeof object.deviceNumIds[i] === "object") + message.deviceNumIds[i] = new $util.LongBits(object.deviceNumIds[i].low >>> 0, object.deviceNumIds[i].high >>> 0).toNumber(true); } - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; + if (object.deviceIds) { + if (!Array.isArray(object.deviceIds)) + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceIds: array expected"); + message.deviceIds = []; + for (var i = 0; i < object.deviceIds.length; ++i) + message.deviceIds[i] = String(object.deviceIds[i]); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + if (object.gatewayListOptions != null) { + if (typeof object.gatewayListOptions !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.gatewayListOptions: object expected"); + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.fromObject(object.gatewayListOptions); + } + 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 DeviceState message. Also converts values to other types if specified. + * Creates a plain object from a ListDevicesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeviceState + * @memberof google.cloud.iot.v1.ListDevicesRequest * @static - * @param {google.cloud.iot.v1.DeviceState} message DeviceState + * @param {google.cloud.iot.v1.ListDevicesRequest} message ListDevicesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceState.toObject = function toObject(message, options) { + ListDevicesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.deviceNumIds = []; + object.deviceIds = []; + } if (options.defaults) { - object.updateTime = null; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } + object.parent = ""; + object.fieldMask = null; + object.gatewayListOptions = null; + object.pageSize = 0; + object.pageToken = ""; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; - return object; - }; - - /** - * Converts this DeviceState to JSON. - * @function toJSON - * @memberof google.cloud.iot.v1.DeviceState - * @instance - * @returns {Object.} JSON object - */ - DeviceState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeviceState; - })(); - - v1.DeviceManager = (function() { - - /** - * Constructs a new DeviceManager service. - * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeviceManager - * @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 DeviceManager(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DeviceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceManager; - - /** - * Creates new DeviceManager service using the specified rpc implementation. - * @function create - * @memberof google.cloud.iot.v1.DeviceManager - * @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 {DeviceManager} RPC service. Useful where requests and/or responses are streamed. - */ - DeviceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef CreateDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry - */ - - /** - * Calls CreateDeviceRegistry. - * @function createDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DeviceManager.prototype.createDeviceRegistry = function createDeviceRegistry(request, callback) { - return this.rpcCall(createDeviceRegistry, $root.google.cloud.iot.v1.CreateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); - }, "name", { value: "CreateDeviceRegistry" }); - - /** - * Calls CreateDeviceRegistry. - * @function createDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} request CreateDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef GetDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry - */ - - /** - * Calls GetDeviceRegistry. - * @function getDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.GetDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DeviceManager.prototype.getDeviceRegistry = function getDeviceRegistry(request, callback) { - return this.rpcCall(getDeviceRegistry, $root.google.cloud.iot.v1.GetDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); - }, "name", { value: "GetDeviceRegistry" }); - - /** - * Calls GetDeviceRegistry. - * @function getDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} request GetDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef UpdateDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceRegistry} [response] DeviceRegistry - */ - - /** - * Calls UpdateDeviceRegistry. - * @function updateDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistryCallback} callback Node-style callback called with the error, if any, and DeviceRegistry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DeviceManager.prototype.updateDeviceRegistry = function updateDeviceRegistry(request, callback) { - return this.rpcCall(updateDeviceRegistry, $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest, $root.google.cloud.iot.v1.DeviceRegistry, request, callback); - }, "name", { value: "UpdateDeviceRegistry" }); - - /** - * Calls UpdateDeviceRegistry. - * @function updateDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} request UpdateDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef DeleteDeviceRegistryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deviceNumIds && message.deviceNumIds.length) { + object.deviceNumIds = []; + for (var j = 0; j < message.deviceNumIds.length; ++j) + if (typeof message.deviceNumIds[j] === "number") + object.deviceNumIds[j] = options.longs === String ? String(message.deviceNumIds[j]) : message.deviceNumIds[j]; + else + object.deviceNumIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.deviceNumIds[j]) : options.longs === Number ? new $util.LongBits(message.deviceNumIds[j].low >>> 0, message.deviceNumIds[j].high >>> 0).toNumber(true) : message.deviceNumIds[j]; + } + if (message.deviceIds && message.deviceIds.length) { + object.deviceIds = []; + for (var j = 0; j < message.deviceIds.length; ++j) + object.deviceIds[j] = message.deviceIds[j]; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + object.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.toObject(message.gatewayListOptions, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; /** - * Calls DeleteDeviceRegistry. - * @function deleteDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this ListDevicesRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDevicesRequest * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistryCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DeviceManager.prototype.deleteDeviceRegistry = function deleteDeviceRegistry(request, callback) { - return this.rpcCall(deleteDeviceRegistry, $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDeviceRegistry" }); + ListDevicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls DeleteDeviceRegistry. - * @function deleteDeviceRegistry - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} request DeleteDeviceRegistryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ListDevicesRequest; + })(); - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDeviceRegistriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} [response] ListDeviceRegistriesResponse - */ + v1.GatewayListOptions = (function() { /** - * Calls ListDeviceRegistries. - * @function listDeviceRegistries - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDeviceRegistriesCallback} callback Node-style callback called with the error, if any, and ListDeviceRegistriesResponse - * @returns {undefined} - * @variation 1 + * Properties of a GatewayListOptions. + * @memberof google.cloud.iot.v1 + * @interface IGatewayListOptions + * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayListOptions gatewayType + * @property {string|null} [associationsGatewayId] GatewayListOptions associationsGatewayId + * @property {string|null} [associationsDeviceId] GatewayListOptions associationsDeviceId */ - Object.defineProperty(DeviceManager.prototype.listDeviceRegistries = function listDeviceRegistries(request, callback) { - return this.rpcCall(listDeviceRegistries, $root.google.cloud.iot.v1.ListDeviceRegistriesRequest, $root.google.cloud.iot.v1.ListDeviceRegistriesResponse, request, callback); - }, "name", { value: "ListDeviceRegistries" }); /** - * Calls ListDeviceRegistries. - * @function listDeviceRegistries - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} request ListDeviceRegistriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new GatewayListOptions. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a GatewayListOptions. + * @implements IGatewayListOptions + * @constructor + * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set */ + function GatewayListOptions(properties) { + if (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.cloud.iot.v1.DeviceManager#createDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef CreateDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.Device} [response] Device + * GatewayListOptions gatewayType. + * @member {google.cloud.iot.v1.GatewayType} gatewayType + * @memberof google.cloud.iot.v1.GatewayListOptions + * @instance */ + GatewayListOptions.prototype.gatewayType = 0; /** - * Calls CreateDevice. - * @function createDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayListOptions associationsGatewayId. + * @member {string} associationsGatewayId + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.CreateDeviceCallback} callback Node-style callback called with the error, if any, and Device - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.createDevice = function createDevice(request, callback) { - return this.rpcCall(createDevice, $root.google.cloud.iot.v1.CreateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); - }, "name", { value: "CreateDevice" }); + GatewayListOptions.prototype.associationsGatewayId = ""; /** - * Calls CreateDevice. - * @function createDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayListOptions associationsDeviceId. + * @member {string} associationsDeviceId + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance - * @param {google.cloud.iot.v1.ICreateDeviceRequest} request CreateDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GatewayListOptions.prototype.associationsDeviceId = ""; - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef GetDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.Device} [response] Device - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls GetDevice. - * @function getDevice - * @memberof google.cloud.iot.v1.DeviceManager + * GatewayListOptions filter. + * @member {"gatewayType"|"associationsGatewayId"|"associationsDeviceId"|undefined} filter + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance - * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.GetDeviceCallback} callback Node-style callback called with the error, if any, and Device - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.getDevice = function getDevice(request, callback) { - return this.rpcCall(getDevice, $root.google.cloud.iot.v1.GetDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); - }, "name", { value: "GetDevice" }); + Object.defineProperty(GatewayListOptions.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["gatewayType", "associationsGatewayId", "associationsDeviceId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Calls GetDevice. - * @function getDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IGetDeviceRequest} request GetDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GatewayListOptions instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions instance */ + GatewayListOptions.create = function create(properties) { + return new GatewayListOptions(properties); + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef UpdateDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.Device} [response] Device + * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GatewayListOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.associationsGatewayId); + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.associationsDeviceId); + return writer; + }; /** - * Calls UpdateDevice. - * @function updateDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.UpdateDeviceCallback} callback Node-style callback called with the error, if any, and Device - * @returns {undefined} - * @variation 1 + * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DeviceManager.prototype.updateDevice = function updateDevice(request, callback) { - return this.rpcCall(updateDevice, $root.google.cloud.iot.v1.UpdateDeviceRequest, $root.google.cloud.iot.v1.Device, request, callback); - }, "name", { value: "UpdateDevice" }); + GatewayListOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateDevice. - * @function updateDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} request UpdateDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GatewayListOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GatewayListOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayListOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gatewayType = reader.int32(); + break; + case 2: + message.associationsGatewayId = reader.string(); + break; + case 3: + message.associationsDeviceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef DeleteDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GatewayListOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteDevice. - * @function deleteDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.DeleteDeviceCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies a GatewayListOptions message. + * @function verify + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DeviceManager.prototype.deleteDevice = function deleteDevice(request, callback) { - return this.rpcCall(deleteDevice, $root.google.cloud.iot.v1.DeleteDeviceRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDevice" }); + GatewayListOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { + properties.filter = 1; + switch (message.gatewayType) { + default: + return "gatewayType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.associationsGatewayId)) + return "associationsGatewayId: string expected"; + } + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.associationsDeviceId)) + return "associationsDeviceId: string expected"; + } + return null; + }; /** - * Calls DeleteDevice. - * @function deleteDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} request DeleteDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions */ + GatewayListOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GatewayListOptions) + return object; + var message = new $root.google.cloud.iot.v1.GatewayListOptions(); + switch (object.gatewayType) { + case "GATEWAY_TYPE_UNSPECIFIED": + case 0: + message.gatewayType = 0; + break; + case "GATEWAY": + case 1: + message.gatewayType = 1; + break; + case "NON_GATEWAY": + case 2: + message.gatewayType = 2; + break; + } + if (object.associationsGatewayId != null) + message.associationsGatewayId = String(object.associationsGatewayId); + if (object.associationsDeviceId != null) + message.associationsDeviceId = String(object.associationsDeviceId); + return message; + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDevicesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDevicesResponse} [response] ListDevicesResponse + * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {google.cloud.iot.v1.GatewayListOptions} message GatewayListOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GatewayListOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + if (options.oneofs) + object.filter = "gatewayType"; + } + if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { + object.associationsGatewayId = message.associationsGatewayId; + if (options.oneofs) + object.filter = "associationsGatewayId"; + } + if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { + object.associationsDeviceId = message.associationsDeviceId; + if (options.oneofs) + object.filter = "associationsDeviceId"; + } + return object; + }; /** - * Calls ListDevices. - * @function listDevices - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this GatewayListOptions to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.GatewayListOptions * @instance - * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDevicesCallback} callback Node-style callback called with the error, if any, and ListDevicesResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DeviceManager.prototype.listDevices = function listDevices(request, callback) { - return this.rpcCall(listDevices, $root.google.cloud.iot.v1.ListDevicesRequest, $root.google.cloud.iot.v1.ListDevicesResponse, request, callback); - }, "name", { value: "ListDevices" }); + GatewayListOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GatewayListOptions; + })(); + + v1.ListDevicesResponse = (function() { /** - * Calls ListDevices. - * @function listDevices - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDevicesRequest} request ListDevicesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a ListDevicesResponse. + * @memberof google.cloud.iot.v1 + * @interface IListDevicesResponse + * @property {Array.|null} [devices] ListDevicesResponse devices + * @property {string|null} [nextPageToken] ListDevicesResponse nextPageToken */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ModifyCloudToDeviceConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.DeviceConfig} [response] DeviceConfig + * Constructs a new ListDevicesResponse. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ListDevicesResponse. + * @implements IListDevicesResponse + * @constructor + * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set */ + function ListDevicesResponse(properties) { + this.devices = []; + if (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 ModifyCloudToDeviceConfig. - * @function modifyCloudToDeviceConfig - * @memberof google.cloud.iot.v1.DeviceManager + * ListDevicesResponse devices. + * @member {Array.} devices + * @memberof google.cloud.iot.v1.ListDevicesResponse * @instance - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfigCallback} callback Node-style callback called with the error, if any, and DeviceConfig - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.modifyCloudToDeviceConfig = function modifyCloudToDeviceConfig(request, callback) { - return this.rpcCall(modifyCloudToDeviceConfig, $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest, $root.google.cloud.iot.v1.DeviceConfig, request, callback); - }, "name", { value: "ModifyCloudToDeviceConfig" }); + ListDevicesResponse.prototype.devices = $util.emptyArray; /** - * Calls ModifyCloudToDeviceConfig. - * @function modifyCloudToDeviceConfig - * @memberof google.cloud.iot.v1.DeviceManager + * ListDevicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iot.v1.ListDevicesResponse * @instance - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} request ModifyCloudToDeviceConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListDevicesResponse.prototype.nextPageToken = ""; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDeviceConfigVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} [response] ListDeviceConfigVersionsResponse + * Creates a new ListDevicesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse instance */ + ListDevicesResponse.create = function create(properties) { + return new ListDevicesResponse(properties); + }; /** - * Calls ListDeviceConfigVersions. - * @function listDeviceConfigVersions - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersionsCallback} callback Node-style callback called with the error, if any, and ListDeviceConfigVersionsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DeviceManager.prototype.listDeviceConfigVersions = function listDeviceConfigVersions(request, callback) { - return this.rpcCall(listDeviceConfigVersions, $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest, $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse, request, callback); - }, "name", { value: "ListDeviceConfigVersions" }); + ListDevicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.devices != null && message.devices.length) + for (var i = 0; i < message.devices.length; ++i) + $root.google.cloud.iot.v1.Device.encode(message.devices[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; + }; /** - * Calls ListDeviceConfigVersions. - * @function listDeviceConfigVersions - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} request ListDeviceConfigVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef ListDeviceStatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.ListDeviceStatesResponse} [response] ListDeviceStatesResponse + * Decodes a ListDevicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListDevicesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.devices && message.devices.length)) + message.devices = []; + message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListDeviceStates. - * @function listDeviceStates - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.ListDeviceStatesCallback} callback Node-style callback called with the error, if any, and ListDeviceStatesResponse - * @returns {undefined} - * @variation 1 + * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DeviceManager.prototype.listDeviceStates = function listDeviceStates(request, callback) { - return this.rpcCall(listDeviceStates, $root.google.cloud.iot.v1.ListDeviceStatesRequest, $root.google.cloud.iot.v1.ListDeviceStatesResponse, request, callback); - }, "name", { value: "ListDeviceStates" }); + ListDevicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListDeviceStates. - * @function listDeviceStates - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} request ListDeviceStatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListDevicesResponse message. + * @function verify + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListDevicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.devices != null && message.hasOwnProperty("devices")) { + if (!Array.isArray(message.devices)) + return "devices: array expected"; + for (var i = 0; i < message.devices.length; ++i) { + var error = $root.google.cloud.iot.v1.Device.verify(message.devices[i]); + if (error) + return "devices." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse */ + ListDevicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDevicesResponse) + return object; + var message = new $root.google.cloud.iot.v1.ListDevicesResponse(); + if (object.devices) { + if (!Array.isArray(object.devices)) + throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: array expected"); + message.devices = []; + for (var i = 0; i < object.devices.length; ++i) { + if (typeof object.devices[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: object expected"); + message.devices[i] = $root.google.cloud.iot.v1.Device.fromObject(object.devices[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {google.cloud.iot.v1.ListDevicesResponse} message ListDevicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DeviceManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); + ListDevicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.devices = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.devices && message.devices.length) { + object.devices = []; + for (var j = 0; j < message.devices.length; ++j) + object.devices[j] = $root.google.cloud.iot.v1.Device.toObject(message.devices[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this ListDevicesResponse to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ListDevicesResponse * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListDevicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ + return ListDevicesResponse; + })(); + + v1.ModifyCloudToDeviceConfigRequest = (function() { /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Properties of a ModifyCloudToDeviceConfigRequest. + * @memberof google.cloud.iot.v1 + * @interface IModifyCloudToDeviceConfigRequest + * @property {string|null} [name] ModifyCloudToDeviceConfigRequest name + * @property {number|Long|null} [versionToUpdate] ModifyCloudToDeviceConfigRequest versionToUpdate + * @property {Uint8Array|null} [binaryData] ModifyCloudToDeviceConfigRequest binaryData */ - Object.defineProperty(DeviceManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ModifyCloudToDeviceConfigRequest. + * @memberof google.cloud.iot.v1 + * @classdesc Represents a ModifyCloudToDeviceConfigRequest. + * @implements IModifyCloudToDeviceConfigRequest + * @constructor + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set */ + function ModifyCloudToDeviceConfigRequest(properties) { + if (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.cloud.iot.v1.DeviceManager#testIamPermissions}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + * ModifyCloudToDeviceConfigRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @instance */ + ModifyCloudToDeviceConfigRequest.prototype.name = ""; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.iot.v1.DeviceManager + * ModifyCloudToDeviceConfigRequest versionToUpdate. + * @member {number|Long} versionToUpdate + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); + ModifyCloudToDeviceConfigRequest.prototype.versionToUpdate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.iot.v1.DeviceManager + /** + * ModifyCloudToDeviceConfigRequest binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ModifyCloudToDeviceConfigRequest.prototype.binaryData = $util.newBuffer([]); /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef SendCommandToDeviceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} [response] SendCommandToDeviceResponse + * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest instance */ + ModifyCloudToDeviceConfigRequest.create = function create(properties) { + return new ModifyCloudToDeviceConfigRequest(properties); + }; /** - * Calls SendCommandToDevice. - * @function sendCommandToDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.SendCommandToDeviceCallback} callback Node-style callback called with the error, if any, and SendCommandToDeviceResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DeviceManager.prototype.sendCommandToDevice = function sendCommandToDevice(request, callback) { - return this.rpcCall(sendCommandToDevice, $root.google.cloud.iot.v1.SendCommandToDeviceRequest, $root.google.cloud.iot.v1.SendCommandToDeviceResponse, request, callback); - }, "name", { value: "SendCommandToDevice" }); + ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.versionToUpdate); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.binaryData); + return writer; + }; /** - * Calls SendCommandToDevice. - * @function sendCommandToDevice - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} request SendCommandToDeviceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ModifyCloudToDeviceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef BindDeviceToGatewayCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} [response] BindDeviceToGatewayResponse + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ModifyCloudToDeviceConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.versionToUpdate = reader.int64(); + break; + case 3: + message.binaryData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls BindDeviceToGateway. - * @function bindDeviceToGateway - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.BindDeviceToGatewayCallback} callback Node-style callback called with the error, if any, and BindDeviceToGatewayResponse - * @returns {undefined} - * @variation 1 + * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DeviceManager.prototype.bindDeviceToGateway = function bindDeviceToGateway(request, callback) { - return this.rpcCall(bindDeviceToGateway, $root.google.cloud.iot.v1.BindDeviceToGatewayRequest, $root.google.cloud.iot.v1.BindDeviceToGatewayResponse, request, callback); - }, "name", { value: "BindDeviceToGateway" }); + ModifyCloudToDeviceConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls BindDeviceToGateway. - * @function bindDeviceToGateway - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} request BindDeviceToGatewayRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ModifyCloudToDeviceConfigRequest message. + * @function verify + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (!$util.isInteger(message.versionToUpdate) && !(message.versionToUpdate && $util.isInteger(message.versionToUpdate.low) && $util.isInteger(message.versionToUpdate.high))) + return "versionToUpdate: integer|Long expected"; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. - * @memberof google.cloud.iot.v1.DeviceManager - * @typedef UnbindDeviceFromGatewayCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} [response] UnbindDeviceFromGatewayResponse + * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest */ + ModifyCloudToDeviceConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest) + return object; + var message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.versionToUpdate != null) + if ($util.Long) + (message.versionToUpdate = $util.Long.fromValue(object.versionToUpdate)).unsigned = false; + else if (typeof object.versionToUpdate === "string") + message.versionToUpdate = parseInt(object.versionToUpdate, 10); + else if (typeof object.versionToUpdate === "number") + message.versionToUpdate = object.versionToUpdate; + else if (typeof object.versionToUpdate === "object") + message.versionToUpdate = new $util.LongBits(object.versionToUpdate.low >>> 0, object.versionToUpdate.high >>> 0).toNumber(); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + return message; + }; /** - * Calls UnbindDeviceFromGateway. - * @function unbindDeviceFromGateway - * @memberof google.cloud.iot.v1.DeviceManager - * @instance - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object - * @param {google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGatewayCallback} callback Node-style callback called with the error, if any, and UnbindDeviceFromGatewayResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DeviceManager.prototype.unbindDeviceFromGateway = function unbindDeviceFromGateway(request, callback) { - return this.rpcCall(unbindDeviceFromGateway, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest, $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse, request, callback); - }, "name", { value: "UnbindDeviceFromGateway" }); + ModifyCloudToDeviceConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionToUpdate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionToUpdate = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (typeof message.versionToUpdate === "number") + object.versionToUpdate = options.longs === String ? String(message.versionToUpdate) : message.versionToUpdate; + else + object.versionToUpdate = options.longs === String ? $util.Long.prototype.toString.call(message.versionToUpdate) : options.longs === Number ? new $util.LongBits(message.versionToUpdate.low >>> 0, message.versionToUpdate.high >>> 0).toNumber() : message.versionToUpdate; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + return object; + }; /** - * Calls UnbindDeviceFromGateway. - * @function unbindDeviceFromGateway - * @memberof google.cloud.iot.v1.DeviceManager + * Converts this ModifyCloudToDeviceConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest * @instance - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} request UnbindDeviceFromGatewayRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ModifyCloudToDeviceConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeviceManager; + return ModifyCloudToDeviceConfigRequest; })(); - v1.CreateDeviceRegistryRequest = (function() { + v1.ListDeviceConfigVersionsRequest = (function() { /** - * Properties of a CreateDeviceRegistryRequest. + * Properties of a ListDeviceConfigVersionsRequest. * @memberof google.cloud.iot.v1 - * @interface ICreateDeviceRegistryRequest - * @property {string|null} [parent] CreateDeviceRegistryRequest parent - * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] CreateDeviceRegistryRequest deviceRegistry + * @interface IListDeviceConfigVersionsRequest + * @property {string|null} [name] ListDeviceConfigVersionsRequest name + * @property {number|null} [numVersions] ListDeviceConfigVersionsRequest numVersions */ /** - * Constructs a new CreateDeviceRegistryRequest. + * Constructs a new ListDeviceConfigVersionsRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a CreateDeviceRegistryRequest. - * @implements ICreateDeviceRegistryRequest + * @classdesc Represents a ListDeviceConfigVersionsRequest. + * @implements IListDeviceConfigVersionsRequest * @constructor - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set */ - function CreateDeviceRegistryRequest(properties) { + function ListDeviceConfigVersionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4843,88 +4010,88 @@ } /** - * CreateDeviceRegistryRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * ListDeviceConfigVersionsRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @instance */ - CreateDeviceRegistryRequest.prototype.parent = ""; + ListDeviceConfigVersionsRequest.prototype.name = ""; /** - * CreateDeviceRegistryRequest deviceRegistry. - * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * ListDeviceConfigVersionsRequest numVersions. + * @member {number} numVersions + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @instance */ - CreateDeviceRegistryRequest.prototype.deviceRegistry = null; + ListDeviceConfigVersionsRequest.prototype.numVersions = 0; /** - * Creates a new CreateDeviceRegistryRequest instance using the specified properties. + * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest instance */ - CreateDeviceRegistryRequest.create = function create(properties) { - return new CreateDeviceRegistryRequest(properties); + ListDeviceConfigVersionsRequest.create = function create(properties) { + return new ListDeviceConfigVersionsRequest(properties); }; /** - * Encodes the specified CreateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRegistryRequest.encode = function encode(message, writer) { + ListDeviceConfigVersionsRequest.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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.numVersions != null && message.hasOwnProperty("numVersions")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numVersions); return writer; }; /** - * Encodes the specified CreateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.ICreateDeviceRegistryRequest} message CreateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceConfigVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRegistryRequest.decode = function decode(reader, length) { + ListDeviceConfigVersionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); 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.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + message.numVersions = reader.int32(); break; default: reader.skipType(tag & 7); @@ -4935,121 +4102,117 @@ }; /** - * Decodes a CreateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeviceConfigVersionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDeviceRegistryRequest message. + * Verifies a ListDeviceConfigVersionsRequest message. * @function verify - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDeviceRegistryRequest.verify = function verify(message) { + ListDeviceConfigVersionsRequest.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { - var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); - if (error) - return "deviceRegistry." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.numVersions != null && message.hasOwnProperty("numVersions")) + if (!$util.isInteger(message.numVersions)) + return "numVersions: integer expected"; return null; }; /** - * Creates a CreateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.CreateDeviceRegistryRequest} CreateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest */ - CreateDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRegistryRequest) + ListDeviceConfigVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest) return object; - var message = new $root.google.cloud.iot.v1.CreateDeviceRegistryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deviceRegistry != null) { - if (typeof object.deviceRegistry !== "object") - throw TypeError(".google.cloud.iot.v1.CreateDeviceRegistryRequest.deviceRegistry: object expected"); - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); - } + var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.numVersions != null) + message.numVersions = object.numVersions | 0; return message; }; /** - * Creates a plain object from a CreateDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @static - * @param {google.cloud.iot.v1.CreateDeviceRegistryRequest} message CreateDeviceRegistryRequest + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDeviceRegistryRequest.toObject = function toObject(message, options) { + ListDeviceConfigVersionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.deviceRegistry = null; + object.name = ""; + object.numVersions = 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numVersions != null && message.hasOwnProperty("numVersions")) + object.numVersions = message.numVersions; return object; }; /** - * Converts this CreateDeviceRegistryRequest to JSON. + * Converts this ListDeviceConfigVersionsRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest * @instance * @returns {Object.} JSON object */ - CreateDeviceRegistryRequest.prototype.toJSON = function toJSON() { + ListDeviceConfigVersionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDeviceRegistryRequest; + return ListDeviceConfigVersionsRequest; })(); - v1.GetDeviceRegistryRequest = (function() { + v1.ListDeviceConfigVersionsResponse = (function() { /** - * Properties of a GetDeviceRegistryRequest. + * Properties of a ListDeviceConfigVersionsResponse. * @memberof google.cloud.iot.v1 - * @interface IGetDeviceRegistryRequest - * @property {string|null} [name] GetDeviceRegistryRequest name + * @interface IListDeviceConfigVersionsResponse + * @property {Array.|null} [deviceConfigs] ListDeviceConfigVersionsResponse deviceConfigs */ /** - * Constructs a new GetDeviceRegistryRequest. + * Constructs a new ListDeviceConfigVersionsResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a GetDeviceRegistryRequest. - * @implements IGetDeviceRegistryRequest + * @classdesc Represents a ListDeviceConfigVersionsResponse. + * @implements IListDeviceConfigVersionsResponse * @constructor - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set */ - function GetDeviceRegistryRequest(properties) { + function ListDeviceConfigVersionsResponse(properties) { + this.deviceConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5057,75 +4220,78 @@ } /** - * GetDeviceRegistryRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * ListDeviceConfigVersionsResponse deviceConfigs. + * @member {Array.} deviceConfigs + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @instance */ - GetDeviceRegistryRequest.prototype.name = ""; + ListDeviceConfigVersionsResponse.prototype.deviceConfigs = $util.emptyArray; /** - * Creates a new GetDeviceRegistryRequest instance using the specified properties. + * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse instance */ - GetDeviceRegistryRequest.create = function create(properties) { - return new GetDeviceRegistryRequest(properties); + ListDeviceConfigVersionsResponse.create = function create(properties) { + return new ListDeviceConfigVersionsResponse(properties); }; /** - * Encodes the specified GetDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRegistryRequest.encode = function encode(message, writer) { + ListDeviceConfigVersionsResponse.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.deviceConfigs != null && message.deviceConfigs.length) + for (var i = 0; i < message.deviceConfigs.length; ++i) + $root.google.cloud.iot.v1.DeviceConfig.encode(message.deviceConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.IGetDeviceRegistryRequest} message GetDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceConfigVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRegistryRequest.decode = function decode(reader, length) { + ListDeviceConfigVersionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.deviceConfigs && message.deviceConfigs.length)) + message.deviceConfigs = []; + message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -5136,107 +4302,125 @@ }; /** - * Decodes a GetDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeviceConfigVersionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeviceRegistryRequest message. + * Verifies a ListDeviceConfigVersionsResponse message. * @function verify - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeviceRegistryRequest.verify = function verify(message) { + ListDeviceConfigVersionsResponse.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 "object expected"; + if (message.deviceConfigs != null && message.hasOwnProperty("deviceConfigs")) { + if (!Array.isArray(message.deviceConfigs)) + return "deviceConfigs: array expected"; + for (var i = 0; i < message.deviceConfigs.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.deviceConfigs[i]); + if (error) + return "deviceConfigs." + error; + } + } return null; }; /** - * Creates a GetDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GetDeviceRegistryRequest} GetDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse */ - GetDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GetDeviceRegistryRequest) + ListDeviceConfigVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse) return object; - var message = new $root.google.cloud.iot.v1.GetDeviceRegistryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); + if (object.deviceConfigs) { + if (!Array.isArray(object.deviceConfigs)) + throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: array expected"); + message.deviceConfigs = []; + for (var i = 0; i < object.deviceConfigs.length; ++i) { + if (typeof object.deviceConfigs[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: object expected"); + message.deviceConfigs[i] = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.deviceConfigs[i]); + } + } return message; }; /** - * Creates a plain object from a GetDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @static - * @param {google.cloud.iot.v1.GetDeviceRegistryRequest} message GetDeviceRegistryRequest + * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeviceRegistryRequest.toObject = function toObject(message, options) { + ListDeviceConfigVersionsResponse.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.arrays || options.defaults) + object.deviceConfigs = []; + if (message.deviceConfigs && message.deviceConfigs.length) { + object.deviceConfigs = []; + for (var j = 0; j < message.deviceConfigs.length; ++j) + object.deviceConfigs[j] = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.deviceConfigs[j], options); + } return object; }; /** - * Converts this GetDeviceRegistryRequest to JSON. + * Converts this ListDeviceConfigVersionsResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse * @instance * @returns {Object.} JSON object */ - GetDeviceRegistryRequest.prototype.toJSON = function toJSON() { + ListDeviceConfigVersionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDeviceRegistryRequest; + return ListDeviceConfigVersionsResponse; })(); - v1.DeleteDeviceRegistryRequest = (function() { + v1.ListDeviceStatesRequest = (function() { /** - * Properties of a DeleteDeviceRegistryRequest. + * Properties of a ListDeviceStatesRequest. * @memberof google.cloud.iot.v1 - * @interface IDeleteDeviceRegistryRequest - * @property {string|null} [name] DeleteDeviceRegistryRequest name + * @interface IListDeviceStatesRequest + * @property {string|null} [name] ListDeviceStatesRequest name + * @property {number|null} [numStates] ListDeviceStatesRequest numStates */ /** - * Constructs a new DeleteDeviceRegistryRequest. + * Constructs a new ListDeviceStatesRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeleteDeviceRegistryRequest. - * @implements IDeleteDeviceRegistryRequest + * @classdesc Represents a ListDeviceStatesRequest. + * @implements IListDeviceStatesRequest * @constructor - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set */ - function DeleteDeviceRegistryRequest(properties) { + function ListDeviceStatesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5244,76 +4428,89 @@ } /** - * DeleteDeviceRegistryRequest name. + * ListDeviceStatesRequest name. * @member {string} name - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @instance */ - DeleteDeviceRegistryRequest.prototype.name = ""; + ListDeviceStatesRequest.prototype.name = ""; /** - * Creates a new DeleteDeviceRegistryRequest instance using the specified properties. + * ListDeviceStatesRequest numStates. + * @member {number} numStates + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @instance + */ + ListDeviceStatesRequest.prototype.numStates = 0; + + /** + * Creates a new ListDeviceStatesRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest instance */ - DeleteDeviceRegistryRequest.create = function create(properties) { - return new DeleteDeviceRegistryRequest(properties); + ListDeviceStatesRequest.create = function create(properties) { + return new ListDeviceStatesRequest(properties); }; /** - * Encodes the specified DeleteDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRegistryRequest.encode = function encode(message, writer) { + ListDeviceStatesRequest.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.numStates != null && message.hasOwnProperty("numStates")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numStates); return writer; }; /** - * Encodes the specified DeleteDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRegistryRequest.decode = function decode(reader, length) { + ListDeviceStatesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.numStates = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -5323,108 +4520,117 @@ }; /** - * Decodes a DeleteDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeviceStatesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDeviceRegistryRequest message. + * Verifies a ListDeviceStatesRequest message. * @function verify - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDeviceRegistryRequest.verify = function verify(message) { + ListDeviceStatesRequest.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.numStates != null && message.hasOwnProperty("numStates")) + if (!$util.isInteger(message.numStates)) + return "numStates: integer expected"; return null; }; /** - * Creates a DeleteDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeleteDeviceRegistryRequest} DeleteDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest */ - DeleteDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest) + ListDeviceStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesRequest) return object; - var message = new $root.google.cloud.iot.v1.DeleteDeviceRegistryRequest(); + var message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); if (object.name != null) message.name = String(object.name); + if (object.numStates != null) + message.numStates = object.numStates | 0; return message; }; /** - * Creates a plain object from a DeleteDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @static - * @param {google.cloud.iot.v1.DeleteDeviceRegistryRequest} message DeleteDeviceRegistryRequest + * @param {google.cloud.iot.v1.ListDeviceStatesRequest} message ListDeviceStatesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDeviceRegistryRequest.toObject = function toObject(message, options) { + ListDeviceStatesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.numStates = 0; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.numStates != null && message.hasOwnProperty("numStates")) + object.numStates = message.numStates; return object; }; /** - * Converts this DeleteDeviceRegistryRequest to JSON. + * Converts this ListDeviceStatesRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest * @instance * @returns {Object.} JSON object */ - DeleteDeviceRegistryRequest.prototype.toJSON = function toJSON() { + ListDeviceStatesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDeviceRegistryRequest; + return ListDeviceStatesRequest; })(); - v1.UpdateDeviceRegistryRequest = (function() { + v1.ListDeviceStatesResponse = (function() { /** - * Properties of an UpdateDeviceRegistryRequest. + * Properties of a ListDeviceStatesResponse. * @memberof google.cloud.iot.v1 - * @interface IUpdateDeviceRegistryRequest - * @property {google.cloud.iot.v1.IDeviceRegistry|null} [deviceRegistry] UpdateDeviceRegistryRequest deviceRegistry - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRegistryRequest updateMask + * @interface IListDeviceStatesResponse + * @property {Array.|null} [deviceStates] ListDeviceStatesResponse deviceStates */ /** - * Constructs a new UpdateDeviceRegistryRequest. + * Constructs a new ListDeviceStatesResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UpdateDeviceRegistryRequest. - * @implements IUpdateDeviceRegistryRequest + * @classdesc Represents a ListDeviceStatesResponse. + * @implements IListDeviceStatesResponse * @constructor - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set */ - function UpdateDeviceRegistryRequest(properties) { + function ListDeviceStatesResponse(properties) { + this.deviceStates = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5432,88 +4638,78 @@ } /** - * UpdateDeviceRegistryRequest deviceRegistry. - * @member {google.cloud.iot.v1.IDeviceRegistry|null|undefined} deviceRegistry - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest - * @instance - */ - UpdateDeviceRegistryRequest.prototype.deviceRegistry = null; - - /** - * UpdateDeviceRegistryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * ListDeviceStatesResponse deviceStates. + * @member {Array.} deviceStates + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @instance */ - UpdateDeviceRegistryRequest.prototype.updateMask = null; + ListDeviceStatesResponse.prototype.deviceStates = $util.emptyArray; /** - * Creates a new UpdateDeviceRegistryRequest instance using the specified properties. + * Creates a new ListDeviceStatesResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest instance + * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse instance */ - UpdateDeviceRegistryRequest.create = function create(properties) { - return new UpdateDeviceRegistryRequest(properties); + ListDeviceStatesResponse.create = function create(properties) { + return new ListDeviceStatesResponse(properties); }; /** - * Encodes the specified UpdateDeviceRegistryRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRegistryRequest.encode = function encode(message, writer) { + ListDeviceStatesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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.deviceStates != null && message.deviceStates.length) + for (var i = 0; i < message.deviceStates.length; ++i) + $root.google.cloud.iot.v1.DeviceState.encode(message.deviceStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateDeviceRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRegistryRequest.verify|verify} messages. + * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest message or plain object to encode + * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRegistryRequest.decode = function decode(reader, length) { + ListDeviceStatesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.deviceStates && message.deviceStates.length)) + message.deviceStates = []; + message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -5524,128 +4720,126 @@ }; /** - * Decodes an UpdateDeviceRegistryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeviceStatesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDeviceRegistryRequest message. + * Verifies a ListDeviceStatesResponse message. * @function verify - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDeviceRegistryRequest.verify = function verify(message) { + ListDeviceStatesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) { - var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistry); - if (error) - return "deviceRegistry." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.deviceStates != null && message.hasOwnProperty("deviceStates")) { + if (!Array.isArray(message.deviceStates)) + return "deviceStates: array expected"; + for (var i = 0; i < message.deviceStates.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceState.verify(message.deviceStates[i]); + if (error) + return "deviceStates." + error; + } } return null; }; /** - * Creates an UpdateDeviceRegistryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UpdateDeviceRegistryRequest} UpdateDeviceRegistryRequest + * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse */ - UpdateDeviceRegistryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest) + ListDeviceStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesResponse) return object; - var message = new $root.google.cloud.iot.v1.UpdateDeviceRegistryRequest(); - if (object.deviceRegistry != null) { - if (typeof object.deviceRegistry !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.deviceRegistry: object expected"); - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRegistryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); + if (object.deviceStates) { + if (!Array.isArray(object.deviceStates)) + throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: array expected"); + message.deviceStates = []; + for (var i = 0; i < object.deviceStates.length; ++i) { + if (typeof object.deviceStates[i] !== "object") + throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: object expected"); + message.deviceStates[i] = $root.google.cloud.iot.v1.DeviceState.fromObject(object.deviceStates[i]); + } } return message; }; /** - * Creates a plain object from an UpdateDeviceRegistryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @static - * @param {google.cloud.iot.v1.UpdateDeviceRegistryRequest} message UpdateDeviceRegistryRequest + * @param {google.cloud.iot.v1.ListDeviceStatesResponse} message ListDeviceStatesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDeviceRegistryRequest.toObject = function toObject(message, options) { + ListDeviceStatesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.deviceRegistry = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.deviceStates = []; + if (message.deviceStates && message.deviceStates.length) { + object.deviceStates = []; + for (var j = 0; j < message.deviceStates.length; ++j) + object.deviceStates[j] = $root.google.cloud.iot.v1.DeviceState.toObject(message.deviceStates[j], options); } - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) - object.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateDeviceRegistryRequest to JSON. + * Converts this ListDeviceStatesResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse * @instance * @returns {Object.} JSON object */ - UpdateDeviceRegistryRequest.prototype.toJSON = function toJSON() { + ListDeviceStatesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDeviceRegistryRequest; + return ListDeviceStatesResponse; })(); - v1.ListDeviceRegistriesRequest = (function() { + v1.SendCommandToDeviceRequest = (function() { /** - * Properties of a ListDeviceRegistriesRequest. + * Properties of a SendCommandToDeviceRequest. * @memberof google.cloud.iot.v1 - * @interface IListDeviceRegistriesRequest - * @property {string|null} [parent] ListDeviceRegistriesRequest parent - * @property {number|null} [pageSize] ListDeviceRegistriesRequest pageSize - * @property {string|null} [pageToken] ListDeviceRegistriesRequest pageToken + * @interface ISendCommandToDeviceRequest + * @property {string|null} [name] SendCommandToDeviceRequest name + * @property {Uint8Array|null} [binaryData] SendCommandToDeviceRequest binaryData + * @property {string|null} [subfolder] SendCommandToDeviceRequest subfolder */ /** - * Constructs a new ListDeviceRegistriesRequest. + * Constructs a new SendCommandToDeviceRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceRegistriesRequest. - * @implements IListDeviceRegistriesRequest + * @classdesc Represents a SendCommandToDeviceRequest. + * @implements ISendCommandToDeviceRequest * @constructor - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set */ - function ListDeviceRegistriesRequest(properties) { + function SendCommandToDeviceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5653,101 +4847,101 @@ } /** - * ListDeviceRegistriesRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * SendCommandToDeviceRequest name. + * @member {string} name + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance */ - ListDeviceRegistriesRequest.prototype.parent = ""; + SendCommandToDeviceRequest.prototype.name = ""; /** - * ListDeviceRegistriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * SendCommandToDeviceRequest binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance */ - ListDeviceRegistriesRequest.prototype.pageSize = 0; + SendCommandToDeviceRequest.prototype.binaryData = $util.newBuffer([]); /** - * ListDeviceRegistriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * SendCommandToDeviceRequest subfolder. + * @member {string} subfolder + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance */ - ListDeviceRegistriesRequest.prototype.pageToken = ""; + SendCommandToDeviceRequest.prototype.subfolder = ""; /** - * Creates a new ListDeviceRegistriesRequest instance using the specified properties. + * Creates a new SendCommandToDeviceRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest instance */ - ListDeviceRegistriesRequest.create = function create(properties) { - return new ListDeviceRegistriesRequest(properties); + SendCommandToDeviceRequest.create = function create(properties) { + return new SendCommandToDeviceRequest(properties); }; /** - * Encodes the specified ListDeviceRegistriesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesRequest.encode = function encode(message, writer) { + SendCommandToDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subfolder); return writer; }; /** - * Encodes the specified ListDeviceRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesRequest.verify|verify} messages. + * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesRequest} message ListDeviceRegistriesRequest message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SendCommandToDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesRequest.decode = function decode(reader, length) { + SendCommandToDeviceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.binaryData = reader.bytes(); break; case 3: - message.pageToken = reader.string(); + message.subfolder = reader.string(); break; default: reader.skipType(tag & 7); @@ -5758,126 +4952,132 @@ }; /** - * Decodes a ListDeviceRegistriesRequest message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesRequest.decodeDelimited = function decodeDelimited(reader) { + SendCommandToDeviceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceRegistriesRequest message. + * Verifies a SendCommandToDeviceRequest message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceRegistriesRequest.verify = function verify(message) { + SendCommandToDeviceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + if (!$util.isString(message.subfolder)) + return "subfolder: string expected"; return null; }; /** - * Creates a ListDeviceRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceRegistriesRequest} ListDeviceRegistriesRequest + * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest */ - ListDeviceRegistriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesRequest) + SendCommandToDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceRequest) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + if (object.subfolder != null) + message.subfolder = String(object.subfolder); return message; }; /** - * Creates a plain object from a ListDeviceRegistriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @static - * @param {google.cloud.iot.v1.ListDeviceRegistriesRequest} message ListDeviceRegistriesRequest + * @param {google.cloud.iot.v1.SendCommandToDeviceRequest} message SendCommandToDeviceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceRegistriesRequest.toObject = function toObject(message, options) { + SendCommandToDeviceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + object.subfolder = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (message.subfolder != null && message.hasOwnProperty("subfolder")) + object.subfolder = message.subfolder; return object; }; /** - * Converts this ListDeviceRegistriesRequest to JSON. + * Converts this SendCommandToDeviceRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest * @instance * @returns {Object.} JSON object */ - ListDeviceRegistriesRequest.prototype.toJSON = function toJSON() { + SendCommandToDeviceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceRegistriesRequest; + return SendCommandToDeviceRequest; })(); - v1.ListDeviceRegistriesResponse = (function() { + v1.SendCommandToDeviceResponse = (function() { /** - * Properties of a ListDeviceRegistriesResponse. + * Properties of a SendCommandToDeviceResponse. * @memberof google.cloud.iot.v1 - * @interface IListDeviceRegistriesResponse - * @property {Array.|null} [deviceRegistries] ListDeviceRegistriesResponse deviceRegistries - * @property {string|null} [nextPageToken] ListDeviceRegistriesResponse nextPageToken + * @interface ISendCommandToDeviceResponse */ /** - * Constructs a new ListDeviceRegistriesResponse. + * Constructs a new SendCommandToDeviceResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceRegistriesResponse. - * @implements IListDeviceRegistriesResponse + * @classdesc Represents a SendCommandToDeviceResponse. + * @implements ISendCommandToDeviceResponse * @constructor - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set */ - function ListDeviceRegistriesResponse(properties) { - this.deviceRegistries = []; + function SendCommandToDeviceResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5885,92 +5085,63 @@ } /** - * ListDeviceRegistriesResponse deviceRegistries. - * @member {Array.} deviceRegistries - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse - * @instance - */ - ListDeviceRegistriesResponse.prototype.deviceRegistries = $util.emptyArray; - - /** - * ListDeviceRegistriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse - * @instance - */ - ListDeviceRegistriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListDeviceRegistriesResponse instance using the specified properties. + * Creates a new SendCommandToDeviceResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse instance + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse instance */ - ListDeviceRegistriesResponse.create = function create(properties) { - return new ListDeviceRegistriesResponse(properties); + SendCommandToDeviceResponse.create = function create(properties) { + return new SendCommandToDeviceResponse(properties); }; /** - * Encodes the specified ListDeviceRegistriesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesResponse.encode = function encode(message, writer) { + SendCommandToDeviceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceRegistries != null && message.deviceRegistries.length) - for (var i = 0; i < message.deviceRegistries.length; ++i) - $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistries[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 ListDeviceRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceRegistriesResponse.verify|verify} messages. + * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.IListDeviceRegistriesResponse} message ListDeviceRegistriesResponse message or plain object to encode + * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceRegistriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SendCommandToDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesResponse.decode = function decode(reader, length) { + SendCommandToDeviceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.deviceRegistries && message.deviceRegistries.length)) - message.deviceRegistries = []; - message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -5980,134 +5151,96 @@ }; /** - * Decodes a ListDeviceRegistriesResponse message from the specified reader or buffer, length delimited. + * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceRegistriesResponse.decodeDelimited = function decodeDelimited(reader) { + SendCommandToDeviceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceRegistriesResponse message. + * Verifies a SendCommandToDeviceResponse message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceRegistriesResponse.verify = function verify(message) { + SendCommandToDeviceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceRegistries != null && message.hasOwnProperty("deviceRegistries")) { - if (!Array.isArray(message.deviceRegistries)) - return "deviceRegistries: array expected"; - for (var i = 0; i < message.deviceRegistries.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceRegistry.verify(message.deviceRegistries[i]); - if (error) - return "deviceRegistries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListDeviceRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceRegistriesResponse} ListDeviceRegistriesResponse + * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse */ - ListDeviceRegistriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceRegistriesResponse) + SendCommandToDeviceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceResponse) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceRegistriesResponse(); - if (object.deviceRegistries) { - if (!Array.isArray(object.deviceRegistries)) - throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: array expected"); - message.deviceRegistries = []; - for (var i = 0; i < object.deviceRegistries.length; ++i) { - if (typeof object.deviceRegistries[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDeviceRegistriesResponse.deviceRegistries: object expected"); - message.deviceRegistries[i] = $root.google.cloud.iot.v1.DeviceRegistry.fromObject(object.deviceRegistries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; + return new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); }; /** - * Creates a plain object from a ListDeviceRegistriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @static - * @param {google.cloud.iot.v1.ListDeviceRegistriesResponse} message ListDeviceRegistriesResponse + * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} message SendCommandToDeviceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceRegistriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.deviceRegistries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.deviceRegistries && message.deviceRegistries.length) { - object.deviceRegistries = []; - for (var j = 0; j < message.deviceRegistries.length; ++j) - object.deviceRegistries[j] = $root.google.cloud.iot.v1.DeviceRegistry.toObject(message.deviceRegistries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; + SendCommandToDeviceResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ListDeviceRegistriesResponse to JSON. + * Converts this SendCommandToDeviceResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse * @instance * @returns {Object.} JSON object */ - ListDeviceRegistriesResponse.prototype.toJSON = function toJSON() { + SendCommandToDeviceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceRegistriesResponse; + return SendCommandToDeviceResponse; })(); - v1.CreateDeviceRequest = (function() { + v1.BindDeviceToGatewayRequest = (function() { /** - * Properties of a CreateDeviceRequest. + * Properties of a BindDeviceToGatewayRequest. * @memberof google.cloud.iot.v1 - * @interface ICreateDeviceRequest - * @property {string|null} [parent] CreateDeviceRequest parent - * @property {google.cloud.iot.v1.IDevice|null} [device] CreateDeviceRequest device + * @interface IBindDeviceToGatewayRequest + * @property {string|null} [parent] BindDeviceToGatewayRequest parent + * @property {string|null} [gatewayId] BindDeviceToGatewayRequest gatewayId + * @property {string|null} [deviceId] BindDeviceToGatewayRequest deviceId */ /** - * Constructs a new CreateDeviceRequest. + * Constructs a new BindDeviceToGatewayRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents a CreateDeviceRequest. - * @implements ICreateDeviceRequest + * @classdesc Represents a BindDeviceToGatewayRequest. + * @implements IBindDeviceToGatewayRequest * @constructor - * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set */ - function CreateDeviceRequest(properties) { + function BindDeviceToGatewayRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6115,80 +5248,90 @@ } /** - * CreateDeviceRequest parent. + * BindDeviceToGatewayRequest parent. * @member {string} parent - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @instance + */ + BindDeviceToGatewayRequest.prototype.parent = ""; + + /** + * BindDeviceToGatewayRequest gatewayId. + * @member {string} gatewayId + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance */ - CreateDeviceRequest.prototype.parent = ""; + BindDeviceToGatewayRequest.prototype.gatewayId = ""; /** - * CreateDeviceRequest device. - * @member {google.cloud.iot.v1.IDevice|null|undefined} device - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * BindDeviceToGatewayRequest deviceId. + * @member {string} deviceId + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance */ - CreateDeviceRequest.prototype.device = null; + BindDeviceToGatewayRequest.prototype.deviceId = ""; /** - * Creates a new CreateDeviceRequest instance using the specified properties. + * Creates a new BindDeviceToGatewayRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.ICreateDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest instance */ - CreateDeviceRequest.create = function create(properties) { - return new CreateDeviceRequest(properties); + BindDeviceToGatewayRequest.create = function create(properties) { + return new BindDeviceToGatewayRequest(properties); }; /** - * Encodes the specified CreateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRequest.encode = function encode(message, writer) { + BindDeviceToGatewayRequest.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.device != null && message.hasOwnProperty("device")) - $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); return writer; }; /** - * Encodes the specified CreateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.CreateDeviceRequest.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.ICreateDeviceRequest} message CreateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + BindDeviceToGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRequest.decode = function decode(reader, length) { + BindDeviceToGatewayRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6196,7 +5339,10 @@ message.parent = reader.string(); break; case 2: - message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + message.gatewayId = reader.string(); + break; + case 3: + message.deviceId = reader.string(); break; default: reader.skipType(tag & 7); @@ -6207,122 +5353,123 @@ }; /** - * Decodes a CreateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + BindDeviceToGatewayRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDeviceRequest message. + * Verifies a BindDeviceToGatewayRequest message. * @function verify - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDeviceRequest.verify = function verify(message) { + BindDeviceToGatewayRequest.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.device != null && message.hasOwnProperty("device")) { - var error = $root.google.cloud.iot.v1.Device.verify(message.device); - if (error) - return "device." + error; - } + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (!$util.isString(message.gatewayId)) + return "gatewayId: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; return null; }; /** - * Creates a CreateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.CreateDeviceRequest} CreateDeviceRequest + * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest */ - CreateDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.CreateDeviceRequest) + BindDeviceToGatewayRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayRequest) return object; - var message = new $root.google.cloud.iot.v1.CreateDeviceRequest(); + var message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.device != null) { - if (typeof object.device !== "object") - throw TypeError(".google.cloud.iot.v1.CreateDeviceRequest.device: object expected"); - message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); - } + if (object.gatewayId != null) + message.gatewayId = String(object.gatewayId); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); return message; }; /** - * Creates a plain object from a CreateDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @static - * @param {google.cloud.iot.v1.CreateDeviceRequest} message CreateDeviceRequest + * @param {google.cloud.iot.v1.BindDeviceToGatewayRequest} message BindDeviceToGatewayRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDeviceRequest.toObject = function toObject(message, options) { + BindDeviceToGatewayRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.device = null; + object.gatewayId = ""; + object.deviceId = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.device != null && message.hasOwnProperty("device")) - object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + object.gatewayId = message.gatewayId; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; return object; }; /** - * Converts this CreateDeviceRequest to JSON. + * Converts this BindDeviceToGatewayRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest * @instance * @returns {Object.} JSON object */ - CreateDeviceRequest.prototype.toJSON = function toJSON() { + BindDeviceToGatewayRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDeviceRequest; + return BindDeviceToGatewayRequest; })(); - v1.GetDeviceRequest = (function() { + v1.BindDeviceToGatewayResponse = (function() { /** - * Properties of a GetDeviceRequest. + * Properties of a BindDeviceToGatewayResponse. * @memberof google.cloud.iot.v1 - * @interface IGetDeviceRequest - * @property {string|null} [name] GetDeviceRequest name - * @property {google.protobuf.IFieldMask|null} [fieldMask] GetDeviceRequest fieldMask + * @interface IBindDeviceToGatewayResponse */ /** - * Constructs a new GetDeviceRequest. + * Constructs a new BindDeviceToGatewayResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a GetDeviceRequest. - * @implements IGetDeviceRequest + * @classdesc Represents a BindDeviceToGatewayResponse. + * @implements IBindDeviceToGatewayResponse * @constructor - * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set */ - function GetDeviceRequest(properties) { + function BindDeviceToGatewayResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6330,89 +5477,63 @@ } /** - * GetDeviceRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.GetDeviceRequest - * @instance - */ - GetDeviceRequest.prototype.name = ""; - - /** - * GetDeviceRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.iot.v1.GetDeviceRequest - * @instance - */ - GetDeviceRequest.prototype.fieldMask = null; - - /** - * Creates a new GetDeviceRequest instance using the specified properties. + * Creates a new BindDeviceToGatewayResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.IGetDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest instance + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse instance */ - GetDeviceRequest.create = function create(properties) { - return new GetDeviceRequest(properties); + BindDeviceToGatewayResponse.create = function create(properties) { + return new BindDeviceToGatewayResponse(properties); }; /** - * Encodes the specified GetDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRequest.encode = function encode(message, writer) { + BindDeviceToGatewayResponse.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.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GetDeviceRequest.verify|verify} messages. + * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.IGetDeviceRequest} message GetDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + BindDeviceToGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRequest.decode = function decode(reader, length) { + BindDeviceToGatewayResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GetDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -6422,122 +5543,96 @@ }; /** - * Decodes a GetDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + BindDeviceToGatewayResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeviceRequest message. + * Verifies a BindDeviceToGatewayResponse message. * @function verify - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeviceRequest.verify = function verify(message) { + BindDeviceToGatewayResponse.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.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); - if (error) - return "fieldMask." + error; - } return null; }; /** - * Creates a GetDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GetDeviceRequest} GetDeviceRequest + * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse */ - GetDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GetDeviceRequest) - return object; - var message = new $root.google.cloud.iot.v1.GetDeviceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.iot.v1.GetDeviceRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); - } - return message; + BindDeviceToGatewayResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayResponse) + return object; + return new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); }; /** - * Creates a plain object from a GetDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @static - * @param {google.cloud.iot.v1.GetDeviceRequest} message GetDeviceRequest + * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} message BindDeviceToGatewayResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeviceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.fieldMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - return object; + BindDeviceToGatewayResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetDeviceRequest to JSON. + * Converts this BindDeviceToGatewayResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.GetDeviceRequest + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse * @instance * @returns {Object.} JSON object */ - GetDeviceRequest.prototype.toJSON = function toJSON() { + BindDeviceToGatewayResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDeviceRequest; + return BindDeviceToGatewayResponse; })(); - v1.UpdateDeviceRequest = (function() { + v1.UnbindDeviceFromGatewayRequest = (function() { /** - * Properties of an UpdateDeviceRequest. + * Properties of an UnbindDeviceFromGatewayRequest. * @memberof google.cloud.iot.v1 - * @interface IUpdateDeviceRequest - * @property {google.cloud.iot.v1.IDevice|null} [device] UpdateDeviceRequest device - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeviceRequest updateMask + * @interface IUnbindDeviceFromGatewayRequest + * @property {string|null} [parent] UnbindDeviceFromGatewayRequest parent + * @property {string|null} [gatewayId] UnbindDeviceFromGatewayRequest gatewayId + * @property {string|null} [deviceId] UnbindDeviceFromGatewayRequest deviceId */ /** - * Constructs a new UpdateDeviceRequest. + * Constructs a new UnbindDeviceFromGatewayRequest. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UpdateDeviceRequest. - * @implements IUpdateDeviceRequest + * @classdesc Represents an UnbindDeviceFromGatewayRequest. + * @implements IUnbindDeviceFromGatewayRequest * @constructor - * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set */ - function UpdateDeviceRequest(properties) { + function UnbindDeviceFromGatewayRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6545,88 +5640,101 @@ } /** - * UpdateDeviceRequest device. - * @member {google.cloud.iot.v1.IDevice|null|undefined} device - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * UnbindDeviceFromGatewayRequest parent. + * @member {string} parent + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance */ - UpdateDeviceRequest.prototype.device = null; + UnbindDeviceFromGatewayRequest.prototype.parent = ""; /** - * UpdateDeviceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * UnbindDeviceFromGatewayRequest gatewayId. + * @member {string} gatewayId + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance */ - UpdateDeviceRequest.prototype.updateMask = null; + UnbindDeviceFromGatewayRequest.prototype.gatewayId = ""; /** - * Creates a new UpdateDeviceRequest instance using the specified properties. + * UnbindDeviceFromGatewayRequest deviceId. + * @member {string} deviceId + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @instance + */ + UnbindDeviceFromGatewayRequest.prototype.deviceId = ""; + + /** + * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest instance */ - UpdateDeviceRequest.create = function create(properties) { - return new UpdateDeviceRequest(properties); + UnbindDeviceFromGatewayRequest.create = function create(properties) { + return new UnbindDeviceFromGatewayRequest(properties); }; /** - * Encodes the specified UpdateDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRequest.encode = function encode(message, writer) { + UnbindDeviceFromGatewayRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.device != null && message.hasOwnProperty("device")) - $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); return writer; }; /** - * Encodes the specified UpdateDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UpdateDeviceRequest.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.IUpdateDeviceRequest} message UpdateDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + UnbindDeviceFromGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRequest.decode = function decode(reader, length) { + UnbindDeviceFromGatewayRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; case 2: - message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + message.gatewayId = reader.string(); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.deviceId = reader.string(); break; default: reader.skipType(tag & 7); @@ -6637,126 +5745,123 @@ }; /** - * Decodes an UpdateDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + UnbindDeviceFromGatewayRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDeviceRequest message. + * Verifies an UnbindDeviceFromGatewayRequest message. * @function verify - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDeviceRequest.verify = function verify(message) { + UnbindDeviceFromGatewayRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.device != null && message.hasOwnProperty("device")) { - var error = $root.google.cloud.iot.v1.Device.verify(message.device); - if (error) - return "device." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (!$util.isString(message.gatewayId)) + return "gatewayId: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; return null; }; /** - * Creates an UpdateDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UpdateDeviceRequest} UpdateDeviceRequest + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest */ - UpdateDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UpdateDeviceRequest) + UnbindDeviceFromGatewayRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) return object; - var message = new $root.google.cloud.iot.v1.UpdateDeviceRequest(); - if (object.device != null) { - if (typeof object.device !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.device: object expected"); - message.device = $root.google.cloud.iot.v1.Device.fromObject(object.device); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.iot.v1.UpdateDeviceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gatewayId != null) + message.gatewayId = String(object.gatewayId); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); return message; }; /** - * Creates a plain object from an UpdateDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @static - * @param {google.cloud.iot.v1.UpdateDeviceRequest} message UpdateDeviceRequest + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDeviceRequest.toObject = function toObject(message, options) { + UnbindDeviceFromGatewayRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.device = null; - object.updateMask = null; + object.parent = ""; + object.gatewayId = ""; + object.deviceId = ""; } - if (message.device != null && message.hasOwnProperty("device")) - object.device = $root.google.cloud.iot.v1.Device.toObject(message.device, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) + object.gatewayId = message.gatewayId; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; return object; }; /** - * Converts this UpdateDeviceRequest to JSON. + * Converts this UnbindDeviceFromGatewayRequest to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest * @instance * @returns {Object.} JSON object */ - UpdateDeviceRequest.prototype.toJSON = function toJSON() { + UnbindDeviceFromGatewayRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDeviceRequest; + return UnbindDeviceFromGatewayRequest; })(); - v1.DeleteDeviceRequest = (function() { + v1.UnbindDeviceFromGatewayResponse = (function() { /** - * Properties of a DeleteDeviceRequest. + * Properties of an UnbindDeviceFromGatewayResponse. * @memberof google.cloud.iot.v1 - * @interface IDeleteDeviceRequest - * @property {string|null} [name] DeleteDeviceRequest name + * @interface IUnbindDeviceFromGatewayResponse */ /** - * Constructs a new DeleteDeviceRequest. + * Constructs a new UnbindDeviceFromGatewayResponse. * @memberof google.cloud.iot.v1 - * @classdesc Represents a DeleteDeviceRequest. - * @implements IDeleteDeviceRequest + * @classdesc Represents an UnbindDeviceFromGatewayResponse. + * @implements IUnbindDeviceFromGatewayResponse * @constructor - * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set */ - function DeleteDeviceRequest(properties) { + function UnbindDeviceFromGatewayResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6764,76 +5869,63 @@ } /** - * DeleteDeviceRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.DeleteDeviceRequest - * @instance - */ - DeleteDeviceRequest.prototype.name = ""; - - /** - * Creates a new DeleteDeviceRequest instance using the specified properties. + * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest instance + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse instance */ - DeleteDeviceRequest.create = function create(properties) { - return new DeleteDeviceRequest(properties); + UnbindDeviceFromGatewayResponse.create = function create(properties) { + return new UnbindDeviceFromGatewayResponse(properties); }; /** - * Encodes the specified DeleteDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRequest.encode = function encode(message, writer) { + UnbindDeviceFromGatewayResponse.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 DeleteDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeleteDeviceRequest.verify|verify} messages. + * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.IDeleteDeviceRequest} message DeleteDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + UnbindDeviceFromGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer. + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRequest.decode = function decode(reader, length) { + UnbindDeviceFromGatewayResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -6843,115 +5935,112 @@ }; /** - * Decodes a DeleteDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + UnbindDeviceFromGatewayResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDeviceRequest message. + * Verifies an UnbindDeviceFromGatewayResponse message. * @function verify - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDeviceRequest.verify = function verify(message) { + UnbindDeviceFromGatewayResponse.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 DeleteDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.DeleteDeviceRequest} DeleteDeviceRequest + * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse */ - DeleteDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.DeleteDeviceRequest) + UnbindDeviceFromGatewayResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) return object; - var message = new $root.google.cloud.iot.v1.DeleteDeviceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); }; /** - * Creates a plain object from a DeleteDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @static - * @param {google.cloud.iot.v1.DeleteDeviceRequest} message DeleteDeviceRequest + * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDeviceRequest.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; + UnbindDeviceFromGatewayResponse.toObject = function toObject() { + return {}; }; /** - * Converts this DeleteDeviceRequest to JSON. + * Converts this UnbindDeviceFromGatewayResponse to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse * @instance * @returns {Object.} JSON object */ - DeleteDeviceRequest.prototype.toJSON = function toJSON() { + UnbindDeviceFromGatewayResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDeviceRequest; + return UnbindDeviceFromGatewayResponse; })(); - v1.ListDevicesRequest = (function() { + v1.Device = (function() { /** - * Properties of a ListDevicesRequest. + * Properties of a Device. * @memberof google.cloud.iot.v1 - * @interface IListDevicesRequest - * @property {string|null} [parent] ListDevicesRequest parent - * @property {Array.|null} [deviceNumIds] ListDevicesRequest deviceNumIds - * @property {Array.|null} [deviceIds] ListDevicesRequest deviceIds - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListDevicesRequest fieldMask - * @property {google.cloud.iot.v1.IGatewayListOptions|null} [gatewayListOptions] ListDevicesRequest gatewayListOptions - * @property {number|null} [pageSize] ListDevicesRequest pageSize - * @property {string|null} [pageToken] ListDevicesRequest pageToken + * @interface IDevice + * @property {string|null} [id] Device id + * @property {string|null} [name] Device name + * @property {number|Long|null} [numId] Device numId + * @property {Array.|null} [credentials] Device credentials + * @property {google.protobuf.ITimestamp|null} [lastHeartbeatTime] Device lastHeartbeatTime + * @property {google.protobuf.ITimestamp|null} [lastEventTime] Device lastEventTime + * @property {google.protobuf.ITimestamp|null} [lastStateTime] Device lastStateTime + * @property {google.protobuf.ITimestamp|null} [lastConfigAckTime] Device lastConfigAckTime + * @property {google.protobuf.ITimestamp|null} [lastConfigSendTime] Device lastConfigSendTime + * @property {boolean|null} [blocked] Device blocked + * @property {google.protobuf.ITimestamp|null} [lastErrorTime] Device lastErrorTime + * @property {google.rpc.IStatus|null} [lastErrorStatus] Device lastErrorStatus + * @property {google.cloud.iot.v1.IDeviceConfig|null} [config] Device config + * @property {google.cloud.iot.v1.IDeviceState|null} [state] Device state + * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] Device logLevel + * @property {Object.|null} [metadata] Device metadata + * @property {google.cloud.iot.v1.IGatewayConfig|null} [gatewayConfig] Device gatewayConfig */ /** - * Constructs a new ListDevicesRequest. + * Constructs a new Device. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDevicesRequest. - * @implements IListDevicesRequest + * @classdesc Represents a Device. + * @implements IDevice * @constructor - * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set */ - function ListDevicesRequest(properties) { - this.deviceNumIds = []; - this.deviceIds = []; + function Device(properties) { + this.credentials = []; + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6959,167 +6048,292 @@ } /** - * ListDevicesRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device id. + * @member {string} id + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.parent = ""; + Device.prototype.id = ""; /** - * ListDevicesRequest deviceNumIds. - * @member {Array.} deviceNumIds - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device name. + * @member {string} name + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.deviceNumIds = $util.emptyArray; + Device.prototype.name = ""; /** - * ListDevicesRequest deviceIds. - * @member {Array.} deviceIds - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device numId. + * @member {number|Long} numId + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.deviceIds = $util.emptyArray; + Device.prototype.numId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * ListDevicesRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device credentials. + * @member {Array.} credentials + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.fieldMask = null; + Device.prototype.credentials = $util.emptyArray; /** - * ListDevicesRequest gatewayListOptions. - * @member {google.cloud.iot.v1.IGatewayListOptions|null|undefined} gatewayListOptions - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device lastHeartbeatTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastHeartbeatTime + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.gatewayListOptions = null; + Device.prototype.lastHeartbeatTime = null; + + /** + * Device lastEventTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastEventTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastEventTime = null; + + /** + * Device lastStateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastStateTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastStateTime = null; + + /** + * Device lastConfigAckTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConfigAckTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastConfigAckTime = null; + + /** + * Device lastConfigSendTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConfigSendTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastConfigSendTime = null; + + /** + * Device blocked. + * @member {boolean} blocked + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.blocked = false; + + /** + * Device lastErrorTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastErrorTime + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastErrorTime = null; + + /** + * Device lastErrorStatus. + * @member {google.rpc.IStatus|null|undefined} lastErrorStatus + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.lastErrorStatus = null; + + /** + * Device config. + * @member {google.cloud.iot.v1.IDeviceConfig|null|undefined} config + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.config = null; + + /** + * Device state. + * @member {google.cloud.iot.v1.IDeviceState|null|undefined} state + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.state = null; + + /** + * Device logLevel. + * @member {google.cloud.iot.v1.LogLevel} logLevel + * @memberof google.cloud.iot.v1.Device + * @instance + */ + Device.prototype.logLevel = 0; /** - * ListDevicesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device metadata. + * @member {Object.} metadata + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.pageSize = 0; + Device.prototype.metadata = $util.emptyObject; /** - * ListDevicesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.iot.v1.ListDevicesRequest + * Device gatewayConfig. + * @member {google.cloud.iot.v1.IGatewayConfig|null|undefined} gatewayConfig + * @memberof google.cloud.iot.v1.Device * @instance */ - ListDevicesRequest.prototype.pageToken = ""; + Device.prototype.gatewayConfig = null; /** - * Creates a new ListDevicesRequest instance using the specified properties. + * Creates a new Device instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static - * @param {google.cloud.iot.v1.IListDevicesRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest instance + * @param {google.cloud.iot.v1.IDevice=} [properties] Properties to set + * @returns {google.cloud.iot.v1.Device} Device instance */ - ListDevicesRequest.create = function create(properties) { - return new ListDevicesRequest(properties); + Device.create = function create(properties) { + return new Device(properties); }; /** - * Encodes the specified ListDevicesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * Encodes the specified Device message. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static - * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDevicesRequest.encode = function encode(message, writer) { + Device.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.deviceNumIds != null && message.deviceNumIds.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.deviceNumIds.length; ++i) - writer.uint64(message.deviceNumIds[i]); - writer.ldelim(); - } - if (message.deviceIds != null && message.deviceIds.length) - for (var i = 0; i < message.deviceIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceIds[i]); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) - $root.google.cloud.iot.v1.GatewayListOptions.encode(message.gatewayListOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 100, wireType 0 =*/800).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.pageToken); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.numId != null && message.hasOwnProperty("numId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.numId); + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + $root.google.protobuf.Timestamp.encode(message.lastHeartbeatTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + $root.google.protobuf.Timestamp.encode(message.lastEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + $root.google.protobuf.Timestamp.encode(message.lastErrorTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + $root.google.rpc.Status.encode(message.lastErrorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.credentials != null && message.credentials.length) + for (var i = 0; i < message.credentials.length; ++i) + $root.google.cloud.iot.v1.DeviceCredential.encode(message.credentials[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.config != null && message.hasOwnProperty("config")) + $root.google.cloud.iot.v1.DeviceConfig.encode(message.config, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + $root.google.protobuf.Timestamp.encode(message.lastConfigAckTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + $root.google.cloud.iot.v1.DeviceState.encode(message.state, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + $root.google.protobuf.Timestamp.encode(message.lastConfigSendTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.blocked != null && message.hasOwnProperty("blocked")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.blocked); + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + $root.google.protobuf.Timestamp.encode(message.lastStateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.logLevel); + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + $root.google.cloud.iot.v1.GatewayConfig.encode(message.gatewayConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDevicesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesRequest.verify|verify} messages. + * Encodes the specified Device message, length delimited. Does not implicitly {@link google.cloud.iot.v1.Device.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static - * @param {google.cloud.iot.v1.IListDevicesRequest} message ListDevicesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDevice} message Device message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Device.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer. + * Decodes a Device message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @returns {google.cloud.iot.v1.Device} Device * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDevicesRequest.decode = function decode(reader, length) { + Device.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.id = reader.string(); break; case 2: - if (!(message.deviceNumIds && message.deviceNumIds.length)) - message.deviceNumIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.deviceNumIds.push(reader.uint64()); - } else - message.deviceNumIds.push(reader.uint64()); + message.name = reader.string(); break; case 3: - if (!(message.deviceIds && message.deviceIds.length)) - message.deviceIds = []; - message.deviceIds.push(reader.string()); + message.numId = reader.uint64(); break; - case 4: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + case 12: + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); break; - case 6: - message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); + case 7: + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 100: - message.pageSize = reader.int32(); + case 8: + message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 101: - message.pageToken = reader.string(); + case 20: + message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 18: + message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 19: + message.blocked = reader.bool(); + break; + case 10: + message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 13: + message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); + break; + case 16: + message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); + break; + case 21: + message.logLevel = reader.int32(); + break; + case 17: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); + break; + case 24: + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7130,204 +6344,364 @@ }; /** - * Decodes a ListDevicesRequest message from the specified reader or buffer, length delimited. + * Decodes a Device message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @returns {google.cloud.iot.v1.Device} Device * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDevicesRequest.decodeDelimited = function decodeDelimited(reader) { + Device.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDevicesRequest message. + * Verifies a Device message. * @function verify - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDevicesRequest.verify = function verify(message) { + Device.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.deviceNumIds != null && message.hasOwnProperty("deviceNumIds")) { - if (!Array.isArray(message.deviceNumIds)) - return "deviceNumIds: array expected"; - for (var i = 0; i < message.deviceNumIds.length; ++i) - if (!$util.isInteger(message.deviceNumIds[i]) && !(message.deviceNumIds[i] && $util.isInteger(message.deviceNumIds[i].low) && $util.isInteger(message.deviceNumIds[i].high))) - return "deviceNumIds: integer|Long[] expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.numId != null && message.hasOwnProperty("numId")) + if (!$util.isInteger(message.numId) && !(message.numId && $util.isInteger(message.numId.low) && $util.isInteger(message.numId.high))) + return "numId: integer|Long expected"; + if (message.credentials != null && message.hasOwnProperty("credentials")) { + if (!Array.isArray(message.credentials)) + return "credentials: array expected"; + for (var i = 0; i < message.credentials.length; ++i) { + var error = $root.google.cloud.iot.v1.DeviceCredential.verify(message.credentials[i]); + if (error) + return "credentials." + error; + } + } + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastHeartbeatTime); + if (error) + return "lastHeartbeatTime." + error; + } + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastEventTime); + if (error) + return "lastEventTime." + error; + } + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastStateTime); + if (error) + return "lastStateTime." + error; + } + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConfigAckTime); + if (error) + return "lastConfigAckTime." + error; + } + if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConfigSendTime); + if (error) + return "lastConfigSendTime." + error; + } + if (message.blocked != null && message.hasOwnProperty("blocked")) + if (typeof message.blocked !== "boolean") + return "blocked: boolean expected"; + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastErrorTime); + if (error) + return "lastErrorTime." + error; + } + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) { + var error = $root.google.rpc.Status.verify(message.lastErrorStatus); + if (error) + return "lastErrorStatus." + error; } - if (message.deviceIds != null && message.hasOwnProperty("deviceIds")) { - if (!Array.isArray(message.deviceIds)) - return "deviceIds: array expected"; - for (var i = 0; i < message.deviceIds.length; ++i) - if (!$util.isString(message.deviceIds[i])) - return "deviceIds: string[] expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.config); + if (error) + return "config." + error; } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.iot.v1.DeviceState.verify(message.state); if (error) - return "fieldMask." + error; + return "state." + error; } - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) { - var error = $root.google.cloud.iot.v1.GatewayListOptions.verify(message.gatewayListOptions); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 10: + case 20: + case 30: + case 40: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) { + var error = $root.google.cloud.iot.v1.GatewayConfig.verify(message.gatewayConfig); if (error) - return "gatewayListOptions." + error; + return "gatewayConfig." + 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 ListDevicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Device message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDevicesRequest} ListDevicesRequest + * @returns {google.cloud.iot.v1.Device} Device */ - ListDevicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDevicesRequest) + Device.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.Device) return object; - var message = new $root.google.cloud.iot.v1.ListDevicesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deviceNumIds) { - if (!Array.isArray(object.deviceNumIds)) - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceNumIds: array expected"); - message.deviceNumIds = []; - for (var i = 0; i < object.deviceNumIds.length; ++i) - if ($util.Long) - (message.deviceNumIds[i] = $util.Long.fromValue(object.deviceNumIds[i])).unsigned = true; - else if (typeof object.deviceNumIds[i] === "string") - message.deviceNumIds[i] = parseInt(object.deviceNumIds[i], 10); - else if (typeof object.deviceNumIds[i] === "number") - message.deviceNumIds[i] = object.deviceNumIds[i]; - else if (typeof object.deviceNumIds[i] === "object") - message.deviceNumIds[i] = new $util.LongBits(object.deviceNumIds[i].low >>> 0, object.deviceNumIds[i].high >>> 0).toNumber(true); + var message = new $root.google.cloud.iot.v1.Device(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.numId != null) + if ($util.Long) + (message.numId = $util.Long.fromValue(object.numId)).unsigned = true; + else if (typeof object.numId === "string") + message.numId = parseInt(object.numId, 10); + else if (typeof object.numId === "number") + message.numId = object.numId; + else if (typeof object.numId === "object") + message.numId = new $util.LongBits(object.numId.low >>> 0, object.numId.high >>> 0).toNumber(true); + if (object.credentials) { + if (!Array.isArray(object.credentials)) + throw TypeError(".google.cloud.iot.v1.Device.credentials: array expected"); + message.credentials = []; + for (var i = 0; i < object.credentials.length; ++i) { + if (typeof object.credentials[i] !== "object") + throw TypeError(".google.cloud.iot.v1.Device.credentials: object expected"); + message.credentials[i] = $root.google.cloud.iot.v1.DeviceCredential.fromObject(object.credentials[i]); + } } - if (object.deviceIds) { - if (!Array.isArray(object.deviceIds)) - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.deviceIds: array expected"); - message.deviceIds = []; - for (var i = 0; i < object.deviceIds.length; ++i) - message.deviceIds[i] = String(object.deviceIds[i]); + if (object.lastHeartbeatTime != null) { + if (typeof object.lastHeartbeatTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastHeartbeatTime: object expected"); + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.fromObject(object.lastHeartbeatTime); } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + if (object.lastEventTime != null) { + if (typeof object.lastEventTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastEventTime: object expected"); + message.lastEventTime = $root.google.protobuf.Timestamp.fromObject(object.lastEventTime); } - if (object.gatewayListOptions != null) { - if (typeof object.gatewayListOptions !== "object") - throw TypeError(".google.cloud.iot.v1.ListDevicesRequest.gatewayListOptions: object expected"); - message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.fromObject(object.gatewayListOptions); + if (object.lastStateTime != null) { + if (typeof object.lastStateTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastStateTime: object expected"); + message.lastStateTime = $root.google.protobuf.Timestamp.fromObject(object.lastStateTime); + } + if (object.lastConfigAckTime != null) { + if (typeof object.lastConfigAckTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastConfigAckTime: object expected"); + message.lastConfigAckTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigAckTime); + } + if (object.lastConfigSendTime != null) { + if (typeof object.lastConfigSendTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastConfigSendTime: object expected"); + message.lastConfigSendTime = $root.google.protobuf.Timestamp.fromObject(object.lastConfigSendTime); + } + if (object.blocked != null) + message.blocked = Boolean(object.blocked); + if (object.lastErrorTime != null) { + if (typeof object.lastErrorTime !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastErrorTime: object expected"); + message.lastErrorTime = $root.google.protobuf.Timestamp.fromObject(object.lastErrorTime); + } + if (object.lastErrorStatus != null) { + if (typeof object.lastErrorStatus !== "object") + throw TypeError(".google.cloud.iot.v1.Device.lastErrorStatus: object expected"); + message.lastErrorStatus = $root.google.rpc.Status.fromObject(object.lastErrorStatus); + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.iot.v1.Device.config: object expected"); + message.config = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.config); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.iot.v1.Device.state: object expected"); + message.state = $root.google.cloud.iot.v1.DeviceState.fromObject(object.state); + } + switch (object.logLevel) { + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "NONE": + case 10: + message.logLevel = 10; + break; + case "ERROR": + case 20: + message.logLevel = 20; + break; + case "INFO": + case 30: + message.logLevel = 30; + break; + case "DEBUG": + case 40: + message.logLevel = 40; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.iot.v1.Device.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.gatewayConfig != null) { + if (typeof object.gatewayConfig !== "object") + throw TypeError(".google.cloud.iot.v1.Device.gatewayConfig: object expected"); + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.fromObject(object.gatewayConfig); } - 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 ListDevicesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Device message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @static - * @param {google.cloud.iot.v1.ListDevicesRequest} message ListDevicesRequest + * @param {google.cloud.iot.v1.Device} message Device * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDevicesRequest.toObject = function toObject(message, options) { + Device.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.deviceNumIds = []; - object.deviceIds = []; - } + if (options.arrays || options.defaults) + object.credentials = []; + if (options.objects || options.defaults) + object.metadata = {}; if (options.defaults) { - object.parent = ""; - object.fieldMask = null; - object.gatewayListOptions = null; - object.pageSize = 0; - object.pageToken = ""; + object.id = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.numId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numId = options.longs === String ? "0" : 0; + object.lastHeartbeatTime = null; + object.lastEventTime = null; + object.lastErrorTime = null; + object.lastErrorStatus = null; + object.config = null; + object.lastConfigAckTime = null; + object.state = null; + object.lastConfigSendTime = null; + object.blocked = false; + object.lastStateTime = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + object.gatewayConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deviceNumIds && message.deviceNumIds.length) { - object.deviceNumIds = []; - for (var j = 0; j < message.deviceNumIds.length; ++j) - if (typeof message.deviceNumIds[j] === "number") - object.deviceNumIds[j] = options.longs === String ? String(message.deviceNumIds[j]) : message.deviceNumIds[j]; - else - object.deviceNumIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.deviceNumIds[j]) : options.longs === Number ? new $util.LongBits(message.deviceNumIds[j].low >>> 0, message.deviceNumIds[j].high >>> 0).toNumber(true) : message.deviceNumIds[j]; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.numId != null && message.hasOwnProperty("numId")) + if (typeof message.numId === "number") + object.numId = options.longs === String ? String(message.numId) : message.numId; + else + object.numId = options.longs === String ? $util.Long.prototype.toString.call(message.numId) : options.longs === Number ? new $util.LongBits(message.numId.low >>> 0, message.numId.high >>> 0).toNumber(true) : message.numId; + if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + object.lastHeartbeatTime = $root.google.protobuf.Timestamp.toObject(message.lastHeartbeatTime, options); + if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + object.lastEventTime = $root.google.protobuf.Timestamp.toObject(message.lastEventTime, options); + if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + object.lastErrorTime = $root.google.protobuf.Timestamp.toObject(message.lastErrorTime, options); + if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + object.lastErrorStatus = $root.google.rpc.Status.toObject(message.lastErrorStatus, options); + if (message.credentials && message.credentials.length) { + object.credentials = []; + for (var j = 0; j < message.credentials.length; ++j) + object.credentials[j] = $root.google.cloud.iot.v1.DeviceCredential.toObject(message.credentials[j], options); } - if (message.deviceIds && message.deviceIds.length) { - object.deviceIds = []; - for (var j = 0; j < message.deviceIds.length; ++j) - object.deviceIds[j] = message.deviceIds[j]; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.config, options); + if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + object.lastConfigAckTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigAckTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.iot.v1.DeviceState.toObject(message.state, options); + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) - object.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.toObject(message.gatewayListOptions, 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.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + object.lastConfigSendTime = $root.google.protobuf.Timestamp.toObject(message.lastConfigSendTime, options); + if (message.blocked != null && message.hasOwnProperty("blocked")) + object.blocked = message.blocked; + if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + object.lastStateTime = $root.google.protobuf.Timestamp.toObject(message.lastStateTime, options); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + object.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.toObject(message.gatewayConfig, options); return object; }; /** - * Converts this ListDevicesRequest to JSON. + * Converts this Device to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDevicesRequest + * @memberof google.cloud.iot.v1.Device * @instance * @returns {Object.} JSON object */ - ListDevicesRequest.prototype.toJSON = function toJSON() { + Device.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDevicesRequest; + return Device; })(); - v1.GatewayListOptions = (function() { + v1.GatewayConfig = (function() { /** - * Properties of a GatewayListOptions. + * Properties of a GatewayConfig. * @memberof google.cloud.iot.v1 - * @interface IGatewayListOptions - * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayListOptions gatewayType - * @property {string|null} [associationsGatewayId] GatewayListOptions associationsGatewayId - * @property {string|null} [associationsDeviceId] GatewayListOptions associationsDeviceId + * @interface IGatewayConfig + * @property {google.cloud.iot.v1.GatewayType|null} [gatewayType] GatewayConfig gatewayType + * @property {google.cloud.iot.v1.GatewayAuthMethod|null} [gatewayAuthMethod] GatewayConfig gatewayAuthMethod + * @property {string|null} [lastAccessedGatewayId] GatewayConfig lastAccessedGatewayId + * @property {google.protobuf.ITimestamp|null} [lastAccessedGatewayTime] GatewayConfig lastAccessedGatewayTime */ /** - * Constructs a new GatewayListOptions. + * Constructs a new GatewayConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a GatewayListOptions. - * @implements IGatewayListOptions + * @classdesc Represents a GatewayConfig. + * @implements IGatewayConfig * @constructor - * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set + * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set */ - function GatewayListOptions(properties) { + function GatewayConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7335,104 +6709,100 @@ } /** - * GatewayListOptions gatewayType. + * GatewayConfig gatewayType. * @member {google.cloud.iot.v1.GatewayType} gatewayType - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @instance */ - GatewayListOptions.prototype.gatewayType = 0; + GatewayConfig.prototype.gatewayType = 0; /** - * GatewayListOptions associationsGatewayId. - * @member {string} associationsGatewayId - * @memberof google.cloud.iot.v1.GatewayListOptions + * GatewayConfig gatewayAuthMethod. + * @member {google.cloud.iot.v1.GatewayAuthMethod} gatewayAuthMethod + * @memberof google.cloud.iot.v1.GatewayConfig * @instance */ - GatewayListOptions.prototype.associationsGatewayId = ""; + GatewayConfig.prototype.gatewayAuthMethod = 0; /** - * GatewayListOptions associationsDeviceId. - * @member {string} associationsDeviceId - * @memberof google.cloud.iot.v1.GatewayListOptions + * GatewayConfig lastAccessedGatewayId. + * @member {string} lastAccessedGatewayId + * @memberof google.cloud.iot.v1.GatewayConfig * @instance */ - GatewayListOptions.prototype.associationsDeviceId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GatewayConfig.prototype.lastAccessedGatewayId = ""; /** - * GatewayListOptions filter. - * @member {"gatewayType"|"associationsGatewayId"|"associationsDeviceId"|undefined} filter - * @memberof google.cloud.iot.v1.GatewayListOptions + * GatewayConfig lastAccessedGatewayTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastAccessedGatewayTime + * @memberof google.cloud.iot.v1.GatewayConfig * @instance */ - Object.defineProperty(GatewayListOptions.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["gatewayType", "associationsGatewayId", "associationsDeviceId"]), - set: $util.oneOfSetter($oneOfFields) - }); + GatewayConfig.prototype.lastAccessedGatewayTime = null; /** - * Creates a new GatewayListOptions instance using the specified properties. + * Creates a new GatewayConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static - * @param {google.cloud.iot.v1.IGatewayListOptions=} [properties] Properties to set - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions instance + * @param {google.cloud.iot.v1.IGatewayConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig instance */ - GatewayListOptions.create = function create(properties) { - return new GatewayListOptions(properties); + GatewayConfig.create = function create(properties) { + return new GatewayConfig(properties); }; /** - * Encodes the specified GatewayListOptions message. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * Encodes the specified GatewayConfig message. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static - * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode + * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GatewayListOptions.encode = function encode(message, writer) { + GatewayConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.associationsGatewayId); - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.associationsDeviceId); + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gatewayAuthMethod); + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAccessedGatewayId); + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + $root.google.protobuf.Timestamp.encode(message.lastAccessedGatewayTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GatewayListOptions message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayListOptions.verify|verify} messages. + * Encodes the specified GatewayConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.GatewayConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static - * @param {google.cloud.iot.v1.IGatewayListOptions} message GatewayListOptions message or plain object to encode + * @param {google.cloud.iot.v1.IGatewayConfig} message GatewayConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GatewayListOptions.encodeDelimited = function encodeDelimited(message, writer) { + GatewayConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GatewayListOptions message from the specified reader or buffer. + * Decodes a GatewayConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GatewayListOptions.decode = function decode(reader, length) { + GatewayConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayListOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.GatewayConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7440,10 +6810,13 @@ message.gatewayType = reader.int32(); break; case 2: - message.associationsGatewayId = reader.string(); + message.gatewayAuthMethod = reader.int32(); break; case 3: - message.associationsDeviceId = reader.string(); + message.lastAccessedGatewayId = reader.string(); + break; + case 4: + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7454,35 +6827,33 @@ }; /** - * Decodes a GatewayListOptions message from the specified reader or buffer, length delimited. + * Decodes a GatewayConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GatewayListOptions.decodeDelimited = function decodeDelimited(reader) { + GatewayConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GatewayListOptions message. + * Verifies a GatewayConfig message. * @function verify - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GatewayListOptions.verify = function verify(message) { + GatewayConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { - properties.filter = 1; + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) switch (message.gatewayType) { default: return "gatewayType: enum value expected"; @@ -7491,36 +6862,39 @@ case 2: break; } - } - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.associationsGatewayId)) - return "associationsGatewayId: string expected"; - } - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.associationsDeviceId)) - return "associationsDeviceId: string expected"; + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + switch (message.gatewayAuthMethod) { + default: + return "gatewayAuthMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + if (!$util.isString(message.lastAccessedGatewayId)) + return "lastAccessedGatewayId: string expected"; + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastAccessedGatewayTime); + if (error) + return "lastAccessedGatewayTime." + error; } return null; }; /** - * Creates a GatewayListOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GatewayConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.GatewayListOptions} GatewayListOptions + * @returns {google.cloud.iot.v1.GatewayConfig} GatewayConfig */ - GatewayListOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.GatewayListOptions) + GatewayConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.GatewayConfig) return object; - var message = new $root.google.cloud.iot.v1.GatewayListOptions(); + var message = new $root.google.cloud.iot.v1.GatewayConfig(); switch (object.gatewayType) { case "GATEWAY_TYPE_UNSPECIFIED": case 0: @@ -7535,78 +6909,105 @@ message.gatewayType = 2; break; } - if (object.associationsGatewayId != null) - message.associationsGatewayId = String(object.associationsGatewayId); - if (object.associationsDeviceId != null) - message.associationsDeviceId = String(object.associationsDeviceId); + switch (object.gatewayAuthMethod) { + case "GATEWAY_AUTH_METHOD_UNSPECIFIED": + case 0: + message.gatewayAuthMethod = 0; + break; + case "ASSOCIATION_ONLY": + case 1: + message.gatewayAuthMethod = 1; + break; + case "DEVICE_AUTH_TOKEN_ONLY": + case 2: + message.gatewayAuthMethod = 2; + break; + case "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": + case 3: + message.gatewayAuthMethod = 3; + break; + } + if (object.lastAccessedGatewayId != null) + message.lastAccessedGatewayId = String(object.lastAccessedGatewayId); + if (object.lastAccessedGatewayTime != null) { + if (typeof object.lastAccessedGatewayTime !== "object") + throw TypeError(".google.cloud.iot.v1.GatewayConfig.lastAccessedGatewayTime: object expected"); + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.fromObject(object.lastAccessedGatewayTime); + } return message; }; /** - * Creates a plain object from a GatewayListOptions message. Also converts values to other types if specified. + * Creates a plain object from a GatewayConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @static - * @param {google.cloud.iot.v1.GatewayListOptions} message GatewayListOptions + * @param {google.cloud.iot.v1.GatewayConfig} message GatewayConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GatewayListOptions.toObject = function toObject(message, options) { + GatewayConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { - object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; - if (options.oneofs) - object.filter = "gatewayType"; - } - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) { - object.associationsGatewayId = message.associationsGatewayId; - if (options.oneofs) - object.filter = "associationsGatewayId"; - } - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) { - object.associationsDeviceId = message.associationsDeviceId; - if (options.oneofs) - object.filter = "associationsDeviceId"; + if (options.defaults) { + object.gatewayType = options.enums === String ? "GATEWAY_TYPE_UNSPECIFIED" : 0; + object.gatewayAuthMethod = options.enums === String ? "GATEWAY_AUTH_METHOD_UNSPECIFIED" : 0; + object.lastAccessedGatewayId = ""; + object.lastAccessedGatewayTime = null; } + if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; + if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + object.lastAccessedGatewayId = message.lastAccessedGatewayId; + if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + object.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.toObject(message.lastAccessedGatewayTime, options); return object; }; /** - * Converts this GatewayListOptions to JSON. + * Converts this GatewayConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.GatewayListOptions + * @memberof google.cloud.iot.v1.GatewayConfig * @instance * @returns {Object.} JSON object */ - GatewayListOptions.prototype.toJSON = function toJSON() { + GatewayConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GatewayListOptions; + return GatewayConfig; })(); - v1.ListDevicesResponse = (function() { + v1.DeviceRegistry = (function() { /** - * Properties of a ListDevicesResponse. + * Properties of a DeviceRegistry. * @memberof google.cloud.iot.v1 - * @interface IListDevicesResponse - * @property {Array.|null} [devices] ListDevicesResponse devices - * @property {string|null} [nextPageToken] ListDevicesResponse nextPageToken + * @interface IDeviceRegistry + * @property {string|null} [id] DeviceRegistry id + * @property {string|null} [name] DeviceRegistry name + * @property {Array.|null} [eventNotificationConfigs] DeviceRegistry eventNotificationConfigs + * @property {google.cloud.iot.v1.IStateNotificationConfig|null} [stateNotificationConfig] DeviceRegistry stateNotificationConfig + * @property {google.cloud.iot.v1.IMqttConfig|null} [mqttConfig] DeviceRegistry mqttConfig + * @property {google.cloud.iot.v1.IHttpConfig|null} [httpConfig] DeviceRegistry httpConfig + * @property {google.cloud.iot.v1.LogLevel|null} [logLevel] DeviceRegistry logLevel + * @property {Array.|null} [credentials] DeviceRegistry credentials */ /** - * Constructs a new ListDevicesResponse. + * Constructs a new DeviceRegistry. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDevicesResponse. - * @implements IListDevicesResponse + * @classdesc Represents a DeviceRegistry. + * @implements IDeviceRegistry * @constructor - * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set */ - function ListDevicesResponse(properties) { - this.devices = []; + function DeviceRegistry(properties) { + this.eventNotificationConfigs = []; + this.credentials = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7614,91 +7015,172 @@ } /** - * ListDevicesResponse devices. - * @member {Array.} devices - * @memberof google.cloud.iot.v1.ListDevicesResponse + * DeviceRegistry id. + * @member {string} id + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance */ - ListDevicesResponse.prototype.devices = $util.emptyArray; + DeviceRegistry.prototype.id = ""; /** - * ListDevicesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.iot.v1.ListDevicesResponse + * DeviceRegistry name. + * @member {string} name + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance */ - ListDevicesResponse.prototype.nextPageToken = ""; + DeviceRegistry.prototype.name = ""; /** - * Creates a new ListDevicesResponse instance using the specified properties. + * DeviceRegistry eventNotificationConfigs. + * @member {Array.} eventNotificationConfigs + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.eventNotificationConfigs = $util.emptyArray; + + /** + * DeviceRegistry stateNotificationConfig. + * @member {google.cloud.iot.v1.IStateNotificationConfig|null|undefined} stateNotificationConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.stateNotificationConfig = null; + + /** + * DeviceRegistry mqttConfig. + * @member {google.cloud.iot.v1.IMqttConfig|null|undefined} mqttConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.mqttConfig = null; + + /** + * DeviceRegistry httpConfig. + * @member {google.cloud.iot.v1.IHttpConfig|null|undefined} httpConfig + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.httpConfig = null; + + /** + * DeviceRegistry logLevel. + * @member {google.cloud.iot.v1.LogLevel} logLevel + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.logLevel = 0; + + /** + * DeviceRegistry credentials. + * @member {Array.} credentials + * @memberof google.cloud.iot.v1.DeviceRegistry + * @instance + */ + DeviceRegistry.prototype.credentials = $util.emptyArray; + + /** + * Creates a new DeviceRegistry instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static - * @param {google.cloud.iot.v1.IListDevicesResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse instance + * @param {google.cloud.iot.v1.IDeviceRegistry=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry instance */ - ListDevicesResponse.create = function create(properties) { - return new ListDevicesResponse(properties); + DeviceRegistry.create = function create(properties) { + return new DeviceRegistry(properties); }; /** - * Encodes the specified ListDevicesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * Encodes the specified DeviceRegistry message. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static - * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDevicesResponse.encode = function encode(message, writer) { + DeviceRegistry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.devices != null && message.devices.length) - for (var i = 0; i < message.devices.length; ++i) - $root.google.cloud.iot.v1.Device.encode(message.devices[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.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + $root.google.cloud.iot.v1.MqttConfig.encode(message.mqttConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + $root.google.cloud.iot.v1.StateNotificationConfig.encode(message.stateNotificationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.credentials != null && message.credentials.length) + for (var i = 0; i < message.credentials.length; ++i) + $root.google.cloud.iot.v1.RegistryCredential.encode(message.credentials[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + $root.google.cloud.iot.v1.HttpConfig.encode(message.httpConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventNotificationConfigs != null && message.eventNotificationConfigs.length) + for (var i = 0; i < message.eventNotificationConfigs.length; ++i) + $root.google.cloud.iot.v1.EventNotificationConfig.encode(message.eventNotificationConfigs[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logLevel); return writer; }; /** - * Encodes the specified ListDevicesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDevicesResponse.verify|verify} messages. + * Encodes the specified DeviceRegistry message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceRegistry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static - * @param {google.cloud.iot.v1.IListDevicesResponse} message ListDevicesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceRegistry} message DeviceRegistry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeviceRegistry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer. + * Decodes a DeviceRegistry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDevicesResponse.decode = function decode(reader, length) { + DeviceRegistry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDevicesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceRegistry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.devices && message.devices.length)) - message.devices = []; - message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); + message.id = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); + break; + case 10: + if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) + message.eventNotificationConfigs = []; + message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); + break; + case 7: + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); + break; + case 4: + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); + break; + case 9: + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); + break; + case 11: + message.logLevel = reader.int32(); + break; + case 8: + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -7709,135 +7191,243 @@ }; /** - * Decodes a ListDevicesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeviceRegistry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDevicesResponse.decodeDelimited = function decodeDelimited(reader) { + DeviceRegistry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDevicesResponse message. + * Verifies a DeviceRegistry message. * @function verify - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDevicesResponse.verify = function verify(message) { + DeviceRegistry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.devices != null && message.hasOwnProperty("devices")) { - if (!Array.isArray(message.devices)) - return "devices: array expected"; - for (var i = 0; i < message.devices.length; ++i) { - var error = $root.google.cloud.iot.v1.Device.verify(message.devices[i]); + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.eventNotificationConfigs != null && message.hasOwnProperty("eventNotificationConfigs")) { + if (!Array.isArray(message.eventNotificationConfigs)) + return "eventNotificationConfigs: array expected"; + for (var i = 0; i < message.eventNotificationConfigs.length; ++i) { + var error = $root.google.cloud.iot.v1.EventNotificationConfig.verify(message.eventNotificationConfigs[i]); + if (error) + return "eventNotificationConfigs." + error; + } + } + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) { + var error = $root.google.cloud.iot.v1.StateNotificationConfig.verify(message.stateNotificationConfig); + if (error) + return "stateNotificationConfig." + error; + } + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) { + var error = $root.google.cloud.iot.v1.MqttConfig.verify(message.mqttConfig); + if (error) + return "mqttConfig." + error; + } + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) { + var error = $root.google.cloud.iot.v1.HttpConfig.verify(message.httpConfig); + if (error) + return "httpConfig." + error; + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 10: + case 20: + case 30: + case 40: + break; + } + if (message.credentials != null && message.hasOwnProperty("credentials")) { + if (!Array.isArray(message.credentials)) + return "credentials: array expected"; + for (var i = 0; i < message.credentials.length; ++i) { + var error = $root.google.cloud.iot.v1.RegistryCredential.verify(message.credentials[i]); if (error) - return "devices." + error; + return "credentials." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListDevicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceRegistry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDevicesResponse} ListDevicesResponse + * @returns {google.cloud.iot.v1.DeviceRegistry} DeviceRegistry */ - ListDevicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDevicesResponse) + DeviceRegistry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceRegistry) return object; - var message = new $root.google.cloud.iot.v1.ListDevicesResponse(); - if (object.devices) { - if (!Array.isArray(object.devices)) - throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: array expected"); - message.devices = []; - for (var i = 0; i < object.devices.length; ++i) { - if (typeof object.devices[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDevicesResponse.devices: object expected"); - message.devices[i] = $root.google.cloud.iot.v1.Device.fromObject(object.devices[i]); + var message = new $root.google.cloud.iot.v1.DeviceRegistry(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.eventNotificationConfigs) { + if (!Array.isArray(object.eventNotificationConfigs)) + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: array expected"); + message.eventNotificationConfigs = []; + for (var i = 0; i < object.eventNotificationConfigs.length; ++i) { + if (typeof object.eventNotificationConfigs[i] !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.eventNotificationConfigs: object expected"); + message.eventNotificationConfigs[i] = $root.google.cloud.iot.v1.EventNotificationConfig.fromObject(object.eventNotificationConfigs[i]); + } + } + if (object.stateNotificationConfig != null) { + if (typeof object.stateNotificationConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.stateNotificationConfig: object expected"); + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.fromObject(object.stateNotificationConfig); + } + if (object.mqttConfig != null) { + if (typeof object.mqttConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.mqttConfig: object expected"); + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.fromObject(object.mqttConfig); + } + if (object.httpConfig != null) { + if (typeof object.httpConfig !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.httpConfig: object expected"); + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.fromObject(object.httpConfig); + } + switch (object.logLevel) { + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "NONE": + case 10: + message.logLevel = 10; + break; + case "ERROR": + case 20: + message.logLevel = 20; + break; + case "INFO": + case 30: + message.logLevel = 30; + break; + case "DEBUG": + case 40: + message.logLevel = 40; + break; + } + if (object.credentials) { + if (!Array.isArray(object.credentials)) + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: array expected"); + message.credentials = []; + for (var i = 0; i < object.credentials.length; ++i) { + if (typeof object.credentials[i] !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceRegistry.credentials: object expected"); + message.credentials[i] = $root.google.cloud.iot.v1.RegistryCredential.fromObject(object.credentials[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListDevicesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeviceRegistry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @static - * @param {google.cloud.iot.v1.ListDevicesResponse} message ListDevicesResponse + * @param {google.cloud.iot.v1.DeviceRegistry} message DeviceRegistry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDevicesResponse.toObject = function toObject(message, options) { + DeviceRegistry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.devices = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.devices && message.devices.length) { - object.devices = []; - for (var j = 0; j < message.devices.length; ++j) - object.devices[j] = $root.google.cloud.iot.v1.Device.toObject(message.devices[j], options); + if (options.arrays || options.defaults) { + object.credentials = []; + object.eventNotificationConfigs = []; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (options.defaults) { + object.id = ""; + object.name = ""; + object.mqttConfig = null; + object.stateNotificationConfig = null; + object.httpConfig = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + object.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.toObject(message.mqttConfig, options); + if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + object.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.toObject(message.stateNotificationConfig, options); + if (message.credentials && message.credentials.length) { + object.credentials = []; + for (var j = 0; j < message.credentials.length; ++j) + object.credentials[j] = $root.google.cloud.iot.v1.RegistryCredential.toObject(message.credentials[j], options); + } + if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + object.httpConfig = $root.google.cloud.iot.v1.HttpConfig.toObject(message.httpConfig, options); + if (message.eventNotificationConfigs && message.eventNotificationConfigs.length) { + object.eventNotificationConfigs = []; + for (var j = 0; j < message.eventNotificationConfigs.length; ++j) + object.eventNotificationConfigs[j] = $root.google.cloud.iot.v1.EventNotificationConfig.toObject(message.eventNotificationConfigs[j], options); + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; return object; }; /** - * Converts this ListDevicesResponse to JSON. + * Converts this DeviceRegistry to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDevicesResponse + * @memberof google.cloud.iot.v1.DeviceRegistry * @instance * @returns {Object.} JSON object */ - ListDevicesResponse.prototype.toJSON = function toJSON() { + DeviceRegistry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDevicesResponse; + return DeviceRegistry; })(); - v1.ModifyCloudToDeviceConfigRequest = (function() { + v1.MqttConfig = (function() { /** - * Properties of a ModifyCloudToDeviceConfigRequest. + * Properties of a MqttConfig. * @memberof google.cloud.iot.v1 - * @interface IModifyCloudToDeviceConfigRequest - * @property {string|null} [name] ModifyCloudToDeviceConfigRequest name - * @property {number|Long|null} [versionToUpdate] ModifyCloudToDeviceConfigRequest versionToUpdate - * @property {Uint8Array|null} [binaryData] ModifyCloudToDeviceConfigRequest binaryData + * @interface IMqttConfig + * @property {google.cloud.iot.v1.MqttState|null} [mqttEnabledState] MqttConfig mqttEnabledState */ /** - * Constructs a new ModifyCloudToDeviceConfigRequest. + * Constructs a new MqttConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ModifyCloudToDeviceConfigRequest. - * @implements IModifyCloudToDeviceConfigRequest + * @classdesc Represents a MqttConfig. + * @implements IMqttConfig * @constructor - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set */ - function ModifyCloudToDeviceConfigRequest(properties) { + function MqttConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7845,101 +7435,75 @@ } /** - * ModifyCloudToDeviceConfigRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @instance - */ - ModifyCloudToDeviceConfigRequest.prototype.name = ""; - - /** - * ModifyCloudToDeviceConfigRequest versionToUpdate. - * @member {number|Long} versionToUpdate - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - * @instance - */ - ModifyCloudToDeviceConfigRequest.prototype.versionToUpdate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ModifyCloudToDeviceConfigRequest binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * MqttConfig mqttEnabledState. + * @member {google.cloud.iot.v1.MqttState} mqttEnabledState + * @memberof google.cloud.iot.v1.MqttConfig * @instance */ - ModifyCloudToDeviceConfigRequest.prototype.binaryData = $util.newBuffer([]); + MqttConfig.prototype.mqttEnabledState = 0; /** - * Creates a new ModifyCloudToDeviceConfigRequest instance using the specified properties. + * Creates a new MqttConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest instance + * @param {google.cloud.iot.v1.IMqttConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig instance */ - ModifyCloudToDeviceConfigRequest.create = function create(properties) { - return new ModifyCloudToDeviceConfigRequest(properties); + MqttConfig.create = function create(properties) { + return new MqttConfig(properties); }; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * Encodes the specified MqttConfig message. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModifyCloudToDeviceConfigRequest.encode = function encode(message, writer) { + MqttConfig.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.versionToUpdate); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.binaryData); + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mqttEnabledState); return writer; }; /** - * Encodes the specified ModifyCloudToDeviceConfigRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest.verify|verify} messages. + * Encodes the specified MqttConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.MqttConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest message or plain object to encode + * @param {google.cloud.iot.v1.IMqttConfig} message MqttConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModifyCloudToDeviceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + MqttConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer. + * Decodes a MqttConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModifyCloudToDeviceConfigRequest.decode = function decode(reader, length) { + MqttConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.MqttConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.versionToUpdate = reader.int64(); - break; - case 3: - message.binaryData = reader.bytes(); + message.mqttEnabledState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7950,148 +7514,141 @@ }; /** - * Decodes a ModifyCloudToDeviceConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a MqttConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModifyCloudToDeviceConfigRequest.decodeDelimited = function decodeDelimited(reader) { + MqttConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModifyCloudToDeviceConfigRequest message. + * Verifies a MqttConfig message. * @function verify - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModifyCloudToDeviceConfigRequest.verify = function verify(message) { + MqttConfig.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) - if (!$util.isInteger(message.versionToUpdate) && !(message.versionToUpdate && $util.isInteger(message.versionToUpdate.low) && $util.isInteger(message.versionToUpdate.high))) - return "versionToUpdate: integer|Long expected"; - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + switch (message.mqttEnabledState) { + default: + return "mqttEnabledState: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ModifyCloudToDeviceConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MqttConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} ModifyCloudToDeviceConfigRequest + * @returns {google.cloud.iot.v1.MqttConfig} MqttConfig */ - ModifyCloudToDeviceConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest) + MqttConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.MqttConfig) return object; - var message = new $root.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.versionToUpdate != null) - if ($util.Long) - (message.versionToUpdate = $util.Long.fromValue(object.versionToUpdate)).unsigned = false; - else if (typeof object.versionToUpdate === "string") - message.versionToUpdate = parseInt(object.versionToUpdate, 10); - else if (typeof object.versionToUpdate === "number") - message.versionToUpdate = object.versionToUpdate; - else if (typeof object.versionToUpdate === "object") - message.versionToUpdate = new $util.LongBits(object.versionToUpdate.low >>> 0, object.versionToUpdate.high >>> 0).toNumber(); - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; + var message = new $root.google.cloud.iot.v1.MqttConfig(); + switch (object.mqttEnabledState) { + case "MQTT_STATE_UNSPECIFIED": + case 0: + message.mqttEnabledState = 0; + break; + case "MQTT_ENABLED": + case 1: + message.mqttEnabledState = 1; + break; + case "MQTT_DISABLED": + case 2: + message.mqttEnabledState = 2; + break; + } return message; }; /** - * Creates a plain object from a ModifyCloudToDeviceConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a MqttConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @static - * @param {google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest} message ModifyCloudToDeviceConfigRequest + * @param {google.cloud.iot.v1.MqttConfig} message MqttConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModifyCloudToDeviceConfigRequest.toObject = function toObject(message, options) { + MqttConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionToUpdate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionToUpdate = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) - if (typeof message.versionToUpdate === "number") - object.versionToUpdate = options.longs === String ? String(message.versionToUpdate) : message.versionToUpdate; - else - object.versionToUpdate = options.longs === String ? $util.Long.prototype.toString.call(message.versionToUpdate) : options.longs === Number ? new $util.LongBits(message.versionToUpdate.low >>> 0, message.versionToUpdate.high >>> 0).toNumber() : message.versionToUpdate; - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (options.defaults) + object.mqttEnabledState = options.enums === String ? "MQTT_STATE_UNSPECIFIED" : 0; + if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; return object; }; /** - * Converts this ModifyCloudToDeviceConfigRequest to JSON. + * Converts this MqttConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @memberof google.cloud.iot.v1.MqttConfig * @instance * @returns {Object.} JSON object */ - ModifyCloudToDeviceConfigRequest.prototype.toJSON = function toJSON() { + MqttConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ModifyCloudToDeviceConfigRequest; + return MqttConfig; })(); - v1.ListDeviceConfigVersionsRequest = (function() { + /** + * MqttState enum. + * @name google.cloud.iot.v1.MqttState + * @enum {string} + * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value + * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value + * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value + */ + v1.MqttState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MQTT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MQTT_ENABLED"] = 1; + values[valuesById[2] = "MQTT_DISABLED"] = 2; + return values; + })(); + + v1.HttpConfig = (function() { /** - * Properties of a ListDeviceConfigVersionsRequest. + * Properties of a HttpConfig. * @memberof google.cloud.iot.v1 - * @interface IListDeviceConfigVersionsRequest - * @property {string|null} [name] ListDeviceConfigVersionsRequest name - * @property {number|null} [numVersions] ListDeviceConfigVersionsRequest numVersions + * @interface IHttpConfig + * @property {google.cloud.iot.v1.HttpState|null} [httpEnabledState] HttpConfig httpEnabledState */ /** - * Constructs a new ListDeviceConfigVersionsRequest. + * Constructs a new HttpConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceConfigVersionsRequest. - * @implements IListDeviceConfigVersionsRequest + * @classdesc Represents a HttpConfig. + * @implements IHttpConfig * @constructor - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set */ - function ListDeviceConfigVersionsRequest(properties) { + function HttpConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8099,88 +7656,75 @@ } /** - * ListDeviceConfigVersionsRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest - * @instance - */ - ListDeviceConfigVersionsRequest.prototype.name = ""; - - /** - * ListDeviceConfigVersionsRequest numVersions. - * @member {number} numVersions - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * HttpConfig httpEnabledState. + * @member {google.cloud.iot.v1.HttpState} httpEnabledState + * @memberof google.cloud.iot.v1.HttpConfig * @instance */ - ListDeviceConfigVersionsRequest.prototype.numVersions = 0; + HttpConfig.prototype.httpEnabledState = 0; /** - * Creates a new ListDeviceConfigVersionsRequest instance using the specified properties. + * Creates a new HttpConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest instance + * @param {google.cloud.iot.v1.IHttpConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig instance */ - ListDeviceConfigVersionsRequest.create = function create(properties) { - return new ListDeviceConfigVersionsRequest(properties); + HttpConfig.create = function create(properties) { + return new HttpConfig(properties); }; /** - * Encodes the specified ListDeviceConfigVersionsRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * Encodes the specified HttpConfig message. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode + * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsRequest.encode = function encode(message, writer) { + HttpConfig.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.numVersions != null && message.hasOwnProperty("numVersions")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numVersions); + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.httpEnabledState); return writer; }; /** - * Encodes the specified ListDeviceConfigVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsRequest.verify|verify} messages. + * Encodes the specified HttpConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.HttpConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest message or plain object to encode + * @param {google.cloud.iot.v1.IHttpConfig} message HttpConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + HttpConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer. + * Decodes a HttpConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsRequest.decode = function decode(reader, length) { + HttpConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.HttpConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.numVersions = reader.int32(); + message.httpEnabledState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -8191,117 +7735,196 @@ }; /** - * Decodes a ListDeviceConfigVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + HttpConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceConfigVersionsRequest message. + * Verifies a HttpConfig message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceConfigVersionsRequest.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.numVersions != null && message.hasOwnProperty("numVersions")) - if (!$util.isInteger(message.numVersions)) - return "numVersions: integer expected"; + HttpConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + switch (message.httpEnabledState) { + default: + return "httpEnabledState: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ListDeviceConfigVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} ListDeviceConfigVersionsRequest + * @returns {google.cloud.iot.v1.HttpConfig} HttpConfig */ - ListDeviceConfigVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest) + HttpConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.HttpConfig) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.numVersions != null) - message.numVersions = object.numVersions | 0; + var message = new $root.google.cloud.iot.v1.HttpConfig(); + switch (object.httpEnabledState) { + case "HTTP_STATE_UNSPECIFIED": + case 0: + message.httpEnabledState = 0; + break; + case "HTTP_ENABLED": + case 1: + message.httpEnabledState = 1; + break; + case "HTTP_DISABLED": + case 2: + message.httpEnabledState = 2; + break; + } return message; }; /** - * Creates a plain object from a ListDeviceConfigVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a HttpConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @static - * @param {google.cloud.iot.v1.ListDeviceConfigVersionsRequest} message ListDeviceConfigVersionsRequest + * @param {google.cloud.iot.v1.HttpConfig} message HttpConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceConfigVersionsRequest.toObject = function toObject(message, options) { + HttpConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.numVersions = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.numVersions != null && message.hasOwnProperty("numVersions")) - object.numVersions = message.numVersions; + if (options.defaults) + object.httpEnabledState = options.enums === String ? "HTTP_STATE_UNSPECIFIED" : 0; + if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; return object; }; /** - * Converts this ListDeviceConfigVersionsRequest to JSON. + * Converts this HttpConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @memberof google.cloud.iot.v1.HttpConfig * @instance * @returns {Object.} JSON object */ - ListDeviceConfigVersionsRequest.prototype.toJSON = function toJSON() { + HttpConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceConfigVersionsRequest; + return HttpConfig; })(); - v1.ListDeviceConfigVersionsResponse = (function() { + /** + * HttpState enum. + * @name google.cloud.iot.v1.HttpState + * @enum {string} + * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value + * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value + * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value + */ + v1.HttpState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HTTP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTP_ENABLED"] = 1; + values[valuesById[2] = "HTTP_DISABLED"] = 2; + return values; + })(); + + /** + * LogLevel enum. + * @name google.cloud.iot.v1.LogLevel + * @enum {string} + * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value + * @property {number} NONE=10 NONE value + * @property {number} ERROR=20 ERROR value + * @property {number} INFO=30 INFO value + * @property {number} DEBUG=40 DEBUG value + */ + v1.LogLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[10] = "NONE"] = 10; + values[valuesById[20] = "ERROR"] = 20; + values[valuesById[30] = "INFO"] = 30; + values[valuesById[40] = "DEBUG"] = 40; + return values; + })(); + + /** + * GatewayType enum. + * @name google.cloud.iot.v1.GatewayType + * @enum {string} + * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value + * @property {number} GATEWAY=1 GATEWAY value + * @property {number} NON_GATEWAY=2 NON_GATEWAY value + */ + v1.GatewayType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GATEWAY"] = 1; + values[valuesById[2] = "NON_GATEWAY"] = 2; + return values; + })(); + + /** + * GatewayAuthMethod enum. + * @name google.cloud.iot.v1.GatewayAuthMethod + * @enum {string} + * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value + * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value + * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value + * @property {number} ASSOCIATION_AND_DEVICE_AUTH_TOKEN=3 ASSOCIATION_AND_DEVICE_AUTH_TOKEN value + */ + v1.GatewayAuthMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GATEWAY_AUTH_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "ASSOCIATION_ONLY"] = 1; + values[valuesById[2] = "DEVICE_AUTH_TOKEN_ONLY"] = 2; + values[valuesById[3] = "ASSOCIATION_AND_DEVICE_AUTH_TOKEN"] = 3; + return values; + })(); + + v1.EventNotificationConfig = (function() { /** - * Properties of a ListDeviceConfigVersionsResponse. + * Properties of an EventNotificationConfig. * @memberof google.cloud.iot.v1 - * @interface IListDeviceConfigVersionsResponse - * @property {Array.|null} [deviceConfigs] ListDeviceConfigVersionsResponse deviceConfigs + * @interface IEventNotificationConfig + * @property {string|null} [subfolderMatches] EventNotificationConfig subfolderMatches + * @property {string|null} [pubsubTopicName] EventNotificationConfig pubsubTopicName */ /** - * Constructs a new ListDeviceConfigVersionsResponse. + * Constructs a new EventNotificationConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceConfigVersionsResponse. - * @implements IListDeviceConfigVersionsResponse + * @classdesc Represents an EventNotificationConfig. + * @implements IEventNotificationConfig * @constructor - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set */ - function ListDeviceConfigVersionsResponse(properties) { - this.deviceConfigs = []; + function EventNotificationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8309,78 +7932,88 @@ } /** - * ListDeviceConfigVersionsResponse deviceConfigs. - * @member {Array.} deviceConfigs - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * EventNotificationConfig subfolderMatches. + * @member {string} subfolderMatches + * @memberof google.cloud.iot.v1.EventNotificationConfig * @instance */ - ListDeviceConfigVersionsResponse.prototype.deviceConfigs = $util.emptyArray; + EventNotificationConfig.prototype.subfolderMatches = ""; /** - * Creates a new ListDeviceConfigVersionsResponse instance using the specified properties. + * EventNotificationConfig pubsubTopicName. + * @member {string} pubsubTopicName + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @instance + */ + EventNotificationConfig.prototype.pubsubTopicName = ""; + + /** + * Creates a new EventNotificationConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse instance + * @param {google.cloud.iot.v1.IEventNotificationConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig instance */ - ListDeviceConfigVersionsResponse.create = function create(properties) { - return new ListDeviceConfigVersionsResponse(properties); + EventNotificationConfig.create = function create(properties) { + return new EventNotificationConfig(properties); }; /** - * Encodes the specified ListDeviceConfigVersionsResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * Encodes the specified EventNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode + * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsResponse.encode = function encode(message, writer) { + EventNotificationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceConfigs != null && message.deviceConfigs.length) - for (var i = 0; i < message.deviceConfigs.length; ++i) - $root.google.cloud.iot.v1.DeviceConfig.encode(message.deviceConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subfolderMatches); return writer; }; /** - * Encodes the specified ListDeviceConfigVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse.verify|verify} messages. + * Encodes the specified EventNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.EventNotificationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.IListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse message or plain object to encode + * @param {google.cloud.iot.v1.IEventNotificationConfig} message EventNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceConfigVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + EventNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer. + * Decodes an EventNotificationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsResponse.decode = function decode(reader, length) { + EventNotificationConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.EventNotificationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: + message.subfolderMatches = reader.string(); + break; case 1: - if (!(message.deviceConfigs && message.deviceConfigs.length)) - message.deviceConfigs = []; - message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); + message.pubsubTopicName = reader.string(); break; default: reader.skipType(tag & 7); @@ -8391,125 +8024,116 @@ }; /** - * Decodes a ListDeviceConfigVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes an EventNotificationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceConfigVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + EventNotificationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceConfigVersionsResponse message. + * Verifies an EventNotificationConfig message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceConfigVersionsResponse.verify = function verify(message) { + EventNotificationConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceConfigs != null && message.hasOwnProperty("deviceConfigs")) { - if (!Array.isArray(message.deviceConfigs)) - return "deviceConfigs: array expected"; - for (var i = 0; i < message.deviceConfigs.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceConfig.verify(message.deviceConfigs[i]); - if (error) - return "deviceConfigs." + error; - } - } + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + if (!$util.isString(message.subfolderMatches)) + return "subfolderMatches: string expected"; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (!$util.isString(message.pubsubTopicName)) + return "pubsubTopicName: string expected"; return null; }; /** - * Creates a ListDeviceConfigVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EventNotificationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} ListDeviceConfigVersionsResponse + * @returns {google.cloud.iot.v1.EventNotificationConfig} EventNotificationConfig */ - ListDeviceConfigVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse) + EventNotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.EventNotificationConfig) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceConfigVersionsResponse(); - if (object.deviceConfigs) { - if (!Array.isArray(object.deviceConfigs)) - throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: array expected"); - message.deviceConfigs = []; - for (var i = 0; i < object.deviceConfigs.length; ++i) { - if (typeof object.deviceConfigs[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDeviceConfigVersionsResponse.deviceConfigs: object expected"); - message.deviceConfigs[i] = $root.google.cloud.iot.v1.DeviceConfig.fromObject(object.deviceConfigs[i]); - } - } + var message = new $root.google.cloud.iot.v1.EventNotificationConfig(); + if (object.subfolderMatches != null) + message.subfolderMatches = String(object.subfolderMatches); + if (object.pubsubTopicName != null) + message.pubsubTopicName = String(object.pubsubTopicName); return message; }; /** - * Creates a plain object from a ListDeviceConfigVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from an EventNotificationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @static - * @param {google.cloud.iot.v1.ListDeviceConfigVersionsResponse} message ListDeviceConfigVersionsResponse + * @param {google.cloud.iot.v1.EventNotificationConfig} message EventNotificationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceConfigVersionsResponse.toObject = function toObject(message, options) { + EventNotificationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceConfigs = []; - if (message.deviceConfigs && message.deviceConfigs.length) { - object.deviceConfigs = []; - for (var j = 0; j < message.deviceConfigs.length; ++j) - object.deviceConfigs[j] = $root.google.cloud.iot.v1.DeviceConfig.toObject(message.deviceConfigs[j], options); + if (options.defaults) { + object.pubsubTopicName = ""; + object.subfolderMatches = ""; } + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + object.pubsubTopicName = message.pubsubTopicName; + if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + object.subfolderMatches = message.subfolderMatches; return object; }; /** - * Converts this ListDeviceConfigVersionsResponse to JSON. + * Converts this EventNotificationConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @memberof google.cloud.iot.v1.EventNotificationConfig * @instance * @returns {Object.} JSON object */ - ListDeviceConfigVersionsResponse.prototype.toJSON = function toJSON() { + EventNotificationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceConfigVersionsResponse; + return EventNotificationConfig; })(); - v1.ListDeviceStatesRequest = (function() { + v1.StateNotificationConfig = (function() { /** - * Properties of a ListDeviceStatesRequest. + * Properties of a StateNotificationConfig. * @memberof google.cloud.iot.v1 - * @interface IListDeviceStatesRequest - * @property {string|null} [name] ListDeviceStatesRequest name - * @property {number|null} [numStates] ListDeviceStatesRequest numStates + * @interface IStateNotificationConfig + * @property {string|null} [pubsubTopicName] StateNotificationConfig pubsubTopicName */ /** - * Constructs a new ListDeviceStatesRequest. + * Constructs a new StateNotificationConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceStatesRequest. - * @implements IListDeviceStatesRequest + * @classdesc Represents a StateNotificationConfig. + * @implements IStateNotificationConfig * @constructor - * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set */ - function ListDeviceStatesRequest(properties) { + function StateNotificationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8517,88 +8141,75 @@ } /** - * ListDeviceStatesRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest - * @instance - */ - ListDeviceStatesRequest.prototype.name = ""; - - /** - * ListDeviceStatesRequest numStates. - * @member {number} numStates - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * StateNotificationConfig pubsubTopicName. + * @member {string} pubsubTopicName + * @memberof google.cloud.iot.v1.StateNotificationConfig * @instance */ - ListDeviceStatesRequest.prototype.numStates = 0; + StateNotificationConfig.prototype.pubsubTopicName = ""; /** - * Creates a new ListDeviceStatesRequest instance using the specified properties. + * Creates a new StateNotificationConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.IListDeviceStatesRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest instance + * @param {google.cloud.iot.v1.IStateNotificationConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig instance */ - ListDeviceStatesRequest.create = function create(properties) { - return new ListDeviceStatesRequest(properties); + StateNotificationConfig.create = function create(properties) { + return new StateNotificationConfig(properties); }; /** - * Encodes the specified ListDeviceStatesRequest message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * Encodes the specified StateNotificationConfig message. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesRequest.encode = function encode(message, writer) { + StateNotificationConfig.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.numStates != null && message.hasOwnProperty("numStates")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numStates); + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); return writer; }; /** - * Encodes the specified ListDeviceStatesRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesRequest.verify|verify} messages. + * Encodes the specified StateNotificationConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.StateNotificationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.IListDeviceStatesRequest} message ListDeviceStatesRequest message or plain object to encode + * @param {google.cloud.iot.v1.IStateNotificationConfig} message StateNotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + StateNotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer. + * Decodes a StateNotificationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesRequest.decode = function decode(reader, length) { + StateNotificationConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.StateNotificationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.numStates = reader.int32(); + message.pubsubTopicName = reader.string(); break; default: reader.skipType(tag & 7); @@ -8609,117 +8220,107 @@ }; /** - * Decodes a ListDeviceStatesRequest message from the specified reader or buffer, length delimited. + * Decodes a StateNotificationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesRequest.decodeDelimited = function decodeDelimited(reader) { + StateNotificationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceStatesRequest message. + * Verifies a StateNotificationConfig message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceStatesRequest.verify = function verify(message) { + StateNotificationConfig.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.numStates != null && message.hasOwnProperty("numStates")) - if (!$util.isInteger(message.numStates)) - return "numStates: integer expected"; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (!$util.isString(message.pubsubTopicName)) + return "pubsubTopicName: string expected"; return null; }; /** - * Creates a ListDeviceStatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StateNotificationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceStatesRequest} ListDeviceStatesRequest + * @returns {google.cloud.iot.v1.StateNotificationConfig} StateNotificationConfig */ - ListDeviceStatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesRequest) + StateNotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.StateNotificationConfig) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceStatesRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.numStates != null) - message.numStates = object.numStates | 0; + var message = new $root.google.cloud.iot.v1.StateNotificationConfig(); + if (object.pubsubTopicName != null) + message.pubsubTopicName = String(object.pubsubTopicName); return message; }; /** - * Creates a plain object from a ListDeviceStatesRequest message. Also converts values to other types if specified. + * Creates a plain object from a StateNotificationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @static - * @param {google.cloud.iot.v1.ListDeviceStatesRequest} message ListDeviceStatesRequest + * @param {google.cloud.iot.v1.StateNotificationConfig} message StateNotificationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceStatesRequest.toObject = function toObject(message, options) { + StateNotificationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.numStates = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.numStates != null && message.hasOwnProperty("numStates")) - object.numStates = message.numStates; + if (options.defaults) + object.pubsubTopicName = ""; + if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + object.pubsubTopicName = message.pubsubTopicName; return object; }; /** - * Converts this ListDeviceStatesRequest to JSON. + * Converts this StateNotificationConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @memberof google.cloud.iot.v1.StateNotificationConfig * @instance * @returns {Object.} JSON object */ - ListDeviceStatesRequest.prototype.toJSON = function toJSON() { + StateNotificationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceStatesRequest; + return StateNotificationConfig; })(); - v1.ListDeviceStatesResponse = (function() { + v1.RegistryCredential = (function() { /** - * Properties of a ListDeviceStatesResponse. + * Properties of a RegistryCredential. * @memberof google.cloud.iot.v1 - * @interface IListDeviceStatesResponse - * @property {Array.|null} [deviceStates] ListDeviceStatesResponse deviceStates + * @interface IRegistryCredential + * @property {google.cloud.iot.v1.IPublicKeyCertificate|null} [publicKeyCertificate] RegistryCredential publicKeyCertificate */ /** - * Constructs a new ListDeviceStatesResponse. + * Constructs a new RegistryCredential. * @memberof google.cloud.iot.v1 - * @classdesc Represents a ListDeviceStatesResponse. - * @implements IListDeviceStatesResponse + * @classdesc Represents a RegistryCredential. + * @implements IRegistryCredential * @constructor - * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set */ - function ListDeviceStatesResponse(properties) { - this.deviceStates = []; + function RegistryCredential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8727,78 +8328,89 @@ } /** - * ListDeviceStatesResponse deviceStates. - * @member {Array.} deviceStates - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * RegistryCredential publicKeyCertificate. + * @member {google.cloud.iot.v1.IPublicKeyCertificate|null|undefined} publicKeyCertificate + * @memberof google.cloud.iot.v1.RegistryCredential * @instance */ - ListDeviceStatesResponse.prototype.deviceStates = $util.emptyArray; + RegistryCredential.prototype.publicKeyCertificate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListDeviceStatesResponse instance using the specified properties. + * RegistryCredential credential. + * @member {"publicKeyCertificate"|undefined} credential + * @memberof google.cloud.iot.v1.RegistryCredential + * @instance + */ + Object.defineProperty(RegistryCredential.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["publicKeyCertificate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RegistryCredential instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.IListDeviceStatesResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse instance + * @param {google.cloud.iot.v1.IRegistryCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential instance */ - ListDeviceStatesResponse.create = function create(properties) { - return new ListDeviceStatesResponse(properties); + RegistryCredential.create = function create(properties) { + return new RegistryCredential(properties); }; /** - * Encodes the specified ListDeviceStatesResponse message. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * Encodes the specified RegistryCredential message. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesResponse.encode = function encode(message, writer) { + RegistryCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceStates != null && message.deviceStates.length) - for (var i = 0; i < message.deviceStates.length; ++i) - $root.google.cloud.iot.v1.DeviceState.encode(message.deviceStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) + $root.google.cloud.iot.v1.PublicKeyCertificate.encode(message.publicKeyCertificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeviceStatesResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.ListDeviceStatesResponse.verify|verify} messages. + * Encodes the specified RegistryCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.RegistryCredential.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.IListDeviceStatesResponse} message ListDeviceStatesResponse message or plain object to encode + * @param {google.cloud.iot.v1.IRegistryCredential} message RegistryCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + RegistryCredential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer. + * Decodes a RegistryCredential message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesResponse.decode = function decode(reader, length) { + RegistryCredential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.RegistryCredential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.deviceStates && message.deviceStates.length)) - message.deviceStates = []; - message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8809,126 +8421,122 @@ }; /** - * Decodes a ListDeviceStatesResponse message from the specified reader or buffer, length delimited. + * Decodes a RegistryCredential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceStatesResponse.decodeDelimited = function decodeDelimited(reader) { + RegistryCredential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceStatesResponse message. + * Verifies a RegistryCredential message. * @function verify - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceStatesResponse.verify = function verify(message) { + RegistryCredential.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceStates != null && message.hasOwnProperty("deviceStates")) { - if (!Array.isArray(message.deviceStates)) - return "deviceStates: array expected"; - for (var i = 0; i < message.deviceStates.length; ++i) { - var error = $root.google.cloud.iot.v1.DeviceState.verify(message.deviceStates[i]); + var properties = {}; + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { + properties.credential = 1; + { + var error = $root.google.cloud.iot.v1.PublicKeyCertificate.verify(message.publicKeyCertificate); if (error) - return "deviceStates." + error; + return "publicKeyCertificate." + error; } } return null; }; /** - * Creates a ListDeviceStatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RegistryCredential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.ListDeviceStatesResponse} ListDeviceStatesResponse + * @returns {google.cloud.iot.v1.RegistryCredential} RegistryCredential */ - ListDeviceStatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.ListDeviceStatesResponse) + RegistryCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.RegistryCredential) return object; - var message = new $root.google.cloud.iot.v1.ListDeviceStatesResponse(); - if (object.deviceStates) { - if (!Array.isArray(object.deviceStates)) - throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: array expected"); - message.deviceStates = []; - for (var i = 0; i < object.deviceStates.length; ++i) { - if (typeof object.deviceStates[i] !== "object") - throw TypeError(".google.cloud.iot.v1.ListDeviceStatesResponse.deviceStates: object expected"); - message.deviceStates[i] = $root.google.cloud.iot.v1.DeviceState.fromObject(object.deviceStates[i]); - } + var message = new $root.google.cloud.iot.v1.RegistryCredential(); + if (object.publicKeyCertificate != null) { + if (typeof object.publicKeyCertificate !== "object") + throw TypeError(".google.cloud.iot.v1.RegistryCredential.publicKeyCertificate: object expected"); + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.fromObject(object.publicKeyCertificate); } return message; }; /** - * Creates a plain object from a ListDeviceStatesResponse message. Also converts values to other types if specified. + * Creates a plain object from a RegistryCredential message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @static - * @param {google.cloud.iot.v1.ListDeviceStatesResponse} message ListDeviceStatesResponse + * @param {google.cloud.iot.v1.RegistryCredential} message RegistryCredential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceStatesResponse.toObject = function toObject(message, options) { + RegistryCredential.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceStates = []; - if (message.deviceStates && message.deviceStates.length) { - object.deviceStates = []; - for (var j = 0; j < message.deviceStates.length; ++j) - object.deviceStates[j] = $root.google.cloud.iot.v1.DeviceState.toObject(message.deviceStates[j], options); + if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) { + object.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.toObject(message.publicKeyCertificate, options); + if (options.oneofs) + object.credential = "publicKeyCertificate"; } return object; }; /** - * Converts this ListDeviceStatesResponse to JSON. + * Converts this RegistryCredential to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @memberof google.cloud.iot.v1.RegistryCredential * @instance * @returns {Object.} JSON object */ - ListDeviceStatesResponse.prototype.toJSON = function toJSON() { + RegistryCredential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeviceStatesResponse; + return RegistryCredential; })(); - v1.SendCommandToDeviceRequest = (function() { + v1.X509CertificateDetails = (function() { /** - * Properties of a SendCommandToDeviceRequest. + * Properties of a X509CertificateDetails. * @memberof google.cloud.iot.v1 - * @interface ISendCommandToDeviceRequest - * @property {string|null} [name] SendCommandToDeviceRequest name - * @property {Uint8Array|null} [binaryData] SendCommandToDeviceRequest binaryData - * @property {string|null} [subfolder] SendCommandToDeviceRequest subfolder + * @interface IX509CertificateDetails + * @property {string|null} [issuer] X509CertificateDetails issuer + * @property {string|null} [subject] X509CertificateDetails subject + * @property {google.protobuf.ITimestamp|null} [startTime] X509CertificateDetails startTime + * @property {google.protobuf.ITimestamp|null} [expiryTime] X509CertificateDetails expiryTime + * @property {string|null} [signatureAlgorithm] X509CertificateDetails signatureAlgorithm + * @property {string|null} [publicKeyType] X509CertificateDetails publicKeyType */ /** - * Constructs a new SendCommandToDeviceRequest. + * Constructs a new X509CertificateDetails. * @memberof google.cloud.iot.v1 - * @classdesc Represents a SendCommandToDeviceRequest. - * @implements ISendCommandToDeviceRequest + * @classdesc Represents a X509CertificateDetails. + * @implements IX509CertificateDetails * @constructor - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set */ - function SendCommandToDeviceRequest(properties) { + function X509CertificateDetails(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8936,101 +8544,140 @@ } /** - * SendCommandToDeviceRequest name. - * @member {string} name - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * X509CertificateDetails issuer. + * @member {string} issuer + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance */ - SendCommandToDeviceRequest.prototype.name = ""; + X509CertificateDetails.prototype.issuer = ""; /** - * SendCommandToDeviceRequest binaryData. - * @member {Uint8Array} binaryData - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * X509CertificateDetails subject. + * @member {string} subject + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance */ - SendCommandToDeviceRequest.prototype.binaryData = $util.newBuffer([]); + X509CertificateDetails.prototype.subject = ""; /** - * SendCommandToDeviceRequest subfolder. - * @member {string} subfolder - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * X509CertificateDetails startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance */ - SendCommandToDeviceRequest.prototype.subfolder = ""; + X509CertificateDetails.prototype.startTime = null; /** - * Creates a new SendCommandToDeviceRequest instance using the specified properties. + * X509CertificateDetails expiryTime. + * @member {google.protobuf.ITimestamp|null|undefined} expiryTime + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.expiryTime = null; + + /** + * X509CertificateDetails signatureAlgorithm. + * @member {string} signatureAlgorithm + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.signatureAlgorithm = ""; + + /** + * X509CertificateDetails publicKeyType. + * @member {string} publicKeyType + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @instance + */ + X509CertificateDetails.prototype.publicKeyType = ""; + + /** + * Creates a new X509CertificateDetails instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest instance + * @param {google.cloud.iot.v1.IX509CertificateDetails=} [properties] Properties to set + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails instance */ - SendCommandToDeviceRequest.create = function create(properties) { - return new SendCommandToDeviceRequest(properties); + X509CertificateDetails.create = function create(properties) { + return new X509CertificateDetails(properties); }; /** - * Encodes the specified SendCommandToDeviceRequest message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * Encodes the specified X509CertificateDetails message. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceRequest.encode = function encode(message, writer) { + X509CertificateDetails.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.binaryData != null && message.hasOwnProperty("binaryData")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); - if (message.subfolder != null && message.hasOwnProperty("subfolder")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subfolder); + if (message.issuer != null && message.hasOwnProperty("issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.subject != null && message.hasOwnProperty("subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + $root.google.protobuf.Timestamp.encode(message.expiryTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signatureAlgorithm); + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.publicKeyType); return writer; }; /** - * Encodes the specified SendCommandToDeviceRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceRequest.verify|verify} messages. + * Encodes the specified X509CertificateDetails message, length delimited. Does not implicitly {@link google.cloud.iot.v1.X509CertificateDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceRequest} message SendCommandToDeviceRequest message or plain object to encode + * @param {google.cloud.iot.v1.IX509CertificateDetails} message X509CertificateDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + X509CertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer. + * Decodes a X509CertificateDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceRequest.decode = function decode(reader, length) { + X509CertificateDetails.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.X509CertificateDetails(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.issuer = reader.string(); + break; + case 2: + message.subject = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 2: - message.binaryData = reader.bytes(); + case 5: + message.signatureAlgorithm = reader.string(); break; - case 3: - message.subfolder = reader.string(); + case 6: + message.publicKeyType = reader.string(); break; default: reader.skipType(tag & 7); @@ -9041,132 +8688,160 @@ }; /** - * Decodes a SendCommandToDeviceRequest message from the specified reader or buffer, length delimited. + * Decodes a X509CertificateDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + X509CertificateDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SendCommandToDeviceRequest message. + * Verifies a X509CertificateDetails message. * @function verify - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SendCommandToDeviceRequest.verify = function verify(message) { + X509CertificateDetails.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.binaryData != null && message.hasOwnProperty("binaryData")) - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; - if (message.subfolder != null && message.hasOwnProperty("subfolder")) - if (!$util.isString(message.subfolder)) - return "subfolder: string expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expiryTime); + if (error) + return "expiryTime." + error; + } + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + if (!$util.isString(message.signatureAlgorithm)) + return "signatureAlgorithm: string expected"; + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + if (!$util.isString(message.publicKeyType)) + return "publicKeyType: string expected"; return null; }; /** - * Creates a SendCommandToDeviceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a X509CertificateDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.SendCommandToDeviceRequest} SendCommandToDeviceRequest + * @returns {google.cloud.iot.v1.X509CertificateDetails} X509CertificateDetails */ - SendCommandToDeviceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceRequest) + X509CertificateDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.X509CertificateDetails) return object; - var message = new $root.google.cloud.iot.v1.SendCommandToDeviceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) - message.binaryData = object.binaryData; - if (object.subfolder != null) - message.subfolder = String(object.subfolder); + var message = new $root.google.cloud.iot.v1.X509CertificateDetails(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.subject != null) + message.subject = String(object.subject); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".google.cloud.iot.v1.X509CertificateDetails.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Timestamp.fromObject(object.expiryTime); + } + if (object.signatureAlgorithm != null) + message.signatureAlgorithm = String(object.signatureAlgorithm); + if (object.publicKeyType != null) + message.publicKeyType = String(object.publicKeyType); return message; }; /** - * Creates a plain object from a SendCommandToDeviceRequest message. Also converts values to other types if specified. + * Creates a plain object from a X509CertificateDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @static - * @param {google.cloud.iot.v1.SendCommandToDeviceRequest} message SendCommandToDeviceRequest + * @param {google.cloud.iot.v1.X509CertificateDetails} message X509CertificateDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SendCommandToDeviceRequest.toObject = function toObject(message, options) { + X509CertificateDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - if (options.bytes === String) - object.binaryData = ""; - else { - object.binaryData = []; - if (options.bytes !== Array) - object.binaryData = $util.newBuffer(object.binaryData); - } - object.subfolder = ""; + object.issuer = ""; + object.subject = ""; + object.startTime = null; + object.expiryTime = null; + object.signatureAlgorithm = ""; + object.publicKeyType = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.binaryData != null && message.hasOwnProperty("binaryData")) - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; - if (message.subfolder != null && message.hasOwnProperty("subfolder")) - object.subfolder = message.subfolder; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + object.expiryTime = $root.google.protobuf.Timestamp.toObject(message.expiryTime, options); + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + object.signatureAlgorithm = message.signatureAlgorithm; + if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + object.publicKeyType = message.publicKeyType; return object; }; /** - * Converts this SendCommandToDeviceRequest to JSON. + * Converts this X509CertificateDetails to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @memberof google.cloud.iot.v1.X509CertificateDetails * @instance * @returns {Object.} JSON object */ - SendCommandToDeviceRequest.prototype.toJSON = function toJSON() { + X509CertificateDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SendCommandToDeviceRequest; + return X509CertificateDetails; })(); - v1.SendCommandToDeviceResponse = (function() { + v1.PublicKeyCertificate = (function() { /** - * Properties of a SendCommandToDeviceResponse. + * Properties of a PublicKeyCertificate. * @memberof google.cloud.iot.v1 - * @interface ISendCommandToDeviceResponse + * @interface IPublicKeyCertificate + * @property {google.cloud.iot.v1.PublicKeyCertificateFormat|null} [format] PublicKeyCertificate format + * @property {string|null} [certificate] PublicKeyCertificate certificate + * @property {google.cloud.iot.v1.IX509CertificateDetails|null} [x509Details] PublicKeyCertificate x509Details */ /** - * Constructs a new SendCommandToDeviceResponse. + * Constructs a new PublicKeyCertificate. * @memberof google.cloud.iot.v1 - * @classdesc Represents a SendCommandToDeviceResponse. - * @implements ISendCommandToDeviceResponse + * @classdesc Represents a PublicKeyCertificate. + * @implements IPublicKeyCertificate * @constructor - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set */ - function SendCommandToDeviceResponse(properties) { + function PublicKeyCertificate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9174,63 +8849,102 @@ } /** - * Creates a new SendCommandToDeviceResponse instance using the specified properties. + * PublicKeyCertificate format. + * @member {google.cloud.iot.v1.PublicKeyCertificateFormat} format + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.format = 0; + + /** + * PublicKeyCertificate certificate. + * @member {string} certificate + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.certificate = ""; + + /** + * PublicKeyCertificate x509Details. + * @member {google.cloud.iot.v1.IX509CertificateDetails|null|undefined} x509Details + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @instance + */ + PublicKeyCertificate.prototype.x509Details = null; + + /** + * Creates a new PublicKeyCertificate instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse instance + * @param {google.cloud.iot.v1.IPublicKeyCertificate=} [properties] Properties to set + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate instance */ - SendCommandToDeviceResponse.create = function create(properties) { - return new SendCommandToDeviceResponse(properties); + PublicKeyCertificate.create = function create(properties) { + return new PublicKeyCertificate(properties); }; /** - * Encodes the specified SendCommandToDeviceResponse message. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * Encodes the specified PublicKeyCertificate message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceResponse.encode = function encode(message, writer) { + PublicKeyCertificate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.certificate != null && message.hasOwnProperty("certificate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificate); + if (message.x509Details != null && message.hasOwnProperty("x509Details")) + $root.google.cloud.iot.v1.X509CertificateDetails.encode(message.x509Details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified SendCommandToDeviceResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.SendCommandToDeviceResponse.verify|verify} messages. + * Encodes the specified PublicKeyCertificate message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCertificate.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.ISendCommandToDeviceResponse} message SendCommandToDeviceResponse message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCertificate} message PublicKeyCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendCommandToDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { + PublicKeyCertificate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer. + * Decodes a PublicKeyCertificate message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceResponse.decode = function decode(reader, length) { + PublicKeyCertificate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.format = reader.int32(); + break; + case 2: + message.certificate = reader.string(); + break; + case 3: + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -9240,96 +8954,157 @@ }; /** - * Decodes a SendCommandToDeviceResponse message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCertificate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendCommandToDeviceResponse.decodeDelimited = function decodeDelimited(reader) { + PublicKeyCertificate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SendCommandToDeviceResponse message. + * Verifies a PublicKeyCertificate message. * @function verify - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SendCommandToDeviceResponse.verify = function verify(message) { + PublicKeyCertificate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + break; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + if (!$util.isString(message.certificate)) + return "certificate: string expected"; + if (message.x509Details != null && message.hasOwnProperty("x509Details")) { + var error = $root.google.cloud.iot.v1.X509CertificateDetails.verify(message.x509Details); + if (error) + return "x509Details." + error; + } return null; }; /** - * Creates a SendCommandToDeviceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCertificate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.SendCommandToDeviceResponse} SendCommandToDeviceResponse + * @returns {google.cloud.iot.v1.PublicKeyCertificate} PublicKeyCertificate */ - SendCommandToDeviceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.SendCommandToDeviceResponse) + PublicKeyCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.PublicKeyCertificate) return object; - return new $root.google.cloud.iot.v1.SendCommandToDeviceResponse(); + var message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); + switch (object.format) { + case "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": + case 0: + message.format = 0; + break; + case "X509_CERTIFICATE_PEM": + case 1: + message.format = 1; + break; + } + if (object.certificate != null) + message.certificate = String(object.certificate); + if (object.x509Details != null) { + if (typeof object.x509Details !== "object") + throw TypeError(".google.cloud.iot.v1.PublicKeyCertificate.x509Details: object expected"); + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.fromObject(object.x509Details); + } + return message; }; /** - * Creates a plain object from a SendCommandToDeviceResponse message. Also converts values to other types if specified. + * Creates a plain object from a PublicKeyCertificate message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @static - * @param {google.cloud.iot.v1.SendCommandToDeviceResponse} message SendCommandToDeviceResponse + * @param {google.cloud.iot.v1.PublicKeyCertificate} message PublicKeyCertificate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SendCommandToDeviceResponse.toObject = function toObject() { - return {}; + PublicKeyCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT" : 0; + object.certificate = ""; + object.x509Details = null; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = message.certificate; + if (message.x509Details != null && message.hasOwnProperty("x509Details")) + object.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.toObject(message.x509Details, options); + return object; }; /** - * Converts this SendCommandToDeviceResponse to JSON. + * Converts this PublicKeyCertificate to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @memberof google.cloud.iot.v1.PublicKeyCertificate * @instance * @returns {Object.} JSON object */ - SendCommandToDeviceResponse.prototype.toJSON = function toJSON() { + PublicKeyCertificate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SendCommandToDeviceResponse; + return PublicKeyCertificate; })(); - v1.BindDeviceToGatewayRequest = (function() { + /** + * PublicKeyCertificateFormat enum. + * @name google.cloud.iot.v1.PublicKeyCertificateFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value + * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value + */ + v1.PublicKeyCertificateFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT"] = 0; + values[valuesById[1] = "X509_CERTIFICATE_PEM"] = 1; + return values; + })(); + + v1.DeviceCredential = (function() { /** - * Properties of a BindDeviceToGatewayRequest. + * Properties of a DeviceCredential. * @memberof google.cloud.iot.v1 - * @interface IBindDeviceToGatewayRequest - * @property {string|null} [parent] BindDeviceToGatewayRequest parent - * @property {string|null} [gatewayId] BindDeviceToGatewayRequest gatewayId - * @property {string|null} [deviceId] BindDeviceToGatewayRequest deviceId + * @interface IDeviceCredential + * @property {google.cloud.iot.v1.IPublicKeyCredential|null} [publicKey] DeviceCredential publicKey + * @property {google.protobuf.ITimestamp|null} [expirationTime] DeviceCredential expirationTime */ /** - * Constructs a new BindDeviceToGatewayRequest. + * Constructs a new DeviceCredential. * @memberof google.cloud.iot.v1 - * @classdesc Represents a BindDeviceToGatewayRequest. - * @implements IBindDeviceToGatewayRequest + * @classdesc Represents a DeviceCredential. + * @implements IDeviceCredential * @constructor - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set */ - function BindDeviceToGatewayRequest(properties) { + function DeviceCredential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9337,101 +9112,102 @@ } /** - * BindDeviceToGatewayRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * DeviceCredential publicKey. + * @member {google.cloud.iot.v1.IPublicKeyCredential|null|undefined} publicKey + * @memberof google.cloud.iot.v1.DeviceCredential * @instance */ - BindDeviceToGatewayRequest.prototype.parent = ""; + DeviceCredential.prototype.publicKey = null; /** - * BindDeviceToGatewayRequest gatewayId. - * @member {string} gatewayId - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * DeviceCredential expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.cloud.iot.v1.DeviceCredential * @instance */ - BindDeviceToGatewayRequest.prototype.gatewayId = ""; + DeviceCredential.prototype.expirationTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BindDeviceToGatewayRequest deviceId. - * @member {string} deviceId - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * DeviceCredential credential. + * @member {"publicKey"|undefined} credential + * @memberof google.cloud.iot.v1.DeviceCredential * @instance */ - BindDeviceToGatewayRequest.prototype.deviceId = ""; + Object.defineProperty(DeviceCredential.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BindDeviceToGatewayRequest instance using the specified properties. + * Creates a new DeviceCredential instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest instance + * @param {google.cloud.iot.v1.IDeviceCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential instance */ - BindDeviceToGatewayRequest.create = function create(properties) { - return new BindDeviceToGatewayRequest(properties); + DeviceCredential.create = function create(properties) { + return new DeviceCredential(properties); }; /** - * Encodes the specified BindDeviceToGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * Encodes the specified DeviceCredential message. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayRequest.encode = function encode(message, writer) { + DeviceCredential.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + $root.google.cloud.iot.v1.PublicKeyCredential.encode(message.publicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified BindDeviceToGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayRequest.verify|verify} messages. + * Encodes the specified DeviceCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceCredential.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayRequest} message BindDeviceToGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceCredential} message DeviceCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeviceCredential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer. + * Decodes a DeviceCredential message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayRequest.decode = function decode(reader, length) { + DeviceCredential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceCredential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; case 2: - message.gatewayId = reader.string(); + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); break; - case 3: - message.deviceId = reader.string(); + case 6: + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9442,123 +9218,132 @@ }; /** - * Decodes a BindDeviceToGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceCredential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayRequest.decodeDelimited = function decodeDelimited(reader) { + DeviceCredential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BindDeviceToGatewayRequest message. + * Verifies a DeviceCredential message. * @function verify - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BindDeviceToGatewayRequest.verify = function verify(message) { + DeviceCredential.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - if (!$util.isString(message.gatewayId)) - return "gatewayId: string expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - if (!$util.isString(message.deviceId)) - return "deviceId: string expected"; + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties.credential = 1; + { + var error = $root.google.cloud.iot.v1.PublicKeyCredential.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + if (error) + return "expirationTime." + error; + } return null; }; /** - * Creates a BindDeviceToGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCredential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.BindDeviceToGatewayRequest} BindDeviceToGatewayRequest + * @returns {google.cloud.iot.v1.DeviceCredential} DeviceCredential */ - BindDeviceToGatewayRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayRequest) + DeviceCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceCredential) return object; - var message = new $root.google.cloud.iot.v1.BindDeviceToGatewayRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.gatewayId != null) - message.gatewayId = String(object.gatewayId); - if (object.deviceId != null) - message.deviceId = String(object.deviceId); + var message = new $root.google.cloud.iot.v1.DeviceCredential(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceCredential.publicKey: object expected"); + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.fromObject(object.publicKey); + } + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceCredential.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + } return message; }; /** - * Creates a plain object from a BindDeviceToGatewayRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeviceCredential message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @static - * @param {google.cloud.iot.v1.BindDeviceToGatewayRequest} message BindDeviceToGatewayRequest + * @param {google.cloud.iot.v1.DeviceCredential} message DeviceCredential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindDeviceToGatewayRequest.toObject = function toObject(message, options) { + DeviceCredential.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.gatewayId = ""; - object.deviceId = ""; + if (options.defaults) + object.expirationTime = null; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + object.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.toObject(message.publicKey, options); + if (options.oneofs) + object.credential = "publicKey"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) - object.gatewayId = message.gatewayId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - object.deviceId = message.deviceId; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); return object; }; /** - * Converts this BindDeviceToGatewayRequest to JSON. + * Converts this DeviceCredential to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @memberof google.cloud.iot.v1.DeviceCredential * @instance * @returns {Object.} JSON object */ - BindDeviceToGatewayRequest.prototype.toJSON = function toJSON() { + DeviceCredential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BindDeviceToGatewayRequest; + return DeviceCredential; })(); - v1.BindDeviceToGatewayResponse = (function() { + v1.PublicKeyCredential = (function() { /** - * Properties of a BindDeviceToGatewayResponse. + * Properties of a PublicKeyCredential. * @memberof google.cloud.iot.v1 - * @interface IBindDeviceToGatewayResponse + * @interface IPublicKeyCredential + * @property {google.cloud.iot.v1.PublicKeyFormat|null} [format] PublicKeyCredential format + * @property {string|null} [key] PublicKeyCredential key */ /** - * Constructs a new BindDeviceToGatewayResponse. + * Constructs a new PublicKeyCredential. * @memberof google.cloud.iot.v1 - * @classdesc Represents a BindDeviceToGatewayResponse. - * @implements IBindDeviceToGatewayResponse + * @classdesc Represents a PublicKeyCredential. + * @implements IPublicKeyCredential * @constructor - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set */ - function BindDeviceToGatewayResponse(properties) { + function PublicKeyCredential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9566,63 +9351,89 @@ } /** - * Creates a new BindDeviceToGatewayResponse instance using the specified properties. + * PublicKeyCredential format. + * @member {google.cloud.iot.v1.PublicKeyFormat} format + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @instance + */ + PublicKeyCredential.prototype.format = 0; + + /** + * PublicKeyCredential key. + * @member {string} key + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @instance + */ + PublicKeyCredential.prototype.key = ""; + + /** + * Creates a new PublicKeyCredential instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse instance + * @param {google.cloud.iot.v1.IPublicKeyCredential=} [properties] Properties to set + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential instance */ - BindDeviceToGatewayResponse.create = function create(properties) { - return new BindDeviceToGatewayResponse(properties); + PublicKeyCredential.create = function create(properties) { + return new PublicKeyCredential(properties); }; /** - * Encodes the specified BindDeviceToGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * Encodes the specified PublicKeyCredential message. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayResponse.encode = function encode(message, writer) { + PublicKeyCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); return writer; }; /** - * Encodes the specified BindDeviceToGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.BindDeviceToGatewayResponse.verify|verify} messages. + * Encodes the specified PublicKeyCredential message, length delimited. Does not implicitly {@link google.cloud.iot.v1.PublicKeyCredential.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.IBindDeviceToGatewayResponse} message BindDeviceToGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IPublicKeyCredential} message PublicKeyCredential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindDeviceToGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { + PublicKeyCredential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer. + * Decodes a PublicKeyCredential message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayResponse.decode = function decode(reader, length) { + PublicKeyCredential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.PublicKeyCredential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.format = reader.int32(); + break; + case 2: + message.key = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -9632,96 +9443,167 @@ }; /** - * Decodes a BindDeviceToGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a PublicKeyCredential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindDeviceToGatewayResponse.decodeDelimited = function decodeDelimited(reader) { + PublicKeyCredential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BindDeviceToGatewayResponse message. + * Verifies a PublicKeyCredential message. * @function verify - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BindDeviceToGatewayResponse.verify = function verify(message) { + PublicKeyCredential.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 3: + case 1: + case 2: + case 4: + break; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; return null; }; /** - * Creates a BindDeviceToGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PublicKeyCredential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.BindDeviceToGatewayResponse} BindDeviceToGatewayResponse + * @returns {google.cloud.iot.v1.PublicKeyCredential} PublicKeyCredential */ - BindDeviceToGatewayResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.BindDeviceToGatewayResponse) + PublicKeyCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.PublicKeyCredential) return object; - return new $root.google.cloud.iot.v1.BindDeviceToGatewayResponse(); + var message = new $root.google.cloud.iot.v1.PublicKeyCredential(); + switch (object.format) { + case "UNSPECIFIED_PUBLIC_KEY_FORMAT": + case 0: + message.format = 0; + break; + case "RSA_PEM": + case 3: + message.format = 3; + break; + case "RSA_X509_PEM": + case 1: + message.format = 1; + break; + case "ES256_PEM": + case 2: + message.format = 2; + break; + case "ES256_X509_PEM": + case 4: + message.format = 4; + break; + } + if (object.key != null) + message.key = String(object.key); + return message; }; /** - * Creates a plain object from a BindDeviceToGatewayResponse message. Also converts values to other types if specified. + * Creates a plain object from a PublicKeyCredential message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @static - * @param {google.cloud.iot.v1.BindDeviceToGatewayResponse} message BindDeviceToGatewayResponse + * @param {google.cloud.iot.v1.PublicKeyCredential} message PublicKeyCredential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindDeviceToGatewayResponse.toObject = function toObject() { - return {}; + PublicKeyCredential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "UNSPECIFIED_PUBLIC_KEY_FORMAT" : 0; + object.key = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; }; /** - * Converts this BindDeviceToGatewayResponse to JSON. + * Converts this PublicKeyCredential to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @memberof google.cloud.iot.v1.PublicKeyCredential * @instance * @returns {Object.} JSON object */ - BindDeviceToGatewayResponse.prototype.toJSON = function toJSON() { + PublicKeyCredential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BindDeviceToGatewayResponse; + return PublicKeyCredential; })(); - v1.UnbindDeviceFromGatewayRequest = (function() { + /** + * PublicKeyFormat enum. + * @name google.cloud.iot.v1.PublicKeyFormat + * @enum {string} + * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value + * @property {number} RSA_PEM=3 RSA_PEM value + * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value + * @property {number} ES256_PEM=2 ES256_PEM value + * @property {number} ES256_X509_PEM=4 ES256_X509_PEM value + */ + v1.PublicKeyFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_PUBLIC_KEY_FORMAT"] = 0; + values[valuesById[3] = "RSA_PEM"] = 3; + values[valuesById[1] = "RSA_X509_PEM"] = 1; + values[valuesById[2] = "ES256_PEM"] = 2; + values[valuesById[4] = "ES256_X509_PEM"] = 4; + return values; + })(); + + v1.DeviceConfig = (function() { /** - * Properties of an UnbindDeviceFromGatewayRequest. + * Properties of a DeviceConfig. * @memberof google.cloud.iot.v1 - * @interface IUnbindDeviceFromGatewayRequest - * @property {string|null} [parent] UnbindDeviceFromGatewayRequest parent - * @property {string|null} [gatewayId] UnbindDeviceFromGatewayRequest gatewayId - * @property {string|null} [deviceId] UnbindDeviceFromGatewayRequest deviceId + * @interface IDeviceConfig + * @property {number|Long|null} [version] DeviceConfig version + * @property {google.protobuf.ITimestamp|null} [cloudUpdateTime] DeviceConfig cloudUpdateTime + * @property {google.protobuf.ITimestamp|null} [deviceAckTime] DeviceConfig deviceAckTime + * @property {Uint8Array|null} [binaryData] DeviceConfig binaryData */ /** - * Constructs a new UnbindDeviceFromGatewayRequest. + * Constructs a new DeviceConfig. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UnbindDeviceFromGatewayRequest. - * @implements IUnbindDeviceFromGatewayRequest + * @classdesc Represents a DeviceConfig. + * @implements IDeviceConfig * @constructor - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set */ - function UnbindDeviceFromGatewayRequest(properties) { + function DeviceConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9729,101 +9611,114 @@ } /** - * UnbindDeviceFromGatewayRequest parent. - * @member {string} parent - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * DeviceConfig version. + * @member {number|Long} version + * @memberof google.cloud.iot.v1.DeviceConfig * @instance */ - UnbindDeviceFromGatewayRequest.prototype.parent = ""; + DeviceConfig.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UnbindDeviceFromGatewayRequest gatewayId. - * @member {string} gatewayId - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * DeviceConfig cloudUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} cloudUpdateTime + * @memberof google.cloud.iot.v1.DeviceConfig * @instance */ - UnbindDeviceFromGatewayRequest.prototype.gatewayId = ""; + DeviceConfig.prototype.cloudUpdateTime = null; /** - * UnbindDeviceFromGatewayRequest deviceId. - * @member {string} deviceId - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * DeviceConfig deviceAckTime. + * @member {google.protobuf.ITimestamp|null|undefined} deviceAckTime + * @memberof google.cloud.iot.v1.DeviceConfig * @instance */ - UnbindDeviceFromGatewayRequest.prototype.deviceId = ""; + DeviceConfig.prototype.deviceAckTime = null; /** - * Creates a new UnbindDeviceFromGatewayRequest instance using the specified properties. + * DeviceConfig binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.DeviceConfig + * @instance + */ + DeviceConfig.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new DeviceConfig instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest instance + * @param {google.cloud.iot.v1.IDeviceConfig=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig instance */ - UnbindDeviceFromGatewayRequest.create = function create(properties) { - return new UnbindDeviceFromGatewayRequest(properties); + DeviceConfig.create = function create(properties) { + return new DeviceConfig(properties); }; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * Encodes the specified DeviceConfig message. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayRequest.encode = function encode(message, writer) { + DeviceConfig.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.cloudUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + $root.google.protobuf.Timestamp.encode(message.deviceAckTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.binaryData); return writer; }; /** - * Encodes the specified UnbindDeviceFromGatewayRequest message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.verify|verify} messages. + * Encodes the specified DeviceConfig message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceConfig} message DeviceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeviceConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer. + * Decodes a DeviceConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayRequest.decode = function decode(reader, length) { + DeviceConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.version = reader.int64(); break; case 2: - message.gatewayId = reader.string(); + message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: - message.deviceId = reader.string(); + message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.binaryData = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -9834,123 +9729,166 @@ }; /** - * Decodes an UnbindDeviceFromGatewayRequest message from the specified reader or buffer, length delimited. + * Decodes a DeviceConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayRequest.decodeDelimited = function decodeDelimited(reader) { + DeviceConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UnbindDeviceFromGatewayRequest message. + * Verifies a DeviceConfig message. * @function verify - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UnbindDeviceFromGatewayRequest.verify = function verify(message) { + DeviceConfig.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.gatewayId != null && message.hasOwnProperty("gatewayId")) - if (!$util.isString(message.gatewayId)) - return "gatewayId: string expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - if (!$util.isString(message.deviceId)) - return "deviceId: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.cloudUpdateTime); + if (error) + return "cloudUpdateTime." + error; + } + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deviceAckTime); + if (error) + return "deviceAckTime." + error; + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; return null; }; /** - * Creates an UnbindDeviceFromGatewayRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} UnbindDeviceFromGatewayRequest + * @returns {google.cloud.iot.v1.DeviceConfig} DeviceConfig */ - UnbindDeviceFromGatewayRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) + DeviceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceConfig) return object; - var message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.gatewayId != null) - message.gatewayId = String(object.gatewayId); - if (object.deviceId != null) - message.deviceId = String(object.deviceId); + var message = new $root.google.cloud.iot.v1.DeviceConfig(); + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = false; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + if (object.cloudUpdateTime != null) { + if (typeof object.cloudUpdateTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceConfig.cloudUpdateTime: object expected"); + message.cloudUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.cloudUpdateTime); + } + if (object.deviceAckTime != null) { + if (typeof object.deviceAckTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceConfig.deviceAckTime: object expected"); + message.deviceAckTime = $root.google.protobuf.Timestamp.fromObject(object.deviceAckTime); + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; return message; }; /** - * Creates a plain object from an UnbindDeviceFromGatewayRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeviceConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @static - * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayRequest} message UnbindDeviceFromGatewayRequest + * @param {google.cloud.iot.v1.DeviceConfig} message DeviceConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UnbindDeviceFromGatewayRequest.toObject = function toObject(message, options) { + DeviceConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.gatewayId = ""; - object.deviceId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + object.cloudUpdateTime = null; + object.deviceAckTime = null; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gatewayId != null && message.hasOwnProperty("gatewayId")) - object.gatewayId = message.gatewayId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) - object.deviceId = message.deviceId; + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + object.cloudUpdateTime = $root.google.protobuf.Timestamp.toObject(message.cloudUpdateTime, options); + if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + object.deviceAckTime = $root.google.protobuf.Timestamp.toObject(message.deviceAckTime, options); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; return object; }; /** - * Converts this UnbindDeviceFromGatewayRequest to JSON. + * Converts this DeviceConfig to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @memberof google.cloud.iot.v1.DeviceConfig * @instance * @returns {Object.} JSON object */ - UnbindDeviceFromGatewayRequest.prototype.toJSON = function toJSON() { + DeviceConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UnbindDeviceFromGatewayRequest; + return DeviceConfig; })(); - v1.UnbindDeviceFromGatewayResponse = (function() { + v1.DeviceState = (function() { /** - * Properties of an UnbindDeviceFromGatewayResponse. + * Properties of a DeviceState. * @memberof google.cloud.iot.v1 - * @interface IUnbindDeviceFromGatewayResponse + * @interface IDeviceState + * @property {google.protobuf.ITimestamp|null} [updateTime] DeviceState updateTime + * @property {Uint8Array|null} [binaryData] DeviceState binaryData */ /** - * Constructs a new UnbindDeviceFromGatewayResponse. + * Constructs a new DeviceState. * @memberof google.cloud.iot.v1 - * @classdesc Represents an UnbindDeviceFromGatewayResponse. - * @implements IUnbindDeviceFromGatewayResponse + * @classdesc Represents a DeviceState. + * @implements IDeviceState * @constructor - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set + * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set */ - function UnbindDeviceFromGatewayResponse(properties) { + function DeviceState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9958,63 +9896,89 @@ } /** - * Creates a new UnbindDeviceFromGatewayResponse instance using the specified properties. + * DeviceState updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.iot.v1.DeviceState + * @instance + */ + DeviceState.prototype.updateTime = null; + + /** + * DeviceState binaryData. + * @member {Uint8Array} binaryData + * @memberof google.cloud.iot.v1.DeviceState + * @instance + */ + DeviceState.prototype.binaryData = $util.newBuffer([]); + + /** + * Creates a new DeviceState instance using the specified properties. * @function create - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse=} [properties] Properties to set - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse instance + * @param {google.cloud.iot.v1.IDeviceState=} [properties] Properties to set + * @returns {google.cloud.iot.v1.DeviceState} DeviceState instance */ - UnbindDeviceFromGatewayResponse.create = function create(properties) { - return new UnbindDeviceFromGatewayResponse(properties); + DeviceState.create = function create(properties) { + return new DeviceState(properties); }; /** - * Encodes the specified UnbindDeviceFromGatewayResponse message. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * Encodes the specified DeviceState message. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. * @function encode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayResponse.encode = function encode(message, writer) { + DeviceState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); return writer; }; /** - * Encodes the specified UnbindDeviceFromGatewayResponse message, length delimited. Does not implicitly {@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.verify|verify} messages. + * Encodes the specified DeviceState message, length delimited. Does not implicitly {@link google.cloud.iot.v1.DeviceState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse message or plain object to encode + * @param {google.cloud.iot.v1.IDeviceState} message DeviceState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbindDeviceFromGatewayResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeviceState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer. + * Decodes a DeviceState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @returns {google.cloud.iot.v1.DeviceState} DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayResponse.decode = function decode(reader, length) { + DeviceState.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.DeviceState(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.binaryData = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -10024,74 +9988,110 @@ }; /** - * Decodes an UnbindDeviceFromGatewayResponse message from the specified reader or buffer, length delimited. + * Decodes a DeviceState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @returns {google.cloud.iot.v1.DeviceState} DeviceState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbindDeviceFromGatewayResponse.decodeDelimited = function decodeDelimited(reader) { + DeviceState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UnbindDeviceFromGatewayResponse message. + * Verifies a DeviceState message. * @function verify - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UnbindDeviceFromGatewayResponse.verify = function verify(message) { + DeviceState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; return null; }; /** - * Creates an UnbindDeviceFromGatewayResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static * @param {Object.} object Plain object - * @returns {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} UnbindDeviceFromGatewayResponse + * @returns {google.cloud.iot.v1.DeviceState} DeviceState */ - UnbindDeviceFromGatewayResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) + DeviceState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iot.v1.DeviceState) return object; - return new $root.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(); + var message = new $root.google.cloud.iot.v1.DeviceState(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.iot.v1.DeviceState.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length) + message.binaryData = object.binaryData; + return message; }; /** - * Creates a plain object from an UnbindDeviceFromGatewayResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeviceState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @static - * @param {google.cloud.iot.v1.UnbindDeviceFromGatewayResponse} message UnbindDeviceFromGatewayResponse + * @param {google.cloud.iot.v1.DeviceState} message DeviceState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UnbindDeviceFromGatewayResponse.toObject = function toObject() { - return {}; + DeviceState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + if (options.bytes === String) + object.binaryData = ""; + else { + object.binaryData = []; + if (options.bytes !== Array) + object.binaryData = $util.newBuffer(object.binaryData); + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.binaryData != null && message.hasOwnProperty("binaryData")) + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + return object; }; /** - * Converts this UnbindDeviceFromGatewayResponse to JSON. + * Converts this DeviceState to JSON. * @function toJSON - * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @memberof google.cloud.iot.v1.DeviceState * @instance * @returns {Object.} JSON object */ - UnbindDeviceFromGatewayResponse.prototype.toJSON = function toJSON() { + DeviceState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UnbindDeviceFromGatewayResponse; + return DeviceState; })(); return v1; @@ -10112,30 +10112,26 @@ */ var api = {}; - api.ResourceDescriptor = (function() { + api.Http = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a Http. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10143,143 +10139,91 @@ } /** - * 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 + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.plural = ""; + Http.prototype.rules = $util.emptyArray; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.singular = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - if (!(message.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(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -10290,285 +10234,353 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.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.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.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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; + 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.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Http.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]; + 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.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return Http; + })(); + + api.HttpRule = (function() { + /** - * 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 + * 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 */ - 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; - })(); + /** + * 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 = ""; - api.ResourceReference = (function() { + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.body = ""; /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ - 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]]; - } + HttpRule.prototype.responseBody = ""; /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.type = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.childType = ""; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + 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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - message.childType = reader.string(); + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -10579,118 +10591,240 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return HttpRule; })(); - api.Http = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Http. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Http. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10698,91 +10832,88 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.rules = $util.emptyArray; + CustomHttpPattern.prototype.kind = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Http instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Http.create = function create(properties) { - return new Http(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + 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: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.kind = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -10793,143 +10924,144 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + CustomHttpPattern.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"; + 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 Http message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.api.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 Http message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Http} message Http + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.kind = ""; + object.path = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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 Http to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return CustomHttpPattern; })(); - api.HttpRule = (function() { + /** + * 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 HttpRule. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface 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 HttpRule. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10937,209 +11069,143 @@ } /** - * 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 + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.patch = ""; + ResourceDescriptor.prototype.type = ""; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.custom = null; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.body = ""; + ResourceDescriptor.prototype.nameField = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.responseBody = ""; + ResourceDescriptor.prototype.history = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceDescriptor.prototype.plural = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceDescriptor.prototype.singular = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + 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.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; case 3: - message.put = reader.string(); + message.nameField = reader.string(); break; case 4: - message.post = reader.string(); + message.history = reader.int32(); break; case 5: - message["delete"] = reader.string(); + message.plural = reader.string(); break; case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -11150,240 +11216,196 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + ResourceDescriptor.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.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.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; + if (message.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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + var message = new $root.google.api.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.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + if (object.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 HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; + object.pattern = []; 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"; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - 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.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.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + 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 HttpRule to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * 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.CustomHttpPattern = (function() { + api.ResourceReference = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ResourceReference. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11391,88 +11413,88 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.kind = ""; + ResourceReference.prototype.type = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.path = ""; + ResourceReference.prototype.childType = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + 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.kind = reader.string(); + message.type = reader.string(); break; case 2: - message.path = reader.string(); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -11483,118 +11505,96 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.childType = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - 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; + return ResourceReference; })(); return api; @@ -16807,8 +16807,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 */ /** @@ -16885,20 +16885,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. @@ -17004,9 +17004,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"] = []; @@ -17017,6 +17014,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; @@ -17091,11 +17091,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"; @@ -17112,6 +17107,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; }; @@ -17173,11 +17173,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"); @@ -17211,6 +17206,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-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index e4d4ad49584..136353bf2e3 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -11,361 +11,10 @@ "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/cloud/iot/v1;iot", "java_multiple_files": true, - "java_outer_classname": "DeviceManagerProto", + "java_outer_classname": "ResourcesProto", "java_package": "com.google.cloud.iot.v1" }, "nested": { - "Device": { - "options": { - "(google.api.resource).type": "cloudiot.googleapis.com/Device", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}/devices/{device}" - }, - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "numId": { - "type": "uint64", - "id": 3 - }, - "credentials": { - "rule": "repeated", - "type": "DeviceCredential", - "id": 12 - }, - "lastHeartbeatTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "lastEventTime": { - "type": "google.protobuf.Timestamp", - "id": 8 - }, - "lastStateTime": { - "type": "google.protobuf.Timestamp", - "id": 20 - }, - "lastConfigAckTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - }, - "lastConfigSendTime": { - "type": "google.protobuf.Timestamp", - "id": 18 - }, - "blocked": { - "type": "bool", - "id": 19 - }, - "lastErrorTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "lastErrorStatus": { - "type": "google.rpc.Status", - "id": 11 - }, - "config": { - "type": "DeviceConfig", - "id": 13 - }, - "state": { - "type": "DeviceState", - "id": 16 - }, - "logLevel": { - "type": "LogLevel", - "id": 21 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 17 - }, - "gatewayConfig": { - "type": "GatewayConfig", - "id": 24 - } - } - }, - "GatewayConfig": { - "fields": { - "gatewayType": { - "type": "GatewayType", - "id": 1 - }, - "gatewayAuthMethod": { - "type": "GatewayAuthMethod", - "id": 2 - }, - "lastAccessedGatewayId": { - "type": "string", - "id": 3 - }, - "lastAccessedGatewayTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - }, - "DeviceRegistry": { - "options": { - "(google.api.resource).type": "cloudiot.googleapis.com/Registry", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}" - }, - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "eventNotificationConfigs": { - "rule": "repeated", - "type": "EventNotificationConfig", - "id": 10 - }, - "stateNotificationConfig": { - "type": "StateNotificationConfig", - "id": 7 - }, - "mqttConfig": { - "type": "MqttConfig", - "id": 4 - }, - "httpConfig": { - "type": "HttpConfig", - "id": 9 - }, - "logLevel": { - "type": "LogLevel", - "id": 11 - }, - "credentials": { - "rule": "repeated", - "type": "RegistryCredential", - "id": 8 - } - } - }, - "MqttConfig": { - "fields": { - "mqttEnabledState": { - "type": "MqttState", - "id": 1 - } - } - }, - "MqttState": { - "values": { - "MQTT_STATE_UNSPECIFIED": 0, - "MQTT_ENABLED": 1, - "MQTT_DISABLED": 2 - } - }, - "HttpConfig": { - "fields": { - "httpEnabledState": { - "type": "HttpState", - "id": 1 - } - } - }, - "HttpState": { - "values": { - "HTTP_STATE_UNSPECIFIED": 0, - "HTTP_ENABLED": 1, - "HTTP_DISABLED": 2 - } - }, - "LogLevel": { - "values": { - "LOG_LEVEL_UNSPECIFIED": 0, - "NONE": 10, - "ERROR": 20, - "INFO": 30, - "DEBUG": 40 - } - }, - "GatewayType": { - "values": { - "GATEWAY_TYPE_UNSPECIFIED": 0, - "GATEWAY": 1, - "NON_GATEWAY": 2 - } - }, - "GatewayAuthMethod": { - "values": { - "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, - "ASSOCIATION_ONLY": 1, - "DEVICE_AUTH_TOKEN_ONLY": 2, - "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 - } - }, - "EventNotificationConfig": { - "fields": { - "subfolderMatches": { - "type": "string", - "id": 2 - }, - "pubsubTopicName": { - "type": "string", - "id": 1 - } - } - }, - "StateNotificationConfig": { - "fields": { - "pubsubTopicName": { - "type": "string", - "id": 1 - } - } - }, - "RegistryCredential": { - "oneofs": { - "credential": { - "oneof": [ - "publicKeyCertificate" - ] - } - }, - "fields": { - "publicKeyCertificate": { - "type": "PublicKeyCertificate", - "id": 1 - } - } - }, - "X509CertificateDetails": { - "fields": { - "issuer": { - "type": "string", - "id": 1 - }, - "subject": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "expiryTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "signatureAlgorithm": { - "type": "string", - "id": 5 - }, - "publicKeyType": { - "type": "string", - "id": 6 - } - } - }, - "PublicKeyCertificate": { - "fields": { - "format": { - "type": "PublicKeyCertificateFormat", - "id": 1 - }, - "certificate": { - "type": "string", - "id": 2 - }, - "x509Details": { - "type": "X509CertificateDetails", - "id": 3 - } - } - }, - "PublicKeyCertificateFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, - "X509_CERTIFICATE_PEM": 1 - } - }, - "DeviceCredential": { - "oneofs": { - "credential": { - "oneof": [ - "publicKey" - ] - } - }, - "fields": { - "publicKey": { - "type": "PublicKeyCredential", - "id": 2 - }, - "expirationTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - } - }, - "PublicKeyCredential": { - "fields": { - "format": { - "type": "PublicKeyFormat", - "id": 1 - }, - "key": { - "type": "string", - "id": 2 - } - } - }, - "PublicKeyFormat": { - "values": { - "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, - "RSA_PEM": 3, - "RSA_X509_PEM": 1, - "ES256_PEM": 2, - "ES256_X509_PEM": 4 - } - }, - "DeviceConfig": { - "fields": { - "version": { - "type": "int64", - "id": 1 - }, - "cloudUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "deviceAckTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "binaryData": { - "type": "bytes", - "id": 4 - } - } - }, - "DeviceState": { - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "binaryData": { - "type": "bytes", - "id": 2 - } - } - }, "DeviceManager": { "options": { "(google.api.default_host)": "cloudiot.googleapis.com", @@ -522,136 +171,405 @@ "(google.api.method_signature)": "resource,permissions" } }, - "SendCommandToDevice": { - "requestType": "SendCommandToDeviceRequest", - "responseType": "SendCommandToDeviceResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,binary_data,subfolder" - } + "SendCommandToDevice": { + "requestType": "SendCommandToDeviceRequest", + "responseType": "SendCommandToDeviceResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,binary_data,subfolder" + } + }, + "BindDeviceToGateway": { + "requestType": "BindDeviceToGatewayRequest", + "responseType": "BindDeviceToGatewayResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,gateway_id,device_id" + } + }, + "UnbindDeviceFromGateway": { + "requestType": "UnbindDeviceFromGatewayRequest", + "responseType": "UnbindDeviceFromGatewayResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,gateway_id,device_id" + } + } + } + }, + "CreateDeviceRegistryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetDeviceRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } + } + } + }, + "DeleteDeviceRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } + } + } + }, + "UpdateDeviceRegistryRequest": { + "fields": { + "deviceRegistry": { + "type": "DeviceRegistry", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListDeviceRegistriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDeviceRegistriesResponse": { + "fields": { + "deviceRegistries": { + "rule": "repeated", + "type": "DeviceRegistry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDeviceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } + }, + "device": { + "type": "Device", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "UpdateDeviceRequest": { + "fields": { + "device": { + "type": "Device", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + } + } + } + }, + "ListDevicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + } + }, + "deviceNumIds": { + "rule": "repeated", + "type": "uint64", + "id": 2 + }, + "deviceIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 4 + }, + "gatewayListOptions": { + "type": "GatewayListOptions", + "id": 6 + }, + "pageSize": { + "type": "int32", + "id": 100 + }, + "pageToken": { + "type": "string", + "id": 101 + } + } + }, + "GatewayListOptions": { + "oneofs": { + "filter": { + "oneof": [ + "gatewayType", + "associationsGatewayId", + "associationsDeviceId" + ] + } + }, + "fields": { + "gatewayType": { + "type": "GatewayType", + "id": 1 + }, + "associationsGatewayId": { + "type": "string", + "id": 2 }, - "BindDeviceToGateway": { - "requestType": "BindDeviceToGatewayRequest", - "responseType": "BindDeviceToGatewayResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,gateway_id,device_id" - } + "associationsDeviceId": { + "type": "string", + "id": 3 + } + } + }, + "ListDevicesResponse": { + "fields": { + "devices": { + "rule": "repeated", + "type": "Device", + "id": 1 }, - "UnbindDeviceFromGateway": { - "requestType": "UnbindDeviceFromGatewayRequest", - "responseType": "UnbindDeviceFromGatewayResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,gateway_id,device_id" - } + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "CreateDeviceRegistryRequest": { + "ModifyCloudToDeviceConfigRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" } }, - "deviceRegistry": { - "type": "DeviceRegistry", - "id": 2, + "versionToUpdate": { + "type": "int64", + "id": 2 + }, + "binaryData": { + "type": "bytes", + "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "GetDeviceRegistryRequest": { + "ListDeviceConfigVersionsRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" } + }, + "numVersions": { + "type": "int32", + "id": 2 } } }, - "DeleteDeviceRegistryRequest": { + "ListDeviceConfigVersionsResponse": { + "fields": { + "deviceConfigs": { + "rule": "repeated", + "type": "DeviceConfig", + "id": 1 + } + } + }, + "ListDeviceStatesRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" } + }, + "numStates": { + "type": "int32", + "id": 2 } } }, - "UpdateDeviceRegistryRequest": { + "ListDeviceStatesResponse": { "fields": { - "deviceRegistry": { - "type": "DeviceRegistry", + "deviceStates": { + "rule": "repeated", + "type": "DeviceState", + "id": 1 + } + } + }, + "SendCommandToDeviceRequest": { + "fields": { + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "binaryData": { + "type": "bytes", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "subfolder": { + "type": "string", + "id": 3 } } }, - "ListDeviceRegistriesRequest": { + "SendCommandToDeviceResponse": { + "fields": {} + }, + "BindDeviceToGatewayRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { + "gatewayId": { "type": "string", - "id": 3 - } - } - }, - "ListDeviceRegistriesResponse": { - "fields": { - "deviceRegistries": { - "rule": "repeated", - "type": "DeviceRegistry", - "id": 1 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "nextPageToken": { + "deviceId": { "type": "string", - "id": 2 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "CreateDeviceRequest": { + "BindDeviceToGatewayResponse": { + "fields": {} + }, + "UnbindDeviceFromGatewayRequest": { "fields": { "parent": { "type": "string", @@ -661,293 +579,375 @@ "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" } }, - "device": { - "type": "Device", + "gatewayId": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "GetDeviceRequest": { - "fields": { - "name": { + }, + "deviceId": { "type": "string", - "id": 1, + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" + "(google.api.field_behavior)": "REQUIRED" } - }, - "fieldMask": { - "type": "google.protobuf.FieldMask", - "id": 2 } } }, - "UpdateDeviceRequest": { + "UnbindDeviceFromGatewayResponse": { + "fields": {} + }, + "Device": { + "options": { + "(google.api.resource).type": "cloudiot.googleapis.com/Device", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}/devices/{device}" + }, "fields": { - "device": { - "type": "Device", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + }, + "numId": { + "type": "uint64", + "id": 3 + }, + "credentials": { + "rule": "repeated", + "type": "DeviceCredential", + "id": 12 + }, + "lastHeartbeatTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "lastEventTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "lastStateTime": { + "type": "google.protobuf.Timestamp", + "id": 20 + }, + "lastConfigAckTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "lastConfigSendTime": { + "type": "google.protobuf.Timestamp", + "id": 18 + }, + "blocked": { + "type": "bool", + "id": 19 + }, + "lastErrorTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "lastErrorStatus": { + "type": "google.rpc.Status", + "id": 11 + }, + "config": { + "type": "DeviceConfig", + "id": 13 + }, + "state": { + "type": "DeviceState", + "id": 16 + }, + "logLevel": { + "type": "LogLevel", + "id": 21 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 17 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "gatewayConfig": { + "type": "GatewayConfig", + "id": 24 } } }, - "DeleteDeviceRequest": { + "GatewayConfig": { "fields": { - "name": { + "gatewayType": { + "type": "GatewayType", + "id": 1 + }, + "gatewayAuthMethod": { + "type": "GatewayAuthMethod", + "id": 2 + }, + "lastAccessedGatewayId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" - } + "id": 3 + }, + "lastAccessedGatewayTime": { + "type": "google.protobuf.Timestamp", + "id": 4 } } }, - "ListDevicesRequest": { + "DeviceRegistry": { + "options": { + "(google.api.resource).type": "cloudiot.googleapis.com/Registry", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/registries/{registry}" + }, "fields": { - "parent": { + "id": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } + "id": 1 }, - "deviceNumIds": { - "rule": "repeated", - "type": "uint64", + "name": { + "type": "string", "id": 2 }, - "deviceIds": { + "eventNotificationConfigs": { "rule": "repeated", - "type": "string", - "id": 3 + "type": "EventNotificationConfig", + "id": 10 }, - "fieldMask": { - "type": "google.protobuf.FieldMask", + "stateNotificationConfig": { + "type": "StateNotificationConfig", + "id": 7 + }, + "mqttConfig": { + "type": "MqttConfig", "id": 4 }, - "gatewayListOptions": { - "type": "GatewayListOptions", - "id": 6 + "httpConfig": { + "type": "HttpConfig", + "id": 9 }, - "pageSize": { - "type": "int32", - "id": 100 + "logLevel": { + "type": "LogLevel", + "id": 11 }, - "pageToken": { - "type": "string", - "id": 101 + "credentials": { + "rule": "repeated", + "type": "RegistryCredential", + "id": 8 } } }, - "GatewayListOptions": { - "oneofs": { - "filter": { - "oneof": [ - "gatewayType", - "associationsGatewayId", - "associationsDeviceId" - ] - } - }, + "MqttConfig": { "fields": { - "gatewayType": { - "type": "GatewayType", + "mqttEnabledState": { + "type": "MqttState", "id": 1 - }, - "associationsGatewayId": { - "type": "string", - "id": 2 - }, - "associationsDeviceId": { - "type": "string", - "id": 3 } } }, - "ListDevicesResponse": { + "MqttState": { + "values": { + "MQTT_STATE_UNSPECIFIED": 0, + "MQTT_ENABLED": 1, + "MQTT_DISABLED": 2 + } + }, + "HttpConfig": { "fields": { - "devices": { - "rule": "repeated", - "type": "Device", + "httpEnabledState": { + "type": "HttpState", "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 } } }, - "ModifyCloudToDeviceConfigRequest": { + "HttpState": { + "values": { + "HTTP_STATE_UNSPECIFIED": 0, + "HTTP_ENABLED": 1, + "HTTP_DISABLED": 2 + } + }, + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "NONE": 10, + "ERROR": 20, + "INFO": 30, + "DEBUG": 40 + } + }, + "GatewayType": { + "values": { + "GATEWAY_TYPE_UNSPECIFIED": 0, + "GATEWAY": 1, + "NON_GATEWAY": 2 + } + }, + "GatewayAuthMethod": { + "values": { + "GATEWAY_AUTH_METHOD_UNSPECIFIED": 0, + "ASSOCIATION_ONLY": 1, + "DEVICE_AUTH_TOKEN_ONLY": 2, + "ASSOCIATION_AND_DEVICE_AUTH_TOKEN": 3 + } + }, + "EventNotificationConfig": { "fields": { - "name": { + "subfolderMatches": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" - } - }, - "versionToUpdate": { - "type": "int64", "id": 2 }, - "binaryData": { - "type": "bytes", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "pubsubTopicName": { + "type": "string", + "id": 1 } } }, - "ListDeviceConfigVersionsRequest": { + "StateNotificationConfig": { "fields": { - "name": { + "pubsubTopicName": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" - } - }, - "numVersions": { - "type": "int32", - "id": 2 + "id": 1 } } }, - "ListDeviceConfigVersionsResponse": { + "RegistryCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKeyCertificate" + ] + } + }, "fields": { - "deviceConfigs": { - "rule": "repeated", - "type": "DeviceConfig", + "publicKeyCertificate": { + "type": "PublicKeyCertificate", "id": 1 } } }, - "ListDeviceStatesRequest": { + "X509CertificateDetails": { "fields": { - "name": { + "issuer": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" - } + "id": 1 }, - "numStates": { - "type": "int32", + "subject": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "expiryTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "signatureAlgorithm": { + "type": "string", + "id": 5 + }, + "publicKeyType": { + "type": "string", + "id": 6 + } + } + }, + "PublicKeyCertificate": { + "fields": { + "format": { + "type": "PublicKeyCertificateFormat", + "id": 1 + }, + "certificate": { + "type": "string", "id": 2 + }, + "x509Details": { + "type": "X509CertificateDetails", + "id": 3 } } }, - "ListDeviceStatesResponse": { + "PublicKeyCertificateFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": 0, + "X509_CERTIFICATE_PEM": 1 + } + }, + "DeviceCredential": { + "oneofs": { + "credential": { + "oneof": [ + "publicKey" + ] + } + }, "fields": { - "deviceStates": { - "rule": "repeated", - "type": "DeviceState", - "id": 1 + "publicKey": { + "type": "PublicKeyCredential", + "id": 2 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 6 } } }, - "SendCommandToDeviceRequest": { + "PublicKeyCredential": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Device" - } - }, - "binaryData": { - "type": "bytes", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "format": { + "type": "PublicKeyFormat", + "id": 1 }, - "subfolder": { + "key": { "type": "string", - "id": 3 + "id": 2 } } }, - "SendCommandToDeviceResponse": { - "fields": {} + "PublicKeyFormat": { + "values": { + "UNSPECIFIED_PUBLIC_KEY_FORMAT": 0, + "RSA_PEM": 3, + "RSA_X509_PEM": 1, + "ES256_PEM": 2, + "ES256_X509_PEM": 4 + } }, - "BindDeviceToGatewayRequest": { + "DeviceConfig": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } + "version": { + "type": "int64", + "id": 1 }, - "gatewayId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "cloudUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 }, - "deviceId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "deviceAckTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "binaryData": { + "type": "bytes", + "id": 4 } } }, - "BindDeviceToGatewayResponse": { - "fields": {} - }, - "UnbindDeviceFromGatewayRequest": { + "DeviceState": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudiot.googleapis.com/Registry" - } - }, - "gatewayId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 }, - "deviceId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "binaryData": { + "type": "bytes", + "id": 2 } } - }, - "UnbindDeviceFromGatewayResponse": { - "fields": {} } } } @@ -957,80 +957,14 @@ }, "api": { "options": { - "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI" + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true }, "nested": { - "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 - } - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -1149,6 +1083,72 @@ "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 + } + } } } }, diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 5026aa60ef9..c656127b8c9 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -142,15 +142,15 @@ export class DeviceManagerClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { + devicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' + ), locationPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), registryPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}' ), - devicePathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' - ), }; // Some of the methods on this service return "paged" results, @@ -1781,9 +1781,17 @@ export class DeviceManagerClient { */ listDeviceRegistriesStream( request?: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions | {} + 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.listDeviceRegistries.createStream( this._innerApiCalls.listDeviceRegistries as gax.GaxCall, @@ -1943,9 +1951,17 @@ export class DeviceManagerClient { */ listDevicesStream( request?: protosTypes.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions | {} + 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.listDevices.createStream( this._innerApiCalls.listDevices as gax.GaxCall, @@ -1957,6 +1973,73 @@ export class DeviceManagerClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified device resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} registry + * @param {string} device + * @returns {string} Resource name string. + */ + devicePath( + project: string, + location: string, + registry: string, + device: string + ) { + return this._pathTemplates.devicePathTemplate.render({ + project, + location, + registry, + device, + }); + } + + /** + * Parse the project from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).project; + } + + /** + * Parse the location from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).location; + } + + /** + * Parse the registry from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the registry. + */ + matchRegistryFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).registry; + } + + /** + * Parse the device from Device resource. + * + * @param {string} deviceName + * A fully-qualified path representing Device resource. + * @returns {string} A string representing the device. + */ + matchDeviceFromDeviceName(deviceName: string) { + return this._pathTemplates.devicePathTemplate.match(deviceName).device; + } + /** * Return a fully-qualified location resource name string. * @@ -2045,73 +2128,6 @@ export class DeviceManagerClient { .registry; } - /** - * Return a fully-qualified device resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} registry - * @param {string} device - * @returns {string} Resource name string. - */ - devicePath( - project: string, - location: string, - registry: string, - device: string - ) { - return this._pathTemplates.devicePathTemplate.render({ - project, - location, - registry, - device, - }); - } - - /** - * Parse the project from Device resource. - * - * @param {string} deviceName - * A fully-qualified path representing Device resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).project; - } - - /** - * Parse the location from Device resource. - * - * @param {string} deviceName - * A fully-qualified path representing Device resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).location; - } - - /** - * Parse the registry from Device resource. - * - * @param {string} deviceName - * A fully-qualified path representing Device resource. - * @returns {string} A string representing the registry. - */ - matchRegistryFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).registry; - } - - /** - * Parse the device from Device resource. - * - * @param {string} deviceName - * A fully-qualified path representing Device resource. - * @returns {string} A string representing the device. - */ - matchDeviceFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).device; - } - /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-iot/src/v1/device_manager_proto_list.json b/packages/google-cloud-iot/src/v1/device_manager_proto_list.json index 9dcde512a5b..95cf55973ec 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_proto_list.json +++ b/packages/google-cloud-iot/src/v1/device_manager_proto_list.json @@ -1,4 +1,4 @@ [ - "../../protos/google/cloud/iot/v1/resources.proto", - "../../protos/google/cloud/iot/v1/device_manager.proto" + "../../protos/google/cloud/iot/v1/device_manager.proto", + "../../protos/google/cloud/iot/v1/resources.proto" ] diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 9caf30f6eba..0d3bc2ed6a4 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-01-30T20:26:15.731011Z", + "updateTime": "2020-02-07T12:24:06.644900Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7a15e7fe78ff4b6d5c9606a3264559e5bde341d1", - "internalRef": "292391607", - "log": "7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\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\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" + "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", + "internalRef": "293710856", + "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], diff --git a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts index 765169466ac..2b6003f5144 100644 --- a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts +++ b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts @@ -89,6 +89,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -111,6 +112,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -135,6 +137,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -157,6 +160,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -231,6 +235,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -253,6 +258,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -277,6 +283,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -299,6 +306,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -323,6 +331,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -345,6 +354,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -419,6 +429,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -441,6 +452,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -465,6 +477,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -487,6 +500,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -514,6 +528,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -536,6 +551,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -563,6 +579,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -585,6 +602,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -609,6 +627,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + request.resource = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -631,6 +650,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + request.resource = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -655,6 +675,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + request.resource = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -677,6 +698,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + request.resource = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -701,6 +723,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + request.resource = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -723,6 +746,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + request.resource = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -747,6 +771,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -769,6 +794,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -793,6 +819,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -815,6 +842,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -839,6 +867,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -861,6 +890,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -888,6 +918,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock Grpc layer @@ -914,8 +945,9 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; + request.parent = ''; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.listDeviceRegistries = ( actualRequest: {}, @@ -934,7 +966,7 @@ describe('v1.DeviceManagerClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); describe('listDevices', () => { @@ -945,6 +977,7 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock Grpc layer @@ -971,8 +1004,9 @@ describe('v1.DeviceManagerClient', () => { }); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; + request.parent = ''; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.listDevices = ( actualRequest: {}, @@ -991,7 +1025,7 @@ describe('v1.DeviceManagerClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); }); From 57a6ed3e71e522a0e42563a71084f203d8bf659b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Feb 2020 18:04:58 +0100 Subject: [PATCH 169/370] chore(deps): update dependency linkinator to v2 --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index effdabbd147..1b9a9670505 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -55,7 +55,7 @@ "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", + "linkinator": "^2.0.0", "prettier": "^1.13.7", "mocha": "^7.0.0", "null-loader": "^3.0.0", From 93b932b9cc22057aca3e9280f24e8cc426f6f42b Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 11 Feb 2020 22:34:30 -0800 Subject: [PATCH 170/370] build: add GitHub actions config for unit tests * build: add GitHub actions config for unit tests * chore: link root directory before linting * chore: also need to npm i --- packages/google-cloud-iot/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1b9a9670505..6d1e9c282c8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -38,7 +38,8 @@ "clean": "gts clean", "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile" + "prepare": "npm run compile", + "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { "google-gax": "^1.9.0" From 458538d27e5733e9fef645ea83dba759bf789296 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 26 Feb 2020 15:19:35 -0800 Subject: [PATCH 171/370] feat: export protos in src/index.ts --- packages/google-cloud-iot/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-iot/src/index.ts b/packages/google-cloud-iot/src/index.ts index 7b3cf828f71..14472f0bef4 100644 --- a/packages/google-cloud-iot/src/index.ts +++ b/packages/google-cloud-iot/src/index.ts @@ -22,3 +22,5 @@ export {v1, DeviceManagerClient}; // For compatibility with JavaScript libraries we need to provide this default export: // tslint:disable-next-line no-default-export export default {v1, DeviceManagerClient}; +import * as protos from '../protos/protos'; +export {protos}; From a7d60e4590d3f8e5b8d220437dec9402c98df166 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 11:53:39 -0800 Subject: [PATCH 172/370] chore: update jsdoc.js (#278) --- packages/google-cloud-iot/.jsdoc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index a533053a3e8..ca21c551ecc 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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/iot', - theme: 'lumen' + theme: 'lumen', + default: { + "outputSourceFiles": false + } }, markdown: { idInHeadings: true From 935692cb41a1b2014e6d1b6c7837188cb9803589 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 15:39:13 -0800 Subject: [PATCH 173/370] chore: update .jsdoc.js by add protos and remove double quotes (#279) --- packages/google-cloud-iot/.jsdoc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index ca21c551ecc..d868d84d1ac 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.jsdoc.js @@ -31,7 +31,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +43,7 @@ module.exports = { systemName: '@google-cloud/iot', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { From c73186a55192a4a03f24bcc0fe26796347715138 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Fri, 28 Feb 2020 16:33:09 -0800 Subject: [PATCH 174/370] chore: update jsdoc with macro license (#281) --- packages/google-cloud-iot/.jsdoc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index d868d84d1ac..04fdbb96100 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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 8824995e49412ef7d3535c359bcd78a7eb767599 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 5 Mar 2020 14:53:20 -0800 Subject: [PATCH 175/370] chore: remove obsolete replacements from synth.py (#282) No docs, no replacements needed. ``` 2020-03-05 14:27:48,958 synthtool > No replacements made in src/v1/doc/google/cloud/iot/v1/doc_resources.js for pattern \[RFC(.*)\]\(https:\/\/cloud\.google\.com, maybe replacement is no longer needed? 2020-03-05 14:27:49,016 synthtool > No replacements made in **/doc/google/protobuf/doc_timestamp.js for pattern https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\), maybe replacement is no longer needed? 2020-03-05 14:27:49,035 synthtool > No replacements made in **/doc/google/protobuf/doc_timestamp.js for pattern toISOString\], maybe replacement is no longer needed? ``` --- packages/google-cloud-iot/synth.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 33374099049..669793f1e12 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -51,16 +51,6 @@ "\[RFC(.*)\]\(https:\/\/cloud\.google\.com", r"[RFC\1](") -# [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] # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) From 3371d4f318c5c61f89549fbb74eca33e106d025f 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:10:09 +0000 Subject: [PATCH 176/370] feat: deferred client initialization (#283) 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/v1/device_manager_client.ts | 96 ++++++++++++++----- packages/google-cloud-iot/synth.metadata | 8 +- .../test/gapic-device_manager-v1.ts | 92 ++++++++++++++++++ 3 files changed, 168 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index c656127b8c9..5c2603d65c2 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -44,8 +44,13 @@ export class DeviceManagerClient { 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; - deviceManagerStub: Promise<{[name: string]: Function}>; + deviceManagerStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of DeviceManagerClient. @@ -69,8 +74,6 @@ export class DeviceManagerClient { * 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. */ @@ -100,25 +103,28 @@ export class DeviceManagerClient { // 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 DeviceManagerClient).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}`); @@ -134,7 +140,7 @@ export class DeviceManagerClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -142,13 +148,13 @@ export class DeviceManagerClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - devicePathTemplate: new gaxModule.PathTemplate( + devicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' ), - locationPathTemplate: new gaxModule.PathTemplate( + locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), - registryPathTemplate: new gaxModule.PathTemplate( + registryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}' ), }; @@ -157,12 +163,12 @@ export class DeviceManagerClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listDeviceRegistries: new gaxModule.PageDescriptor( + listDeviceRegistries: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'deviceRegistries' ), - listDevices: new gaxModule.PageDescriptor( + listDevices: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'devices' @@ -170,7 +176,7 @@ export class DeviceManagerClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.iot.v1.DeviceManager', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -181,17 +187,35 @@ export class DeviceManagerClient { // 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.deviceManagerStub) { + return this.deviceManagerStub; + } // Put together the "service stub" for // google.cloud.iot.v1.DeviceManager. - this.deviceManagerStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.deviceManagerStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.cloud.iot.v1.DeviceManager' ) : // tslint:disable-next-line no-any - (protos as any).google.cloud.iot.v1.DeviceManager, - opts + (this._protos as any).google.cloud.iot.v1.DeviceManager, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -231,9 +255,9 @@ export class DeviceManagerClient { } ); - 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] @@ -247,6 +271,8 @@ export class DeviceManagerClient { return apiCall(argument, callOptions, callback); }; } + + return this.deviceManagerStub; } /** @@ -377,6 +403,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.createDeviceRegistry(request, options, callback); } getDeviceRegistry( @@ -449,6 +476,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getDeviceRegistry(request, options, callback); } updateDeviceRegistry( @@ -529,6 +557,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ 'device_registry.name': request.deviceRegistry!.name || '', }); + this.initialize(); return this._innerApiCalls.updateDeviceRegistry(request, options, callback); } deleteDeviceRegistry( @@ -602,6 +631,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteDeviceRegistry(request, options, callback); } createDevice( @@ -679,6 +709,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.createDevice(request, options, callback); } getDevice( @@ -755,6 +786,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getDevice(request, options, callback); } updateDevice( @@ -834,6 +866,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ 'device.name': request.device!.name || '', }); + this.initialize(); return this._innerApiCalls.updateDevice(request, options, callback); } deleteDevice( @@ -907,6 +940,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteDevice(request, options, callback); } modifyCloudToDeviceConfig( @@ -999,6 +1033,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.modifyCloudToDeviceConfig( request, options, @@ -1090,6 +1125,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listDeviceConfigVersions( request, options, @@ -1172,6 +1208,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listDeviceStates(request, options, callback); } setIamPolicy( @@ -1242,6 +1279,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ resource: request.resource || '', }); + this.initialize(); return this._innerApiCalls.setIamPolicy(request, options, callback); } getIamPolicy( @@ -1313,6 +1351,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ resource: request.resource || '', }); + this.initialize(); return this._innerApiCalls.getIamPolicy(request, options, callback); } testIamPermissions( @@ -1384,6 +1423,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ resource: request.resource || '', }); + this.initialize(); return this._innerApiCalls.testIamPermissions(request, options, callback); } sendCommandToDevice( @@ -1478,6 +1518,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.sendCommandToDevice(request, options, callback); } bindDeviceToGateway( @@ -1558,6 +1599,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.bindDeviceToGateway(request, options, callback); } unbindDeviceFromGateway( @@ -1646,6 +1688,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.unbindDeviceFromGateway( request, options, @@ -1744,6 +1787,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.listDeviceRegistries(request, options, callback); } @@ -1793,6 +1837,7 @@ export class DeviceManagerClient { parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listDeviceRegistries.createStream( this._innerApiCalls.listDeviceRegistries as gax.GaxCall, request, @@ -1902,6 +1947,7 @@ export class DeviceManagerClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.listDevices(request, options, callback); } @@ -1963,6 +2009,7 @@ export class DeviceManagerClient { parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listDevices.createStream( this._innerApiCalls.listDevices as gax.GaxCall, request, @@ -2134,8 +2181,9 @@ export class DeviceManagerClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.deviceManagerStub.then(stub => { + return this.deviceManagerStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 0d3bc2ed6a4..f86ef666972 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,13 +1,13 @@ { - "updateTime": "2020-02-07T12:24:06.644900Z", + "updateTime": "2020-03-05T23:09:27.906886Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", - "internalRef": "293710856", - "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n" + "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\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\n" } }, { diff --git a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts index 2b6003f5144..9471d366298 100644 --- a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts +++ b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts @@ -81,12 +81,30 @@ describe('v1.DeviceManagerClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManagerStub, undefined); + await client.initialize(); + assert(client.deviceManagerStub); + }); + it('has close method', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('createDeviceRegistry', () => { it('invokes createDeviceRegistry without error', done => { const client = new devicemanagerModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; request.parent = ''; @@ -110,6 +128,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; request.parent = ''; @@ -135,6 +155,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; request.name = ''; @@ -158,6 +180,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; request.name = ''; @@ -183,6 +207,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest = {}; request.deviceRegistry = {}; @@ -207,6 +233,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest = {}; request.deviceRegistry = {}; @@ -233,6 +261,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; request.name = ''; @@ -256,6 +286,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; request.name = ''; @@ -281,6 +313,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; request.parent = ''; @@ -304,6 +338,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; request.parent = ''; @@ -329,6 +365,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; request.name = ''; @@ -352,6 +390,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; request.name = ''; @@ -377,6 +417,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest = {}; request.device = {}; @@ -401,6 +443,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest = {}; request.device = {}; @@ -427,6 +471,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; request.name = ''; @@ -450,6 +496,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; request.name = ''; @@ -475,6 +523,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; request.name = ''; @@ -498,6 +548,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; request.name = ''; @@ -526,6 +578,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; request.name = ''; @@ -549,6 +603,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; request.name = ''; @@ -577,6 +633,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; request.name = ''; @@ -600,6 +658,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; request.name = ''; @@ -625,6 +685,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; request.resource = ''; @@ -648,6 +710,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; request.resource = ''; @@ -673,6 +737,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; request.resource = ''; @@ -696,6 +762,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; request.resource = ''; @@ -721,6 +789,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; request.resource = ''; @@ -744,6 +814,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; request.resource = ''; @@ -769,6 +841,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; request.name = ''; @@ -792,6 +866,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; request.name = ''; @@ -817,6 +893,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; request.parent = ''; @@ -840,6 +918,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; request.parent = ''; @@ -865,6 +945,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; request.parent = ''; @@ -888,6 +970,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; request.parent = ''; @@ -916,6 +1000,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; request.parent = ''; @@ -943,6 +1029,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; request.parent = ''; @@ -975,6 +1063,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; request.parent = ''; @@ -1002,6 +1092,8 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; request.parent = ''; From 3b1e235cefb685fd81e86ee18780d25edaaea331 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 01:23:55 +0000 Subject: [PATCH 177/370] build: update linkinator config (#284) --- packages/google-cloud-iot/linkinator.config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/linkinator.config.json b/packages/google-cloud-iot/linkinator.config.json index b555215ca02..29a223b6db6 100644 --- a/packages/google-cloud-iot/linkinator.config.json +++ b/packages/google-cloud-iot/linkinator.config.json @@ -4,5 +4,7 @@ "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io" - ] + ], + "silent": true, + "concurrency": 10 } From 4b02b52001f9aff5b49848ca525abc667c36eaa7 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Mar 2020 14:57:38 -0800 Subject: [PATCH 178/370] build(tests): fix coveralls and enable build cop (#285) --- packages/google-cloud-iot/.mocharc.js | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/google-cloud-iot/.mocharc.js diff --git a/packages/google-cloud-iot/.mocharc.js b/packages/google-cloud-iot/.mocharc.js new file mode 100644 index 00000000000..ff7b34fa5d1 --- /dev/null +++ b/packages/google-cloud-iot/.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 a9637f21f023584eec2be9052af94f66b09a07ad Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2020 23:06:17 +0000 Subject: [PATCH 179/370] chore: release 1.8.0 (#275) :robot: I have created a release \*beep\* \*boop\* --- ## [1.8.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.7.0...v1.8.0) (2020-03-06) ### Features * deferred client initialization ([#283](https://www.github.com/googleapis/nodejs-iot/issues/283)) ([b70a193](https://www.github.com/googleapis/nodejs-iot/commit/b70a1938f4254fff0f3839bca5871207b8d97c35)) * export protos in src/index.ts ([9c3098c](https://www.github.com/googleapis/nodejs-iot/commit/9c3098ca5a232f7fb575d5dce2bc1473365b20bd)) ### Bug Fixes * pass x-goog-request-params header for streaming calls ([5a35e0f](https://www.github.com/googleapis/nodejs-iot/commit/5a35e0fd4ea40a1a5e9be2c03e83db5fb7c11f81)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-iot/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 987eca288ca..67f513724b9 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.8.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.7.0...v1.8.0) (2020-03-06) + + +### Features + +* deferred client initialization ([#283](https://www.github.com/googleapis/nodejs-iot/issues/283)) ([b70a193](https://www.github.com/googleapis/nodejs-iot/commit/b70a1938f4254fff0f3839bca5871207b8d97c35)) +* export protos in src/index.ts ([9c3098c](https://www.github.com/googleapis/nodejs-iot/commit/9c3098ca5a232f7fb575d5dce2bc1473365b20bd)) + + +### Bug Fixes + +* pass x-goog-request-params header for streaming calls ([5a35e0f](https://www.github.com/googleapis/nodejs-iot/commit/5a35e0fd4ea40a1a5e9be2c03e83db5fb7c11f81)) + ## [1.7.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.6.1...v1.7.0) (2020-01-30) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 6d1e9c282c8..52905b188bf 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.7.0", + "version": "1.8.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 52a26f22e40..21e0d19de7a 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.7.0" + "@google-cloud/iot": "^1.8.0" }, "devDependencies": { "chai": "^4.2.0", From 4a576ab4b86e615b5a67dc67d4b1933d1ad7eeb8 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 18 Mar 2020 12:57:19 -0700 Subject: [PATCH 180/370] docs: mention templates in contributing section of README (#287) --- packages/google-cloud-iot/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 30019141650..19ff8e19b0a 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -112,6 +112,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-iot/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 66ca61108f40149c053fbbc31b8883975718456b Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 19 Mar 2020 08:54:17 -0700 Subject: [PATCH 181/370] chore: remove snippet leading whitespace (#289) --- packages/google-cloud-iot/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 19ff8e19b0a..56ad6700cee 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -57,19 +57,19 @@ npm install @google-cloud/iot ### Using the client library ```javascript - const iot = require('@google-cloud/iot'); - const client = new iot.v1.DeviceManagerClient(); - - async function quickstart() { - const projectId = await client.getProjectId(); - const parent = client.locationPath(projectId, 'us-central1'); - const [resources] = await client.listDeviceRegistries({parent}); - console.log(`${resources.length} resource(s) found.`); - for (const resource of resources) { - console.log(resource); - } +const iot = require('@google-cloud/iot'); +const client = new iot.v1.DeviceManagerClient(); + +async function quickstart() { + const projectId = await client.getProjectId(); + const parent = client.locationPath(projectId, 'us-central1'); + const [resources] = await client.listDeviceRegistries({parent}); + console.log(`${resources.length} resource(s) found.`); + for (const resource of resources) { + console.log(resource); } - quickstart(); +} +quickstart(); ``` From da4cfcdcf1d5f80bf51dc7fee4e87b18e83eb98b Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Mar 2020 18:30:32 -0700 Subject: [PATCH 182/370] docs: document version support goals (#294) --- packages/google-cloud-iot/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 56ad6700cee..37b4de1e2df 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -89,6 +89,27 @@ has instructions for running the samples. The [Google Cloud Internet of Things (IoT) Core 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 418baa9402f367abc55d6186382136654ba22c6b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Mar 2020 01:12:25 -0700 Subject: [PATCH 183/370] chore: regenerate the code (#293) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-03-22 04:30:28,197 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. 2020-03-22 04:30:28,251 synthtool > Ensuring dependencies. 2020-03-22 04:30:28,255 synthtool > Cloning googleapis. 2020-03-22 04:30:28,925 synthtool > Pulling Docker image: gapic-generator-typescript:latest latest: Pulling from gapic-images/gapic-generator-typescript Digest: sha256:3762b8bcba247ef4d020ffc7043e2881a20b5fab0ffd98d542f365d3f3a3829d Status: Image is up to date for gcr.io/gapic-images/gapic-generator-typescript:latest 2020-03-22 04:30:29,812 synthtool > Generating code for: google/cloud/iot/v1. 2020-03-22 04:30:31,025 synthtool > Generated code into /tmpfs/tmp/tmpsi2w37kk. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/publish.yml .github/release-please.yml .github/workflows/ci.yaml .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node12/common.cfg .kokoro/continuous/node12/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node12/common.cfg .kokoro/presubmit/node12/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/docs.cfg .kokoro/release/docs.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .mocharc.js .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml renovate.json samples/README.md 2020-03-22 04:30:31,755 synthtool > No replacements made in src/v1/doc/google/cloud/iot/v1/doc_resources.js for pattern \[RFC(.*)\]\(https:\/\/cloud\.google\.com, maybe replacement is no longer needed? npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > protobufjs@6.8.9 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall > @google-cloud/iot@1.8.0 prepare /tmpfs/src/git/autosynth/working_repo > npm run compile npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/iot@1.8.0 compile /tmpfs/src/git/autosynth/working_repo > tsc -p . && cp -r protos build/ npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev@1.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/abbrev): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/abbrev' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.abbrev.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ansi-regex@2.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/ansi-regex): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ansi-regex' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ansi-regex.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: aproba@1.2.0 (node_modules/watchpack/node_modules/fsevents/node_modules/aproba): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/aproba' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.aproba.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: balanced-match@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/balanced-match): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/balanced-match' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.balanced-match.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: chownr@1.1.4 (node_modules/watchpack/node_modules/fsevents/node_modules/chownr): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/chownr' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.chownr.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: code-point-at@1.1.0 (node_modules/watchpack/node_modules/fsevents/node_modules/code-point-at): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/code-point-at' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.code-point-at.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: concat-map@0.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/concat-map): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/concat-map' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.concat-map.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: console-control-strings@1.1.0 (node_modules/watchpack/node_modules/fsevents/node_modules/console-control-strings): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/console-control-strings' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.console-control-strings.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-util-is@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/core-util-is): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/core-util-is' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.core-util-is.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: deep-extend@0.6.0 (node_modules/watchpack/node_modules/fsevents/node_modules/deep-extend): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/deep-extend' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.deep-extend.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: delegates@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/delegates): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/delegates' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.delegates.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: detect-libc@1.0.3 (node_modules/watchpack/node_modules/fsevents/node_modules/detect-libc): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/detect-libc' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.detect-libc.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs.realpath@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/fs.realpath): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/fs.realpath' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.fs.realpath.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: has-unicode@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/has-unicode): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/has-unicode' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.has-unicode.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: inherits@2.0.4 (node_modules/watchpack/node_modules/fsevents/node_modules/inherits): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/inherits' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.inherits.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ini@1.3.5 (node_modules/watchpack/node_modules/fsevents/node_modules/ini): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ini' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ini.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: isarray@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/isarray): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/isarray' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.isarray.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@1.2.5 (node_modules/watchpack/node_modules/fsevents/node_modules/minimist): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/minimist' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.minimist.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ms@2.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/ms): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ms' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ms.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm-normalize-package-bin@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/npm-normalize-package-bin): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/npm-normalize-package-bin' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.npm-normalize-package-bin.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: number-is-nan@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/number-is-nan): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/number-is-nan' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.number-is-nan.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-assign@4.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/object-assign): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/object-assign' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.object-assign.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-homedir@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/os-homedir): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/os-homedir' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.os-homedir.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-tmpdir@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/os-tmpdir): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/os-tmpdir' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.os-tmpdir.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: path-is-absolute@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/path-is-absolute): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/path-is-absolute' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.path-is-absolute.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: process-nextick-args@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/process-nextick-args): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/process-nextick-args' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.process-nextick-args.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safe-buffer@5.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/safe-buffer): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/safe-buffer' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.safe-buffer.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safer-buffer@2.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/safer-buffer): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/safer-buffer' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.safer-buffer.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sax@1.2.4 (node_modules/watchpack/node_modules/fsevents/node_modules/sax): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/sax' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.sax.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: semver@5.7.1 (node_modules/watchpack/node_modules/fsevents/node_modules/semver): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/semver' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.semver.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: set-blocking@2.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/set-blocking): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/set-blocking' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.set-blocking.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: signal-exit@3.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/signal-exit): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/signal-exit' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.signal-exit.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: strip-json-comments@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/strip-json-comments): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/strip-json-comments' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.strip-json-comments.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: util-deprecate@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/util-deprecate): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/util-deprecate' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.util-deprecate.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wrappy@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/wrappy): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/wrappy' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.wrappy.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: yallist@3.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/yallist): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/yallist' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.yallist.DELETE' added 967 packages from 454 contributors and audited 6746 packages in 22.787s found 0 vulnerabilities npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/iot@1.8.0 fix /tmpfs/src/git/autosynth/working_repo > gts fix installing semver@^5.5.0 installing uglify-js@^3.3.25 installing espree@^3.5.4 installing escodegen@^1.9.1 2020-03-22 04:31:07,905 synthtool > Wrote metadata to synth.metadata. ```
--- packages/google-cloud-iot/.jsdoc.js | 2 +- .../src/v1/device_manager_client.ts | 12 +++++++++--- packages/google-cloud-iot/src/v1/index.ts | 2 +- packages/google-cloud-iot/synth.metadata | 16 ++++++++-------- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-iot/system-test/install.ts | 2 +- .../test/gapic-device_manager-v1.ts | 2 +- packages/google-cloud-iot/webpack.config.js | 2 +- 9 files changed, 24 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 04fdbb96100..716a17cf3fd 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 5c2603d65c2..d3f7d094da7 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_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. @@ -40,7 +40,12 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class DeviceManagerClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; private _innerApiCalls: {[name: string]: Function}; private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; @@ -248,7 +253,8 @@ export class DeviceManagerClient { 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; diff --git a/packages/google-cloud-iot/src/v1/index.ts b/packages/google-cloud-iot/src/v1/index.ts index acca752cbd0..bdf9d31851c 100644 --- a/packages/google-cloud-iot/src/v1/index.ts +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f86ef666972..31ee43092fa 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-03-05T23:09:27.906886Z", + "updateTime": "2020-03-22T11:31:07.904758Z", "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\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\n" + "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", + "internalRef": "302154871", + "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" } } ], diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index e164f5054a0..aad4bca1cfd 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-iot/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. diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts index 97bac1008ca..4c465b652eb 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-iot/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. diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index c9aa74ec221..c4d80e9c0c8 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/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-iot/test/gapic-device_manager-v1.ts b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts index 9471d366298..b37c94798db 100644 --- a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts +++ b/packages/google-cloud-iot/test/gapic-device_manager-v1.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-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js index 42c3e36a6a5..66f66d15c23 100644 --- a/packages/google-cloud-iot/webpack.config.js +++ b/packages/google-cloud-iot/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 1263ea9a8bf3416210d481d9031a8882984d2472 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 31 Mar 2020 14:48:17 -0700 Subject: [PATCH 184/370] feat!: drop node8 support, support for async iterators (#297) 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. --- packages/google-cloud-iot/.eslintrc.json | 3 + packages/google-cloud-iot/.eslintrc.yml | 15 - packages/google-cloud-iot/.prettierrc | 8 - packages/google-cloud-iot/.prettierrc.js | 17 + packages/google-cloud-iot/package.json | 12 +- .../smoke-test/device_manager_smoke_test.js | 5 + .../src/v1/device_manager_client.ts | 1103 ++++--- packages/google-cloud-iot/synth.metadata | 20 +- .../system-test/fixtures/sample/src/index.js | 1 - .../system-test/fixtures/sample/src/index.ts | 2 +- .../test/gapic-device_manager-v1.ts | 1123 ------- .../test/gapic_device_manager_v1.ts | 2928 +++++++++++++++++ packages/google-cloud-iot/webpack.config.js | 12 +- 13 files changed, 3661 insertions(+), 1588 deletions(-) create mode 100644 packages/google-cloud-iot/.eslintrc.json delete mode 100644 packages/google-cloud-iot/.eslintrc.yml delete mode 100644 packages/google-cloud-iot/.prettierrc create mode 100644 packages/google-cloud-iot/.prettierrc.js delete mode 100644 packages/google-cloud-iot/test/gapic-device_manager-v1.ts create mode 100644 packages/google-cloud-iot/test/gapic_device_manager_v1.ts diff --git a/packages/google-cloud-iot/.eslintrc.json b/packages/google-cloud-iot/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-iot/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-iot/.eslintrc.yml b/packages/google-cloud-iot/.eslintrc.yml deleted file mode 100644 index 73eeec27612..00000000000 --- a/packages/google-cloud-iot/.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-iot/.prettierrc b/packages/google-cloud-iot/.prettierrc deleted file mode 100644 index df6eac07446..00000000000 --- a/packages/google-cloud-iot/.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-iot/.prettierrc.js b/packages/google-cloud-iot/.prettierrc.js new file mode 100644 index 00000000000..08cba3775be --- /dev/null +++ b/packages/google-cloud-iot/.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-iot/package.json b/packages/google-cloud-iot/package.json index 52905b188bf..0a009e0aec8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=8.10.0" + "node": ">=10" }, "repository": "googleapis/nodejs-iot", "main": "build/src/index.js", @@ -42,27 +42,29 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^1.9.0" + "google-gax": "^2.0.1" }, "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", + "@types/sinon": "^7.5.2", "c8": "^7.0.0", "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.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "prettier": "^1.13.7", "mocha": "^7.0.0", "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.2", "webpack-cli": "^3.3.10" } diff --git a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js index e0a6f7f8684..ef16ff26ae3 100644 --- a/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js +++ b/packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js @@ -14,6 +14,8 @@ 'use strict'; +const {describe, it} = require('mocha'); + describe('DeviceManagerSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); @@ -21,6 +23,7 @@ describe('DeviceManagerSmokeTest', () => { const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { + // eslint-disable-next-line node/no-missing-require const iot = require('../src'); const client = new iot.v1.DeviceManagerClient({ @@ -43,6 +46,7 @@ describe('DeviceManagerSmokeTest', () => { }); it('successfully makes a call to the service using callbacks', done => { + // eslint-disable-next-line node/no-missing-require const iot = require('../src'); const client = new iot.v1.DeviceManagerClient({ @@ -76,6 +80,7 @@ describe('DeviceManagerSmokeTest', () => { }); it('successfully makes a call to the service using streaming', done => { + // eslint-disable-next-line node/no-missing-require const iot = require('../src'); const client = new iot.v1.DeviceManagerClient({ diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index d3f7d094da7..7aca39540bc 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -18,18 +18,18 @@ import * as gax from 'google-gax'; import { - APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, - PaginationResponse, + GaxCall, } from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './device_manager_client_config.json'; const version = require('../../../package.json').version; @@ -40,14 +40,6 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class DeviceManagerClient { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -55,6 +47,14 @@ export class DeviceManagerClient { 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}; deviceManagerStub?: Promise<{[name: string]: Function}>; /** @@ -146,13 +146,16 @@ export class DeviceManagerClient { '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 = { devicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/registries/{registry}/devices/{device}' ), @@ -167,7 +170,7 @@ export class DeviceManagerClient { // 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 = { listDeviceRegistries: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -191,7 +194,7 @@ export class DeviceManagerClient { // 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 = {}; } /** @@ -218,7 +221,7 @@ export class DeviceManagerClient { ? (this._protos as protobuf.Root).lookupService( 'google.cloud.iot.v1.DeviceManager' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.iot.v1.DeviceManager, this._opts ) as Promise<{[method: string]: Function}>; @@ -246,9 +249,8 @@ export class DeviceManagerClient { 'bindDeviceToGateway', 'unbindDeviceFromGateway', ]; - for (const methodName of deviceManagerStubMethods) { - const innerCallPromise = this.deviceManagerStub.then( + const callPromise = this.deviceManagerStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -262,20 +264,14 @@ export class DeviceManagerClient { ); 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.deviceManagerStub; @@ -335,22 +331,34 @@ export class DeviceManagerClient { // -- Service calls -- // ------------------- createDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, {} | undefined ] >; createDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDeviceRegistry( + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -372,24 +380,27 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - | protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, {} | undefined ] > | void { @@ -410,25 +421,33 @@ export class DeviceManagerClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createDeviceRegistry(request, options, callback); + return this.innerApiCalls.createDeviceRegistry(request, options, callback); } getDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, {} | undefined ] >; getDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, + {} | null | undefined + > + ): void; + getDeviceRegistry( + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -446,23 +465,25 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IGetDeviceRegistryRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, {} | undefined ] > | void { @@ -483,25 +504,37 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getDeviceRegistry(request, options, callback); + return this.innerApiCalls.getDeviceRegistry(request, options, callback); } updateDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, {} | undefined ] >; updateDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDeviceRegistry( + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -526,24 +559,27 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - | protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, {} | undefined ] > | void { @@ -564,25 +600,37 @@ export class DeviceManagerClient { 'device_registry.name': request.deviceRegistry!.name || '', }); this.initialize(); - return this._innerApiCalls.updateDeviceRegistry(request, options, callback); + return this.innerApiCalls.updateDeviceRegistry(request, options, callback); } deleteDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, {} | undefined ] >; deleteDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDeviceRegistry( + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -600,24 +648,27 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteDeviceRegistry( - request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, {} | undefined ] > | void { @@ -638,25 +689,33 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteDeviceRegistry(request, options, callback); + return this.innerApiCalls.deleteDeviceRegistry(request, options, callback); } createDevice( - request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest, + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | undefined, {} | undefined ] >; createDevice( - request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest, + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + createDevice( + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -679,23 +738,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createDevice( - request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest, + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | undefined, {} | undefined ] > | void { @@ -716,25 +775,33 @@ export class DeviceManagerClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createDevice(request, options, callback); + return this.innerApiCalls.createDevice(request, options, callback); } getDevice( - request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest, + request: protos.google.cloud.iot.v1.IGetDeviceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | undefined, {} | undefined ] >; getDevice( - request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest, + request: protos.google.cloud.iot.v1.IGetDeviceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + getDevice( + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -756,23 +823,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getDevice( - request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest, + request: protos.google.cloud.iot.v1.IGetDeviceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IGetDeviceRequest | undefined, + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | undefined, {} | undefined ] > | void { @@ -793,25 +860,33 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getDevice(request, options, callback); + return this.innerApiCalls.getDevice(request, options, callback); } updateDevice( - request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest, + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, {} | undefined ] >; updateDevice( - request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest, + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + updateDevice( + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -836,23 +911,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateDevice( - request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest, + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice, - protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, {} | undefined ] > | void { @@ -873,25 +948,33 @@ export class DeviceManagerClient { 'device.name': request.device!.name || '', }); this.initialize(); - return this._innerApiCalls.updateDevice(request, options, callback); + return this.innerApiCalls.updateDevice(request, options, callback); } deleteDevice( - request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest, + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, {} | undefined ] >; deleteDevice( - request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest, + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteDevice( + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -910,23 +993,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteDevice( - request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest, + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, {} | undefined ] > | void { @@ -947,29 +1030,37 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteDevice(request, options, callback); + return this.innerApiCalls.deleteDevice(request, options, callback); } modifyCloudToDeviceConfig( - request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceConfig, - ( - | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest - | undefined - ), + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest | undefined, {} | undefined ] >; modifyCloudToDeviceConfig( - request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IDeviceConfig, - | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + modifyCloudToDeviceConfig( + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -998,28 +1089,27 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ modifyCloudToDeviceConfig( - request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IDeviceConfig, - | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IDeviceConfig, - | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceConfig, - ( - | protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest - | undefined - ), + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest | undefined, {} | undefined ] > | void { @@ -1040,33 +1130,41 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.modifyCloudToDeviceConfig( + return this.innerApiCalls.modifyCloudToDeviceConfig( request, options, callback ); } listDeviceConfigVersions( - request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - ( - | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest - | undefined - ), + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest | undefined, {} | undefined ] >; listDeviceConfigVersions( - request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + listDeviceConfigVersions( + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1090,28 +1188,27 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listDeviceConfigVersions( - request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - ( - | protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest - | undefined - ), + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest | undefined, {} | undefined ] > | void { @@ -1132,29 +1229,37 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listDeviceConfigVersions( + return this.innerApiCalls.listDeviceConfigVersions( request, options, callback ); } listDeviceStates( - request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest, + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, - protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, {} | undefined ] >; listDeviceStates( - request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest, + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, - protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, + {} | null | undefined + > + ): void; + listDeviceStates( + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1178,23 +1283,25 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listDeviceStates( - request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest, + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, - protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + | protos.google.cloud.iot.v1.IListDeviceStatesRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, - protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IListDeviceStatesResponse, - protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, {} | undefined ] > | void { @@ -1215,25 +1322,33 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listDeviceStates(request, options, callback); + return this.innerApiCalls.listDeviceStates(request, options, callback); } setIamPolicy( - request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + request: protos.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ] >; setIamPolicy( - request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + request: protos.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1249,23 +1364,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ setIamPolicy( - request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + request: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ] > | void { @@ -1286,25 +1401,33 @@ export class DeviceManagerClient { resource: request.resource || '', }); this.initialize(); - return this._innerApiCalls.setIamPolicy(request, options, callback); + return this.innerApiCalls.setIamPolicy(request, options, callback); } getIamPolicy( - request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + request: protos.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ] >; getIamPolicy( - request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + request: protos.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1321,23 +1444,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getIamPolicy( - request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + request: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.iam.v1.IPolicy, - protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ] > | void { @@ -1358,25 +1481,33 @@ export class DeviceManagerClient { resource: request.resource || '', }); this.initialize(); - return this._innerApiCalls.getIamPolicy(request, options, callback); + return this.innerApiCalls.getIamPolicy(request, options, callback); } testIamPermissions( - request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + request: protos.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.iam.v1.ITestIamPermissionsResponse, - protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ] >; testIamPermissions( - request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + request: protos.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.iam.v1.ITestIamPermissionsResponse, - protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1393,23 +1524,23 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ testIamPermissions( - request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + request: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.iam.v1.ITestIamPermissionsResponse, - protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.iam.v1.ITestIamPermissionsResponse, - protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.iam.v1.ITestIamPermissionsResponse, - protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ] > | void { @@ -1430,25 +1561,33 @@ export class DeviceManagerClient { resource: request.resource || '', }); this.initialize(); - return this._innerApiCalls.testIamPermissions(request, options, callback); + return this.innerApiCalls.testIamPermissions(request, options, callback); } sendCommandToDevice( - request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest, + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, {} | undefined ] >; sendCommandToDevice( - request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest, + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + sendCommandToDevice( + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1487,24 +1626,25 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ sendCommandToDevice( - request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest, + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, - | protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + | protos.google.cloud.iot.v1.ISendCommandToDeviceRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, {} | undefined ] > | void { @@ -1525,25 +1665,33 @@ export class DeviceManagerClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.sendCommandToDevice(request, options, callback); + return this.innerApiCalls.sendCommandToDevice(request, options, callback); } bindDeviceToGateway( - request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, {} | undefined ] >; bindDeviceToGateway( - request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, + {} | null | undefined + > + ): void; + bindDeviceToGateway( + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + callback: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1568,24 +1716,25 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ bindDeviceToGateway( - request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - | protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + | protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, - {} | undefined + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, {} | undefined ] > | void { @@ -1606,29 +1755,37 @@ export class DeviceManagerClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.bindDeviceToGateway(request, options, callback); + return this.innerApiCalls.bindDeviceToGateway(request, options, callback); } unbindDeviceFromGateway( - request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - ( - | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest - | undefined - ), + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest | undefined, {} | undefined ] >; unbindDeviceFromGateway( - request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + unbindDeviceFromGateway( + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + callback: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1653,28 +1810,27 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ unbindDeviceFromGateway( - request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - ( - | protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest - | undefined - ), + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest | undefined, {} | undefined ] > | void { @@ -1695,7 +1851,7 @@ export class DeviceManagerClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.unbindDeviceFromGateway( + return this.innerApiCalls.unbindDeviceFromGateway( request, options, callback @@ -1703,22 +1859,34 @@ export class DeviceManagerClient { } listDeviceRegistries( - request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry[], - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + protos.google.cloud.iot.v1.IDeviceRegistry[], + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse ] >; listDeviceRegistries( - request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry[], - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry + > + ): void; + listDeviceRegistries( + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry > ): void; /** @@ -1757,24 +1925,28 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listDeviceRegistries( - request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry[], - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + | PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry >, - callback?: Callback< - protosTypes.google.cloud.iot.v1.IDeviceRegistry[], - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + callback?: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDeviceRegistry[], - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protosTypes.google.cloud.iot.v1.IListDeviceRegistriesResponse + protos.google.cloud.iot.v1.IDeviceRegistry[], + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse ] > | void { request = request || {}; @@ -1794,7 +1966,7 @@ export class DeviceManagerClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listDeviceRegistries(request, options, callback); + return this.innerApiCalls.listDeviceRegistries(request, options, callback); } /** @@ -1830,7 +2002,7 @@ export class DeviceManagerClient { * An object stream which emits an object representing [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. */ listDeviceRegistriesStream( - request?: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest, + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1844,29 +2016,84 @@ export class DeviceManagerClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listDeviceRegistries.createStream( - this._innerApiCalls.listDeviceRegistries as gax.GaxCall, + return this.descriptors.page.listDeviceRegistries.createStream( + this.innerApiCalls.listDeviceRegistries as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listDeviceRegistries}, 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @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. + */ + listDeviceRegistriesAsync( + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + 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.listDeviceRegistries.asyncIterate( + this.innerApiCalls['listDeviceRegistries'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listDevices( - request: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + request: protos.google.cloud.iot.v1.IListDevicesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice[], - protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, - protosTypes.google.cloud.iot.v1.IListDevicesResponse + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest | null, + protos.google.cloud.iot.v1.IListDevicesResponse ] >; listDevices( - request: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + request: protos.google.cloud.iot.v1.IListDevicesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.cloud.iot.v1.IDevice[], - protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, - protosTypes.google.cloud.iot.v1.IListDevicesResponse + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + > + ): void; + listDevices( + request: protos.google.cloud.iot.v1.IListDevicesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice > ): void; /** @@ -1917,24 +2144,24 @@ export class DeviceManagerClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listDevices( - request: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + request: protos.google.cloud.iot.v1.IListDevicesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.cloud.iot.v1.IDevice[], - protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, - protosTypes.google.cloud.iot.v1.IListDevicesResponse + | PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice >, - callback?: Callback< - protosTypes.google.cloud.iot.v1.IDevice[], - protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, - protosTypes.google.cloud.iot.v1.IListDevicesResponse + callback?: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice > ): Promise< [ - protosTypes.google.cloud.iot.v1.IDevice[], - protosTypes.google.cloud.iot.v1.IListDevicesRequest | null, - protosTypes.google.cloud.iot.v1.IListDevicesResponse + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest | null, + protos.google.cloud.iot.v1.IListDevicesResponse ] > | void { request = request || {}; @@ -1954,7 +2181,7 @@ export class DeviceManagerClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listDevices(request, options, callback); + return this.innerApiCalls.listDevices(request, options, callback); } /** @@ -2002,7 +2229,7 @@ export class DeviceManagerClient { * An object stream which emits an object representing [Device]{@link google.cloud.iot.v1.Device} on 'data' event. */ listDevicesStream( - request?: protosTypes.google.cloud.iot.v1.IListDevicesRequest, + request?: protos.google.cloud.iot.v1.IListDevicesRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -2016,12 +2243,71 @@ export class DeviceManagerClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listDevices.createStream( - this._innerApiCalls.listDevices as gax.GaxCall, + return this.descriptors.page.listDevices.createStream( + this.innerApiCalls.listDevices as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listDevices}, 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @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. + */ + listDevicesAsync( + request?: protos.google.cloud.iot.v1.IListDevicesRequest, + 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.listDevices.asyncIterate( + this.innerApiCalls['listDevices'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -2041,11 +2327,11 @@ export class DeviceManagerClient { registry: string, device: string ) { - return this._pathTemplates.devicePathTemplate.render({ - project, - location, - registry, - device, + return this.pathTemplates.devicePathTemplate.render({ + project: project, + location: location, + registry: registry, + device: device, }); } @@ -2057,7 +2343,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the project. */ matchProjectFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).project; + return this.pathTemplates.devicePathTemplate.match(deviceName).project; } /** @@ -2068,7 +2354,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the location. */ matchLocationFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).location; + return this.pathTemplates.devicePathTemplate.match(deviceName).location; } /** @@ -2079,7 +2365,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the registry. */ matchRegistryFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).registry; + return this.pathTemplates.devicePathTemplate.match(deviceName).registry; } /** @@ -2090,7 +2376,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the device. */ matchDeviceFromDeviceName(deviceName: string) { - return this._pathTemplates.devicePathTemplate.match(deviceName).device; + return this.pathTemplates.devicePathTemplate.match(deviceName).device; } /** @@ -2101,9 +2387,9 @@ export class DeviceManagerClient { * @returns {string} Resource name string. */ locationPath(project: string, location: string) { - return this._pathTemplates.locationPathTemplate.render({ - project, - location, + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, }); } @@ -2115,7 +2401,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the project. */ matchProjectFromLocationName(locationName: string) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; + return this.pathTemplates.locationPathTemplate.match(locationName).project; } /** @@ -2126,8 +2412,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the location. */ matchLocationFromLocationName(locationName: string) { - return this._pathTemplates.locationPathTemplate.match(locationName) - .location; + return this.pathTemplates.locationPathTemplate.match(locationName).location; } /** @@ -2139,10 +2424,10 @@ export class DeviceManagerClient { * @returns {string} Resource name string. */ registryPath(project: string, location: string, registry: string) { - return this._pathTemplates.registryPathTemplate.render({ - project, - location, - registry, + return this.pathTemplates.registryPathTemplate.render({ + project: project, + location: location, + registry: registry, }); } @@ -2154,7 +2439,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the project. */ matchProjectFromRegistryName(registryName: string) { - return this._pathTemplates.registryPathTemplate.match(registryName).project; + return this.pathTemplates.registryPathTemplate.match(registryName).project; } /** @@ -2165,8 +2450,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the location. */ matchLocationFromRegistryName(registryName: string) { - return this._pathTemplates.registryPathTemplate.match(registryName) - .location; + return this.pathTemplates.registryPathTemplate.match(registryName).location; } /** @@ -2177,8 +2461,7 @@ export class DeviceManagerClient { * @returns {string} A string representing the registry. */ matchRegistryFromRegistryName(registryName: string) { - return this._pathTemplates.registryPathTemplate.match(registryName) - .registry; + return this.pathTemplates.registryPathTemplate.match(registryName).registry; } /** diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 31ee43092fa..253da16c633 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,23 +1,5 @@ { - "updateTime": "2020-03-22T11:31:07.904758Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", - "internalRef": "302154871", - "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" - } - } - ], + "updateTime": "2020-03-31T19:41:59.723371Z", "destinations": [ { "client": { diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index aad4bca1cfd..a2565258670 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js @@ -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 iot = require('@google-cloud/iot'); diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts index 4c465b652eb..de567211b7a 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts @@ -19,7 +19,7 @@ import {DeviceManagerClient} from '@google-cloud/iot'; function main() { - const deviceManagerClient = new DeviceManagerClient(); + new DeviceManagerClient(); } main(); diff --git a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts b/packages/google-cloud-iot/test/gapic-device_manager-v1.ts deleted file mode 100644 index b37c94798db..00000000000 --- a/packages/google-cloud-iot/test/gapic-device_manager-v1.ts +++ /dev/null @@ -1,1123 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const devicemanagerModule = 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('v1.DeviceManagerClient', () => { - it('has servicePath', () => { - const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = devicemanagerModule.v1.DeviceManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.deviceManagerStub, undefined); - await client.initialize(); - assert(client.deviceManagerStub); - }); - it('has close method', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('createDeviceRegistry', () => { - it('invokes createDeviceRegistry without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createDeviceRegistry(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createDeviceRegistry with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRegistryRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createDeviceRegistry(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getDeviceRegistry', () => { - it('invokes getDeviceRegistry without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getDeviceRegistry(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDeviceRegistry with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IGetDeviceRegistryRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getDeviceRegistry(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateDeviceRegistry', () => { - it('invokes updateDeviceRegistry without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest = {}; - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateDeviceRegistry(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDeviceRegistry with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRegistryRequest = {}; - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateDeviceRegistry(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteDeviceRegistry', () => { - it('invokes deleteDeviceRegistry without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteDeviceRegistry(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteDeviceRegistry with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRegistryRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteDeviceRegistry = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteDeviceRegistry(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createDevice', () => { - it('invokes createDevice without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createDevice = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createDevice(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createDevice with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.ICreateDeviceRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createDevice(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getDevice', () => { - it('invokes getDevice without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getDevice = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getDevice(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDevice with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IGetDeviceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getDevice(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateDevice', () => { - it('invokes updateDevice without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest = {}; - request.device = {}; - request.device.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateDevice(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDevice with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IUpdateDeviceRequest = {}; - request.device = {}; - request.device.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateDevice(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteDevice', () => { - it('invokes deleteDevice without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteDevice(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteDevice with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IDeleteDeviceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteDevice(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('modifyCloudToDeviceConfig', () => { - it('invokes modifyCloudToDeviceConfig without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.modifyCloudToDeviceConfig(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes modifyCloudToDeviceConfig with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.modifyCloudToDeviceConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - client.modifyCloudToDeviceConfig( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('listDeviceConfigVersions', () => { - it('invokes listDeviceConfigVersions without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.listDeviceConfigVersions(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listDeviceConfigVersions with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDeviceConfigVersionsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.listDeviceConfigVersions = mockSimpleGrpcMethod( - request, - null, - error - ); - client.listDeviceConfigVersions( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('listDeviceStates', () => { - it('invokes listDeviceStates without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.listDeviceStates(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listDeviceStates with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDeviceStatesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.listDeviceStates = mockSimpleGrpcMethod( - request, - null, - error - ); - client.listDeviceStates(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; - request.resource = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.setIamPolicy(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes setIamPolicy with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; - request.resource = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - client.setIamPolicy(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; - request.resource = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getIamPolicy(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getIamPolicy with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; - request.resource = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getIamPolicy(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; - request.resource = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.testIamPermissions(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes testIamPermissions with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; - request.resource = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( - request, - null, - error - ); - client.testIamPermissions(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('sendCommandToDevice', () => { - it('invokes sendCommandToDevice without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.sendCommandToDevice(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes sendCommandToDevice with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.ISendCommandToDeviceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.sendCommandToDevice = mockSimpleGrpcMethod( - request, - null, - error - ); - client.sendCommandToDevice(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('bindDeviceToGateway', () => { - it('invokes bindDeviceToGateway without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.bindDeviceToGateway(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes bindDeviceToGateway with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IBindDeviceToGatewayRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.bindDeviceToGateway = mockSimpleGrpcMethod( - request, - null, - error - ); - client.bindDeviceToGateway(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('unbindDeviceFromGateway', () => { - it('invokes unbindDeviceFromGateway without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.unbindDeviceFromGateway(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes unbindDeviceFromGateway with error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.unbindDeviceFromGateway = mockSimpleGrpcMethod( - request, - null, - error - ); - client.unbindDeviceFromGateway( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('listDeviceRegistries', () => { - it('invokes listDeviceRegistries without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listDeviceRegistries = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listDeviceRegistries(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listDeviceRegistriesStream', () => { - it('invokes listDeviceRegistriesStream without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDeviceRegistriesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listDeviceRegistries = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listDeviceRegistriesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listDevices', () => { - it('invokes listDevices without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listDevices = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listDevices(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listDevicesStream', () => { - it('invokes listDevicesStream without error', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.iot.v1.IListDevicesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listDevices = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listDevicesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts new file mode 100644 index 00000000000..30ef59d7438 --- /dev/null +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -0,0 +1,2928 @@ +// 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 devicemanagerModule 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('v1.DeviceManagerClient', () => { + it('has servicePath', () => { + const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = devicemanagerModule.v1.DeviceManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManagerStub, undefined); + await client.initialize(); + assert(client.deviceManagerStub); + }); + + it('has close method', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + 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 devicemanagerModule.v1.DeviceManagerClient({ + 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('createDeviceRegistry', () => { + it('invokes createDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.createDeviceRegistry = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.createDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createDeviceRegistry( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getDeviceRegistry', () => { + it('invokes getDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.getDeviceRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.getDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.getDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getDeviceRegistry( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateDeviceRegistry', () => { + it('invokes updateDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateDeviceRegistry( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteDeviceRegistry', () => { + it('invokes deleteDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteDeviceRegistry( + 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.deleteDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createDevice', () => { + it('invokes createDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.createDevice = stubSimpleCall(expectedResponse); + const [response] = await client.createDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.createDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDevice = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.createDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getDevice', () => { + it('invokes getDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.getDevice = stubSimpleCall(expectedResponse); + const [response] = await client.getDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.getDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.getDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.getDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateDevice', () => { + it('invokes updateDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.updateDevice = stubSimpleCall(expectedResponse); + const [response] = await client.updateDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.updateDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDevice = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.updateDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteDevice', () => { + it('invokes deleteDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDevice = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteDevice( + 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.deleteDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDevice = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('modifyCloudToDeviceConfig', () => { + it('invokes modifyCloudToDeviceConfig without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceConfig() + ); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.modifyCloudToDeviceConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes modifyCloudToDeviceConfig without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceConfig() + ); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.modifyCloudToDeviceConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes modifyCloudToDeviceConfig with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.modifyCloudToDeviceConfig(request); + }, expectedError); + assert( + (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDeviceConfigVersions', () => { + it('invokes listDeviceConfigVersions without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() + ); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listDeviceConfigVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDeviceConfigVersions without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() + ); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDeviceConfigVersions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDeviceConfigVersions with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listDeviceConfigVersions(request); + }, expectedError); + assert( + (client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDeviceStates', () => { + it('invokes listDeviceStates without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesResponse() + ); + client.innerApiCalls.listDeviceStates = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceStates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDeviceStates without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesResponse() + ); + client.innerApiCalls.listDeviceStates = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDeviceStates( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IListDeviceStatesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDeviceStates with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceStates = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listDeviceStates(request); + }, expectedError); + assert( + (client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.setIamPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getIamPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + expectedResponse + ); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.testIamPermissions(request); + }, expectedError); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('sendCommandToDevice', () => { + it('invokes sendCommandToDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() + ); + client.innerApiCalls.sendCommandToDevice = stubSimpleCall( + expectedResponse + ); + const [response] = await client.sendCommandToDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes sendCommandToDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() + ); + client.innerApiCalls.sendCommandToDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.sendCommandToDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.ISendCommandToDeviceResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes sendCommandToDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.sendCommandToDevice = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.sendCommandToDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('bindDeviceToGateway', () => { + it('invokes bindDeviceToGateway without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() + ); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( + expectedResponse + ); + const [response] = await client.bindDeviceToGateway(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes bindDeviceToGateway without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() + ); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.bindDeviceToGateway( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes bindDeviceToGateway with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.bindDeviceToGateway(request); + }, expectedError); + assert( + (client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('unbindDeviceFromGateway', () => { + it('invokes unbindDeviceFromGateway without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() + ); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( + expectedResponse + ); + const [response] = await client.unbindDeviceFromGateway(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes unbindDeviceFromGateway without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() + ); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.unbindDeviceFromGateway( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes unbindDeviceFromGateway with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.unbindDeviceFromGateway(request); + }, expectedError); + assert( + (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDeviceRegistries', () => { + it('invokes listDeviceRegistries without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.innerApiCalls.listDeviceRegistries = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listDeviceRegistries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDeviceRegistries without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.innerApiCalls.listDeviceRegistries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDeviceRegistries( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDeviceRegistries with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceRegistries = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listDeviceRegistries(request); + }, expectedError); + assert( + (client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDeviceRegistriesStream without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listDeviceRegistriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; + stream.on( + 'data', + (response: protos.google.cloud.iot.v1.DeviceRegistry) => { + 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.listDeviceRegistries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDeviceRegistries, request) + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listDeviceRegistriesStream with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listDeviceRegistriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; + stream.on( + 'data', + (response: protos.google.cloud.iot.v1.DeviceRegistry) => { + 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.listDeviceRegistries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDeviceRegistries, request) + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDeviceRegistries without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; + const iterable = client.listDeviceRegistriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDeviceRegistries with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listDeviceRegistriesAsync(request); + assert.rejects(async () => { + const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listDevices', () => { + it('invokes listDevices without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.innerApiCalls.listDevices = stubSimpleCall(expectedResponse); + const [response] = await client.listDevices(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDevices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDevices without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.innerApiCalls.listDevices = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDevices( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDevices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDevices with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDevices = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listDevices(request); + }, expectedError); + assert( + (client.innerApiCalls.listDevices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDevicesStream without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.descriptors.page.listDevices.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.Device[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { + 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.listDevices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDevices, request) + ); + assert.strictEqual( + (client.descriptors.page.listDevices.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listDevicesStream with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDevices.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.Device[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { + 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.listDevices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDevices, request) + ); + assert.strictEqual( + (client.descriptors.page.listDevices.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDevices without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.iot.v1.IDevice[] = []; + const iterable = client.listDevicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDevices with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listDevicesAsync(request); + assert.rejects(async () => { + const responses: protos.google.cloud.iot.v1.IDevice[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('device', () => { + const fakePath = '/rendered/path/device'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + registry: 'registryValue', + device: 'deviceValue', + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.devicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.devicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('devicePath', () => { + const result = client.devicePath( + 'projectValue', + 'locationValue', + 'registryValue', + 'deviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.devicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeviceName', () => { + const result = client.matchProjectFromDeviceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeviceName', () => { + const result = client.matchLocationFromDeviceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRegistryFromDeviceName', () => { + const result = client.matchRegistryFromDeviceName(fakePath); + assert.strictEqual(result, 'registryValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeviceFromDeviceName', () => { + const result = client.matchDeviceFromDeviceName(fakePath); + assert.strictEqual(result, 'deviceValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('registry', () => { + const fakePath = '/rendered/path/registry'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + registry: 'registryValue', + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.registryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.registryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('registryPath', () => { + const result = client.registryPath( + 'projectValue', + 'locationValue', + 'registryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.registryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRegistryName', () => { + const result = client.matchProjectFromRegistryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRegistryName', () => { + const result = client.matchLocationFromRegistryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRegistryFromRegistryName', () => { + const result = client.matchRegistryFromRegistryName(fakePath); + assert.strictEqual(result, 'registryValue'); + assert( + (client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js index 66f66d15c23..1f0f42dd4c1 100644 --- a/packages/google-cloud-iot/webpack.config.js +++ b/packages/google-cloud-iot/webpack.config.js @@ -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 2c6f6991a5fc422bb6487558b28b42794f90718e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 31 Mar 2020 18:36:36 -0700 Subject: [PATCH 185/370] build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#299) --- packages/google-cloud-iot/synth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 669793f1e12..a3a7705c6e0 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -21,6 +21,9 @@ logging.basicConfig(level=logging.DEBUG) +AUTOSYNTH_MULTIPLE_COMMITS = True + + gapic = gcp.GAPICMicrogenerator() versions = ['v1'] From e516236d2a40132ab302263e036a74ed140b5e59 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 23:35:53 +0200 Subject: [PATCH 186/370] chore(deps): update dependency @types/sinon to v9 (#300) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0a009e0aec8..1c800f0a40d 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -47,7 +47,7 @@ "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "c8": "^7.0.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", From 1727bec66bf8aba84d1877d97e76901f085c1ef8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 5 Apr 2020 12:49:51 -0700 Subject: [PATCH 187/370] chore: remove duplicate mocha config (#303) --- packages/google-cloud-iot/.mocharc.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/google-cloud-iot/.mocharc.json diff --git a/packages/google-cloud-iot/.mocharc.json b/packages/google-cloud-iot/.mocharc.json deleted file mode 100644 index 670c5e2c24b..00000000000 --- a/packages/google-cloud-iot/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From 5744bbf8e9ad5412c8b4a66ad16e73c4c58a7f14 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 7 Apr 2020 00:14:17 -0700 Subject: [PATCH 188/370] fix: export explicit version from protos.js (#302) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1630485f-7526-4afd-9c13-b5660664d6a2/targets --- packages/google-cloud-iot/protos/protos.js | 2 +- packages/google-cloud-iot/synth.metadata | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 675cb417914..ad362f7a693 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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_iot_1_8_0_protos || ($protobuf.roots._google_cloud_iot_1_8_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 253da16c633..293846b5ebf 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,5 +1,22 @@ { - "updateTime": "2020-03-31T19:41:59.723371Z", + "updateTime": "2020-04-03T11:44:23.832443Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "3d5d228a58bdf875e6147b228db3159010c735ee", + "internalRef": "304500143" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + } + } + ], "destinations": [ { "client": { From aa55e747de7a8d568af3b17966f92095e516fc5a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Apr 2020 20:57:28 +0200 Subject: [PATCH 189/370] chore(deps): update dependency gts to v2.0.0 (#305) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1c800f0a40d..94ced33d1c4 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -53,7 +53,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.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From 6df3a5e4623217d987885e5e747b5a39418e2af5 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 10 Apr 2020 18:49:45 -0700 Subject: [PATCH 190/370] fix: remove eslint, update gax, fix generated protos, run the generator (#306) Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint. --- packages/google-cloud-iot/.jsdoc.js | 2 +- packages/google-cloud-iot/.prettierrc.js | 2 +- packages/google-cloud-iot/package.json | 12 ++--- packages/google-cloud-iot/protos/protos.json | 1 + packages/google-cloud-iot/synth.metadata | 13 ++---- packages/google-cloud-iot/synth.py | 2 +- .../test/gapic_device_manager_v1.ts | 46 +++++++++---------- 7 files changed, 34 insertions(+), 44 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 716a17cf3fd..fc2efcbc8c7 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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/iot', diff --git a/packages/google-cloud-iot/.prettierrc.js b/packages/google-cloud-iot/.prettierrc.js index 08cba3775be..d1b95106f4c 100644 --- a/packages/google-cloud-iot/.prettierrc.js +++ b/packages/google-cloud-iot/.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-iot/package.json b/packages/google-cloud-iot/package.json index 94ced33d1c4..acc8e2fdd27 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -29,7 +29,7 @@ "scripts": { "test": "c8 mocha build/test", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", - "lint": "gts fix && eslint --fix samples/*.js", + "lint": "gts fix", "docs": "jsdoc -c .jsdoc.js", "system-test": "mocha build/system-test", "fix": "gts fix", @@ -39,21 +39,17 @@ "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm install" }, "dependencies": { - "google-gax": "^2.0.1" + "google-gax": "^2.1.0" }, "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", "@types/sinon": "^9.0.0", "c8": "^7.0.0", - "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.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 136353bf2e3..eac8501c631 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -2083,6 +2083,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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 293846b5ebf..bcc295693a6 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,19 +1,12 @@ { - "updateTime": "2020-04-03T11:44:23.832443Z", + "updateTime": "2020-04-11T00:22:44.501266Z", "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3d5d228a58bdf875e6147b228db3159010c735ee", - "internalRef": "304500143" - } - }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5", + "log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" } } ], diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index a3a7705c6e0..197f46d7691 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -56,5 +56,5 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npm', 'run', 'lint']) subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 30ef59d7438..2723b330599 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -299,7 +299,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createDeviceRegistry(request); }, expectedError); assert( @@ -413,7 +413,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getDeviceRegistry(request); }, expectedError); assert( @@ -532,7 +532,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateDeviceRegistry(request); }, expectedError); assert( @@ -648,7 +648,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteDeviceRegistry(request); }, expectedError); assert( @@ -762,7 +762,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createDevice(request); }, expectedError); assert( @@ -873,7 +873,7 @@ describe('v1.DeviceManagerClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getDevice(request); }, expectedError); assert( @@ -990,7 +990,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateDevice(request); }, expectedError); assert( @@ -1104,7 +1104,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteDevice(request); }, expectedError); assert( @@ -1220,7 +1220,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.modifyCloudToDeviceConfig(request); }, expectedError); assert( @@ -1336,7 +1336,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listDeviceConfigVersions(request); }, expectedError); assert( @@ -1450,7 +1450,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listDeviceStates(request); }, expectedError); assert( @@ -1564,7 +1564,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.setIamPolicy(request); }, expectedError); assert( @@ -1678,7 +1678,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getIamPolicy(request); }, expectedError); assert( @@ -1794,7 +1794,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.testIamPermissions(request); }, expectedError); assert( @@ -1910,7 +1910,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.sendCommandToDevice(request); }, expectedError); assert( @@ -2026,7 +2026,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.bindDeviceToGateway(request); }, expectedError); assert( @@ -2142,7 +2142,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.unbindDeviceFromGateway(request); }, expectedError); assert( @@ -2262,7 +2262,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listDeviceRegistries(request); }, expectedError); assert( @@ -2355,7 +2355,7 @@ describe('v1.DeviceManagerClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -2428,7 +2428,7 @@ describe('v1.DeviceManagerClient', () => { expectedError ); const iterable = client.listDeviceRegistriesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -2556,7 +2556,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listDevices(request); }, expectedError); assert( @@ -2642,7 +2642,7 @@ describe('v1.DeviceManagerClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -2714,7 +2714,7 @@ describe('v1.DeviceManagerClient', () => { expectedError ); const iterable = client.listDevicesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.cloud.iot.v1.IDevice[] = []; for await (const resource of iterable) { responses.push(resource!); From 6e9f8e709a9775b8c7cd1da6c09f2a269c2c1999 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 11 Apr 2020 19:19:28 -0700 Subject: [PATCH 191/370] build: remove unused codecov config (#307) --- packages/google-cloud-iot/codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/google-cloud-iot/codecov.yaml diff --git a/packages/google-cloud-iot/codecov.yaml b/packages/google-cloud-iot/codecov.yaml deleted file mode 100644 index 5724ea9478d..00000000000 --- a/packages/google-cloud-iot/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com From 224497006aec52288d09743e05ee21fa31b5cf0d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2020 14:12:21 -0700 Subject: [PATCH 192/370] chore: release 2.0.0 (#298) --- packages/google-cloud-iot/CHANGELOG.md | 17 +++++++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 67f513724b9..12398c27484 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [2.0.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.8.0...v2.0.0) (2020-04-12) + + +### ⚠ BREAKING CHANGES + +* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. + +### Features + +* drop node8 support, support for async iterators ([#297](https://www.github.com/googleapis/nodejs-iot/issues/297)) ([1cf607e](https://www.github.com/googleapis/nodejs-iot/commit/1cf607edcecfe2053596096efaa1cabe0d11de1e)) + + +### Bug Fixes + +* export explicit version from protos.js ([#302](https://www.github.com/googleapis/nodejs-iot/issues/302)) ([8c8acba](https://www.github.com/googleapis/nodejs-iot/commit/8c8acba58f2670139863849cb86e3d8fe9fc7af7)) +* remove eslint, update gax, fix generated protos, run the generator ([#306](https://www.github.com/googleapis/nodejs-iot/issues/306)) ([8edd1b5](https://www.github.com/googleapis/nodejs-iot/commit/8edd1b51347efc7a78390702ba8bd0a714599695)) + ## [1.8.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.7.0...v1.8.0) (2020-03-06) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index acc8e2fdd27..2dc57f70e91 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "1.8.0", + "version": "2.0.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 21e0d19de7a..f61449f4b59 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 10000" }, "dependencies": { - "@google-cloud/iot": "^1.8.0" + "@google-cloud/iot": "^2.0.0" }, "devDependencies": { "chai": "^4.2.0", From ae3bd1bd23c3ef663e09fb6fe357d9526b7d5ce9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 17:12:29 -0700 Subject: [PATCH 193/370] fix: remove unused file, fix synth (#309) --- packages/google-cloud-iot/.eslintignore | 3 +- packages/google-cloud-iot/.prettierignore | 9 +- packages/google-cloud-iot/protos/protos.js | 2 +- .../google/cloud/iot/v1/doc_device_manager.js | 532 ------------- .../doc/google/cloud/iot/v1/doc_resources.js | 728 ------------------ .../v1/doc/google/iam/v1/doc_iam_policy.js | 96 --- .../src/v1/doc/google/iam/v1/doc_options.js | 37 - .../src/v1/doc/google/iam/v1/doc_policy.js | 167 ---- .../src/v1/doc/google/protobuf/doc_any.js | 137 ---- .../src/v1/doc/google/protobuf/doc_empty.js | 34 - .../v1/doc/google/protobuf/doc_field_mask.js | 228 ------ .../v1/doc/google/protobuf/doc_timestamp.js | 117 --- .../src/v1/doc/google/rpc/doc_status.js | 95 --- .../src/v1/doc/google/type/doc_expr.js | 51 -- packages/google-cloud-iot/synth.metadata | 19 +- packages/google-cloud-iot/synth.py | 8 +- 16 files changed, 27 insertions(+), 2236 deletions(-) delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js delete mode 100644 packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/packages/google-cloud-iot/.eslintignore +++ b/packages/google-cloud-iot/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-cloud-iot/.prettierignore b/packages/google-cloud-iot/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/packages/google-cloud-iot/.prettierignore +++ b/packages/google-cloud-iot/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index ad362f7a693..17807afb145 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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_iot_1_8_0_protos || ($protobuf.roots._google_cloud_iot_1_8_0_protos = {}); + var $root = $protobuf.roots._google_cloud_iot_2_0_0_protos || ($protobuf.roots._google_cloud_iot_2_0_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js deleted file mode 100644 index be2bc3deabb..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_device_manager.js +++ /dev/null @@ -1,532 +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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request for `CreateDeviceRegistry`. - * - * @property {string} parent - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * - * @property {Object} deviceRegistry - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * - * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} - * - * @typedef CreateDeviceRegistryRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.CreateDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const CreateDeviceRegistryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `GetDeviceRegistry`. - * - * @property {string} name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * @typedef GetDeviceRegistryRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.GetDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const GetDeviceRegistryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `DeleteDeviceRegistry`. - * - * @property {string} name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * @typedef DeleteDeviceRegistryRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.DeleteDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const DeleteDeviceRegistryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `UpdateDeviceRegistry`. - * - * @property {Object} deviceRegistry - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} - * - * @property {Object} updateMask - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateDeviceRegistryRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.UpdateDeviceRegistryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const UpdateDeviceRegistryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `ListDeviceRegistries`. - * - * @property {string} parent - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * - * @property {number} pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * @property {string} pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * - * @typedef ListDeviceRegistriesRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDeviceRegistriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDeviceRegistriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `ListDeviceRegistries`. - * - * @property {Object[]} deviceRegistries - * The registries that matched the query. - * - * This object should have the same structure as [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} - * - * @property {string} nextPageToken - * If not empty, indicates that there may be more registries that match the - * request; this value should be passed in a new - * `ListDeviceRegistriesRequest`. - * - * @typedef ListDeviceRegistriesResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDeviceRegistriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDeviceRegistriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `CreateDevice`. - * - * @property {string} parent - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * @property {Object} device - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * - * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} - * - * @typedef CreateDeviceRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.CreateDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const CreateDeviceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `GetDevice`. - * - * @property {string} name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * @property {Object} fieldMask - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef GetDeviceRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.GetDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const GetDeviceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `UpdateDevice`. - * - * @property {Object} device - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} - * - * @property {Object} updateMask - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateDeviceRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.UpdateDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const UpdateDeviceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `DeleteDevice`. - * - * @property {string} name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * @typedef DeleteDeviceRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.DeleteDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const DeleteDeviceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `ListDevices`. - * - * @property {string} parent - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * - * @property {number[]} deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * - * @property {string[]} deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * - * @property {Object} fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @property {Object} gatewayListOptions - * Options related to gateways. - * - * This object should have the same structure as [GatewayListOptions]{@link google.cloud.iot.v1.GatewayListOptions} - * - * @property {number} pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * @property {string} pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * - * @typedef ListDevicesRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDevicesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDevicesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Options for limiting the list based on gateway type and associations. - * - * @property {number} gatewayType - * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` - * is specified, only non-gateway devices are returned. If - * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. - * - * The number should be among the values of [GatewayType]{@link google.cloud.iot.v1.GatewayType} - * - * @property {string} associationsGatewayId - * If set, only devices associated with the specified gateway are returned. - * The gateway ID can be numeric (`num_id`) or the user-defined string - * (`id`). For example, if `123` is specified, only devices bound to the - * gateway with `num_id` 123 are returned. - * - * @property {string} associationsDeviceId - * If set, returns only the gateways with which the specified device is - * associated. The device ID can be numeric (`num_id`) or the user-defined - * string (`id`). For example, if `456` is specified, returns only the - * gateways to which the device with `num_id` 456 is bound. - * - * @typedef GatewayListOptions - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.GatewayListOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const GatewayListOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `ListDevices`. - * - * @property {Object[]} devices - * The devices that match the request. - * - * This object should have the same structure as [Device]{@link google.cloud.iot.v1.Device} - * - * @property {string} nextPageToken - * If not empty, indicates that there may be more devices that match the - * request; this value should be passed in a new `ListDevicesRequest`. - * - * @typedef ListDevicesResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDevicesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDevicesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `ModifyCloudToDeviceConfig`. - * - * @property {string} name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * @property {number} versionToUpdate - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * - * @property {Buffer} binaryData - * Required. The configuration data for the device. - * - * @typedef ModifyCloudToDeviceConfigRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ModifyCloudToDeviceConfigRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `ListDeviceConfigVersions`. - * - * @property {string} name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * @property {number} numVersions - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * - * @typedef ListDeviceConfigVersionsRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDeviceConfigVersionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDeviceConfigVersionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `ListDeviceConfigVersions`. - * - * @property {Object[]} deviceConfigs - * The device configuration for the last few versions. Versions are listed - * in decreasing order, starting from the most recent one. - * - * This object should have the same structure as [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig} - * - * @typedef ListDeviceConfigVersionsResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDeviceConfigVersionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDeviceConfigVersionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `ListDeviceStates`. - * - * @property {string} name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * @property {number} numStates - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * - * @typedef ListDeviceStatesRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDeviceStatesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDeviceStatesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `ListDeviceStates`. - * - * @property {Object[]} deviceStates - * The last few device states. States are listed in descending order of server - * update time, starting from the most recent one. - * - * This object should have the same structure as [DeviceState]{@link google.cloud.iot.v1.DeviceState} - * - * @typedef ListDeviceStatesResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.ListDeviceStatesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const ListDeviceStatesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `SendCommandToDevice`. - * - * @property {string} name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * @property {Buffer} binaryData - * Required. The command data to send to the device. - * - * @property {string} subfolder - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * - * @typedef SendCommandToDeviceRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.SendCommandToDeviceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const SendCommandToDeviceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `SendCommandToDevice`. - * @typedef SendCommandToDeviceResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.SendCommandToDeviceResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const SendCommandToDeviceResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `BindDeviceToGateway`. - * - * @property {string} parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * @property {string} gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * @property {string} deviceId - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * @typedef BindDeviceToGatewayRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.BindDeviceToGatewayRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const BindDeviceToGatewayRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `BindDeviceToGateway`. - * @typedef BindDeviceToGatewayResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.BindDeviceToGatewayResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const BindDeviceToGatewayResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request for `UnbindDeviceFromGateway`. - * - * @property {string} parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * @property {string} gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * @property {string} deviceId - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * @typedef UnbindDeviceFromGatewayRequest - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.UnbindDeviceFromGatewayRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const UnbindDeviceFromGatewayRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response for `UnbindDeviceFromGateway`. - * @typedef UnbindDeviceFromGatewayResponse - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.UnbindDeviceFromGatewayResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/device_manager.proto} - */ -const UnbindDeviceFromGatewayResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js b/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js deleted file mode 100644 index 21914216e4b..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/cloud/iot/v1/doc_resources.js +++ /dev/null @@ -1,728 +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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * The device resource. - * - * @property {string} id - * The user-defined device identifier. The device ID must be unique - * within a device registry. - * - * @property {string} name - * The resource path name. For example, - * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or - * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. - * When `name` is populated as a response from the service, it always ends - * in the device numeric ID. - * - * @property {number} numId - * [Output only] A server-defined unique numeric ID for the device. This is a - * more compact way to identify devices, and it is globally unique. - * - * @property {Object[]} credentials - * The credentials used to authenticate this device. To allow credential - * rotation without interruption, multiple device credentials can be bound to - * this device. No more than 3 credentials can be bound to a single device at - * a time. When new credentials are added to a device, they are verified - * against the registry credentials. For details, see the description of the - * `DeviceRegistry.credentials` field. - * - * This object should have the same structure as [DeviceCredential]{@link google.cloud.iot.v1.DeviceCredential} - * - * @property {Object} lastHeartbeatTime - * [Output only] The last time an MQTT `PINGREQ` was received. This field - * applies only to devices connecting through MQTT. MQTT clients usually only - * send `PINGREQ` messages if the connection is idle, and no other messages - * have been sent. Timestamps are periodically collected and written to - * storage; they may be stale by a few minutes. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastEventTime - * [Output only] The last time a telemetry event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastStateTime - * [Output only] The last time a state event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastConfigAckTime - * [Output only] The last time a cloud-to-device config version acknowledgment - * was received from the device. This field is only for configurations - * sent through MQTT. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastConfigSendTime - * [Output only] The last time a cloud-to-device config version was sent to - * the device. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {boolean} blocked - * If a device is blocked, connections or requests from this device will fail. - * Can be used to temporarily prevent the device from connecting if, for - * example, the sensor is generating bad data and needs maintenance. - * - * @property {Object} lastErrorTime - * [Output only] The time the most recent error occurred, such as a failure to - * publish to Cloud Pub/Sub. This field is the timestamp of - * 'last_error_status'. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastErrorStatus - * [Output only] The error message of the most recent error, such as a failure - * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this - * field. If no errors have occurred, this field has an empty message - * and the status code 0 == OK. Otherwise, this field is expected to have a - * status code other than OK. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {Object} config - * The most recent device configuration, which is eventually sent from - * Cloud IoT Core to the device. If not present on creation, the - * configuration will be initialized with an empty payload and version value - * of `1`. To update this field after creation, use the - * `DeviceManager.ModifyCloudToDeviceConfig` method. - * - * This object should have the same structure as [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig} - * - * @property {Object} state - * [Output only] The state most recently received from the device. If no state - * has been reported, this field is not present. - * - * This object should have the same structure as [DeviceState]{@link google.cloud.iot.v1.DeviceState} - * - * @property {number} logLevel - * **Beta Feature** - * - * The logging verbosity for device activity. If unspecified, - * DeviceRegistry.log_level will be used. - * - * The number should be among the values of [LogLevel]{@link google.cloud.iot.v1.LogLevel} - * - * @property {Object.} metadata - * The metadata key-value pairs assigned to the device. This metadata is not - * interpreted or indexed by Cloud IoT Core. It can be used to add contextual - * information for the device. - * - * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and - * be less than 128 bytes in length. - * - * Values are free-form strings. Each value must be less than or equal to 32 - * KB in size. - * - * The total size of all keys and values must be less than 256 KB, and the - * maximum number of key-value pairs is 500. - * - * @property {Object} gatewayConfig - * Gateway-related configuration and state. - * - * This object should have the same structure as [GatewayConfig]{@link google.cloud.iot.v1.GatewayConfig} - * - * @typedef Device - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.Device definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const Device = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Gateway-related configuration and state. - * - * @property {number} gatewayType - * Indicates whether the device is a gateway. - * - * The number should be among the values of [GatewayType]{@link google.cloud.iot.v1.GatewayType} - * - * @property {number} gatewayAuthMethod - * Indicates how to authorize and/or authenticate devices to access the - * gateway. - * - * The number should be among the values of [GatewayAuthMethod]{@link google.cloud.iot.v1.GatewayAuthMethod} - * - * @property {string} lastAccessedGatewayId - * [Output only] The ID of the gateway the device accessed most recently. - * - * @property {Object} lastAccessedGatewayTime - * [Output only] The most recent time at which the device accessed the gateway - * specified in `last_accessed_gateway`. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef GatewayConfig - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.GatewayConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const GatewayConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A container for a group of devices. - * - * @property {string} id - * The identifier of this device registry. For example, `myRegistry`. - * - * @property {string} name - * The resource path name. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * @property {Object[]} eventNotificationConfigs - * The configuration for notification of telemetry events received from the - * device. All telemetry events that were successfully published by the - * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. If multiple configurations match a message, - * only the first matching configuration is used. If you try to publish a - * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic - * for the device's registry, the connection closes automatically. If you try - * to do so using an HTTP connection, an error is returned. Up to 10 - * configurations may be provided. - * - * This object should have the same structure as [EventNotificationConfig]{@link google.cloud.iot.v1.EventNotificationConfig} - * - * @property {Object} stateNotificationConfig - * The configuration for notification of new states received from the device. - * State updates are guaranteed to be stored in the state history, but - * notifications to Cloud Pub/Sub are not guaranteed. For example, if - * permissions are misconfigured or the specified topic doesn't exist, no - * notification will be published but the state will still be stored in Cloud - * IoT Core. - * - * This object should have the same structure as [StateNotificationConfig]{@link google.cloud.iot.v1.StateNotificationConfig} - * - * @property {Object} mqttConfig - * The MQTT configuration for this device registry. - * - * This object should have the same structure as [MqttConfig]{@link google.cloud.iot.v1.MqttConfig} - * - * @property {Object} httpConfig - * The DeviceService (HTTP) configuration for this device registry. - * - * This object should have the same structure as [HttpConfig]{@link google.cloud.iot.v1.HttpConfig} - * - * @property {number} logLevel - * **Beta Feature** - * - * The default logging verbosity for activity from devices in this registry. - * The verbosity level can be overridden by Device.log_level. - * - * The number should be among the values of [LogLevel]{@link google.cloud.iot.v1.LogLevel} - * - * @property {Object[]} credentials - * The credentials used to verify the device credentials. No more than 10 - * credentials can be bound to a single registry at a time. The verification - * process occurs at the time of device creation or update. If this field is - * empty, no verification is performed. Otherwise, the credentials of a newly - * created device or added credentials of an updated device should be signed - * with one of these registry credentials. - * - * Note, however, that existing devices will never be affected by - * modifications to this list of credentials: after a device has been - * successfully created in a registry, it should be able to connect even if - * its registry credentials are revoked, deleted, or modified. - * - * This object should have the same structure as [RegistryCredential]{@link google.cloud.iot.v1.RegistryCredential} - * - * @typedef DeviceRegistry - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.DeviceRegistry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const DeviceRegistry = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The configuration of MQTT for a device registry. - * - * @property {number} mqttEnabledState - * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT - * connections to this registry will fail. - * - * The number should be among the values of [MqttState]{@link google.cloud.iot.v1.MqttState} - * - * @typedef MqttConfig - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.MqttConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const MqttConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The configuration of the HTTP bridge for a device registry. - * - * @property {number} httpEnabledState - * If enabled, allows devices to use DeviceService via the HTTP protocol. - * Otherwise, any requests to DeviceService will fail for this registry. - * - * The number should be among the values of [HttpState]{@link google.cloud.iot.v1.HttpState} - * - * @typedef HttpConfig - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.HttpConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const HttpConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The configuration for forwarding telemetry events. - * - * @property {string} subfolderMatches - * If the subfolder name matches this string exactly, this configuration will - * be used. The string must not include the leading '/' character. If empty, - * all strings are matched. This field is used only for telemetry events; - * subfolders are not supported for state changes. - * - * @property {string} pubsubTopicName - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * @typedef EventNotificationConfig - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.EventNotificationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const EventNotificationConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The configuration for notification of new states received from the device. - * - * @property {string} pubsubTopicName - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * @typedef StateNotificationConfig - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.StateNotificationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const StateNotificationConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A server-stored registry credential used to validate device credentials. - * - * @property {Object} publicKeyCertificate - * A public key certificate used to verify the device credentials. - * - * This object should have the same structure as [PublicKeyCertificate]{@link google.cloud.iot.v1.PublicKeyCertificate} - * - * @typedef RegistryCredential - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.RegistryCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const RegistryCredential = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Details of an X.509 certificate. For informational purposes only. - * - * @property {string} issuer - * The entity that signed the certificate. - * - * @property {string} subject - * The entity the certificate and public key belong to. - * - * @property {Object} startTime - * The time the certificate becomes valid. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} expiryTime - * The time the certificate becomes invalid. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {string} signatureAlgorithm - * The algorithm used to sign the certificate. - * - * @property {string} publicKeyType - * The type of public key in the certificate. - * - * @typedef X509CertificateDetails - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.X509CertificateDetails definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const X509CertificateDetails = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A public key certificate format and data. - * - * @property {number} format - * The certificate format. - * - * The number should be among the values of [PublicKeyCertificateFormat]{@link google.cloud.iot.v1.PublicKeyCertificateFormat} - * - * @property {string} certificate - * The certificate data. - * - * @property {Object} x509Details - * [Output only] The certificate details. Used only for X.509 certificates. - * - * This object should have the same structure as [X509CertificateDetails]{@link google.cloud.iot.v1.X509CertificateDetails} - * - * @typedef PublicKeyCertificate - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.PublicKeyCertificate definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const PublicKeyCertificate = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A server-stored device credential used for authentication. - * - * @property {Object} publicKey - * A public key used to verify the signature of JSON Web Tokens (JWTs). - * When adding a new device credential, either via device creation or via - * modifications, this public key credential may be required to be signed by - * one of the registry level certificates. More specifically, if the - * registry contains at least one certificate, any new device credential - * must be signed by one of the registry certificates. As a result, - * when the registry contains certificates, only X.509 certificates are - * accepted as device credentials. However, if the registry does - * not contain a certificate, self-signed certificates and public keys will - * be accepted. New device credentials must be different from every - * registry-level certificate. - * - * This object should have the same structure as [PublicKeyCredential]{@link google.cloud.iot.v1.PublicKeyCredential} - * - * @property {Object} expirationTime - * [Optional] The time at which this credential becomes invalid. This - * credential will be ignored for new client authentication requests after - * this timestamp; however, it will not be automatically deleted. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef DeviceCredential - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.DeviceCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const DeviceCredential = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A public key format and data. - * - * @property {number} format - * The format of the key. - * - * The number should be among the values of [PublicKeyFormat]{@link google.cloud.iot.v1.PublicKeyFormat} - * - * @property {string} key - * The key data. - * - * @typedef PublicKeyCredential - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.PublicKeyCredential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const PublicKeyCredential = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The device configuration. Eventually delivered to devices. - * - * @property {number} version - * [Output only] The version of this update. The version number is assigned by - * the server, and is always greater than 0 after device creation. The - * version must be 0 on the `CreateDevice` request if a `config` is - * specified; the response of `CreateDevice` will always have a value of 1. - * - * @property {Object} cloudUpdateTime - * [Output only] The time at which this configuration version was updated in - * Cloud IoT Core. This timestamp is set by the server. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} deviceAckTime - * [Output only] The time at which Cloud IoT Core received the - * acknowledgment from the device, indicating that the device has received - * this configuration version. If this field is not present, the device has - * not yet acknowledged that it received this version. Note that when - * the config was sent to the device, many config versions may have been - * available in Cloud IoT Core while the device was disconnected, and on - * connection, only the latest version is sent to the device. Some - * versions may never be sent to the device, and therefore are never - * acknowledged. This timestamp is set by Cloud IoT Core. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Buffer} binaryData - * The device configuration data. - * - * @typedef DeviceConfig - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.DeviceConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const DeviceConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The device state, as reported by the device. - * - * @property {Object} updateTime - * [Output only] The time at which this state version was updated in Cloud - * IoT Core. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Buffer} binaryData - * The device state data. - * - * @typedef DeviceState - * @memberof google.cloud.iot.v1 - * @see [google.cloud.iot.v1.DeviceState definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/iot/v1/resources.proto} - */ -const DeviceState = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The gateway authorization/authentication method. This setting determines how - * Cloud IoT Core authorizes/authenticate devices to access the gateway. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const GatewayAuthMethod = { - - /** - * No authentication/authorization method specified. No devices are allowed to - * access the gateway. - */ - GATEWAY_AUTH_METHOD_UNSPECIFIED: 0, - - /** - * The device is authenticated through the gateway association only. Device - * credentials are ignored even if provided. - */ - ASSOCIATION_ONLY: 1, - - /** - * The device is authenticated through its own credentials. Gateway - * association is not checked. - */ - DEVICE_AUTH_TOKEN_ONLY: 2, - - /** - * The device is authenticated through both device credentials and gateway - * association. The device must be bound to the gateway and must provide its - * own credentials. - */ - ASSOCIATION_AND_DEVICE_AUTH_TOKEN: 3 -}; - -/** - * Gateway type. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const GatewayType = { - - /** - * If unspecified, the device is considered a non-gateway device. - */ - GATEWAY_TYPE_UNSPECIFIED: 0, - - /** - * The device is a gateway. - */ - GATEWAY: 1, - - /** - * The device is not a gateway. - */ - NON_GATEWAY: 2 -}; - -/** - * Indicates whether DeviceService (HTTP) is enabled or disabled for the - * registry. See the field description for details. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const HttpState = { - - /** - * No HTTP state specified. If not specified, DeviceService will be - * enabled by default. - */ - HTTP_STATE_UNSPECIFIED: 0, - - /** - * Enables DeviceService (HTTP) service for the registry. - */ - HTTP_ENABLED: 1, - - /** - * Disables DeviceService (HTTP) service for the registry. - */ - HTTP_DISABLED: 2 -}; - -/** - * **Beta Feature** - * - * The logging verbosity for device activity. Specifies which events should be - * written to logs. For example, if the LogLevel is ERROR, only events that - * terminate in errors will be logged. LogLevel is inclusive; enabling INFO - * logging will also enable ERROR logging. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const LogLevel = { - - /** - * No logging specified. If not specified, logging will be disabled. - */ - LOG_LEVEL_UNSPECIFIED: 0, - - /** - * Disables logging. - */ - NONE: 10, - - /** - * Error events will be logged. - */ - ERROR: 20, - - /** - * Informational events will be logged, such as connections and - * disconnections. - */ - INFO: 30, - - /** - * All events will be logged. - */ - DEBUG: 40 -}; - -/** - * Indicates whether an MQTT connection is enabled or disabled. See the field - * description for details. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const MqttState = { - - /** - * No MQTT state specified. If not specified, MQTT will be enabled by default. - */ - MQTT_STATE_UNSPECIFIED: 0, - - /** - * Enables a MQTT connection. - */ - MQTT_ENABLED: 1, - - /** - * Disables a MQTT connection. - */ - MQTT_DISABLED: 2 -}; - -/** - * The supported formats for the public key. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const PublicKeyCertificateFormat = { - - /** - * The format has not been specified. This is an invalid default value and - * must not be used. - */ - UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT: 0, - - /** - * An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), - * encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and - * `-----END CERTIFICATE-----`. - */ - X509_CERTIFICATE_PEM: 1 -}; - -/** - * The supported formats for the public key. - * - * @enum {number} - * @memberof google.cloud.iot.v1 - */ -const PublicKeyFormat = { - - /** - * The format has not been specified. This is an invalid default value and - * must not be used. - */ - UNSPECIFIED_PUBLIC_KEY_FORMAT: 0, - - /** - * An RSA public key encoded in base64, and wrapped by - * `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be - * used to verify `RS256` signatures in JWT tokens ([RFC7518]( - * https://www.ietf.org/rfc/rfc7518.txt)). - */ - RSA_PEM: 3, - - /** - * As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( - * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by - * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. - */ - RSA_X509_PEM: 1, - - /** - * Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in - * base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END - * PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` - * algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is - * defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. - */ - ES256_PEM: 2, - - /** - * As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( - * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by - * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. - */ - ES256_X509_PEM: 4 -}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js deleted file mode 100644 index 15b6fb823d4..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_iam_policy.js +++ /dev/null @@ -1,96 +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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for `SetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * - * @typedef SetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const SetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `GetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * - * @typedef GetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const GetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `TestIamPermissions` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {string[]} permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * - * @typedef TestIamPermissionsRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for `TestIamPermissions` method. - * - * @property {string[]} permissions - * A subset of `TestPermissionsRequest.permissions` that the caller is - * allowed. - * - * @typedef TestIamPermissionsResponse - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js deleted file mode 100644 index b725d806cce..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_options.js +++ /dev/null @@ -1,37 +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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Encapsulates settings provided to GetIamPolicy. - * - * @property {number} requestedPolicyVersion - * Optional. The policy format version to be returned. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Requests for policies with any conditional bindings must specify version 3. - * Policies without any conditional bindings may specify any valid value or - * leave the field unset. - * - * @typedef GetPolicyOptions - * @memberof google.iam.v1 - * @see [google.iam.v1.GetPolicyOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/options.proto} - */ -const GetPolicyOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js deleted file mode 100644 index 606cdf98cad..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js +++ /dev/null @@ -1,167 +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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Defines an Identity and Access Management (IAM) policy. It is used to - * specify access control policies for Cloud Platform resources. - * - * - * A `Policy` is a collection of `bindings`. A `binding` binds one or more - * `members` to a single `role`. Members can be user accounts, service accounts, - * Google groups, and domains (such as G Suite). A `role` is a named list of - * permissions (defined by IAM or configured by users). A `binding` can - * optionally specify a `condition`, which is a logic expression that further - * constrains the role binding based on attributes about the request and/or - * target resource. - * - * **JSON Example** - * - * { - * "bindings": [ - * { - * "role": "roles/resourcemanager.organizationAdmin", - * "members": [ - * "user:mike@example.com", - * "group:admins@example.com", - * "domain:google.com", - * "serviceAccount:my-project-id@appspot.gserviceaccount.com" - * ] - * }, - * { - * "role": "roles/resourcemanager.organizationViewer", - * "members": ["user:eve@example.com"], - * "condition": { - * "title": "expirable access", - * "description": "Does not grant access after Sep 2020", - * "expression": "request.time < - * timestamp('2020-10-01T00:00:00.000Z')", - * } - * } - * ] - * } - * - * **YAML Example** - * - * bindings: - * - members: - * - user:mike@example.com - * - group:admins@example.com - * - domain:google.com - * - serviceAccount:my-project-id@appspot.gserviceaccount.com - * role: roles/resourcemanager.organizationAdmin - * - members: - * - user:eve@example.com - * role: roles/resourcemanager.organizationViewer - * condition: - * title: expirable access - * description: Does not grant access after Sep 2020 - * expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - * - * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam/docs). - * - * @property {number} version - * Specifies the format of the policy. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Operations affecting conditional bindings must specify version 3. This can - * be either setting a conditional policy, modifying a conditional binding, - * or removing a binding (conditional or unconditional) from the stored - * conditional policy. - * Operations on non-conditional policies may specify any valid value or - * leave the field unset. - * - * If no etag is provided in the call to `setIamPolicy`, version compliance - * checks against the stored policy is skipped. - * - * @property {Object[]} bindings - * Associates a list of `members` to a `role`. Optionally may specify a - * `condition` that determines when binding is in effect. - * `bindings` with no members will result in an error. - * - * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} - * - * @property {Buffer} etag - * `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a policy from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform policy updates in order to avoid race - * conditions: An `etag` is returned in the response to `getIamPolicy`, and - * systems are expected to put that etag in the request to `setIamPolicy` to - * ensure that their change will be applied to the same version of the policy. - * - * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten. Due to blind-set semantics of an etag-less policy, - * 'setIamPolicy' will not fail even if the incoming policy version does not - * meet the requirements for modifying the stored policy. - * - * @typedef Policy - * @memberof google.iam.v1 - * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Policy = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Associates `members` with a `role`. - * - * @property {string} role - * Role that is assigned to `members`. - * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * - * @property {string[]} members - * Specifies the identities requesting access for a Cloud Platform resource. - * `members` can have the following values: - * - * * `allUsers`: A special identifier that represents anyone who is - * on the internet; with or without a Google account. - * - * * `allAuthenticatedUsers`: A special identifier that represents anyone - * who is authenticated with a Google account or a service account. - * - * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@example.com` . - * - * - * * `serviceAccount:{emailid}`: An email address that represents a service - * account. For example, `my-other-app@appspot.gserviceaccount.com`. - * - * * `group:{emailid}`: An email address that represents a Google group. - * For example, `admins@example.com`. - * - * - * * `domain:{domain}`: The G Suite domain (primary) that represents all the - * users of that domain. For example, `google.com` or `example.com`. - * - * @property {Object} condition - * The condition that is associated with this binding. - * NOTE: An unsatisfied condition will not allow user access via current - * binding. Different bindings, including their conditions, are examined - * independently. - * - * This object should have the same structure as [Expr]{@link google.type.Expr} - * - * @typedef Binding - * @memberof google.iam.v1 - * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Binding = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +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. - -// 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-iot/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +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. - -// 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-iot/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +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. - -// 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-iot/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index c457acc0c7d..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +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. - -// 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-iot/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,95 +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. - -// 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} - */ -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-iot/src/v1/doc/google/type/doc_expr.js b/packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js deleted file mode 100644 index 421a7ee9e6a..00000000000 --- a/packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js +++ /dev/null @@ -1,51 +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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Represents an expression text. Example: - * - * title: "User account presence" - * description: "Determines whether the request has a user account" - * expression: "size(request.user) > 0" - * - * @property {string} expression - * Textual representation of an expression in - * Common Expression Language syntax. - * - * The application context of the containing message determines which - * well-known feature set of CEL is supported. - * - * @property {string} title - * An optional title for the expression, i.e. a short string describing - * its purpose. This can be used e.g. in UIs which allow to enter the - * expression. - * - * @property {string} description - * An optional description of the expression. This is a longer text which - * describes the expression, e.g. when hovered over it in a UI. - * - * @property {string} location - * An optional string indicating the location of the expression for error - * reporting, e.g. a file name and a position in the file. - * - * @typedef Expr - * @memberof google.type - * @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto} - */ -const Expr = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index bcc295693a6..d7a0c58d51a 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -1,12 +1,25 @@ { - "updateTime": "2020-04-11T00:22:44.501266Z", "sources": [ + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/nodejs-iot.git", + "sha": "00f9e698ce04c7d67f4cf6b2a38ea6187a2300cb" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "dea1f52034d188ca371c3a70c716ca2a6b3f2aa1", + "internalRef": "306298030" + } + }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5", - "log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" + "sha": "682c0c37d1054966ca662a44259e96cc7aea4413" } } ], diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 197f46d7691..0d791b6dace 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -29,7 +29,7 @@ for version in versions: library = gapic.typescript_library( - 'iot', + 'iot', generator_args={ "grpc-service-config": f"google/cloud/iot/{version}/cloudiot_grpc_service_config.json", "package-name": f"@google-cloud/iot", @@ -50,11 +50,7 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) -s.replace("src/v1/doc/google/cloud/iot/v1/doc_resources.js", - "\[RFC(.*)\]\(https:\/\/cloud\.google\.com", - r"[RFC\1](") - # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) subprocess.run(['npx', 'compileProtos', 'src']) From 0bd2ecf07e976cf929be8065aab45d4e64253024 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 19:29:05 -0700 Subject: [PATCH 194/370] chore: remove tslint.json (#311) --- packages/google-cloud-iot/tslint.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packages/google-cloud-iot/tslint.json diff --git a/packages/google-cloud-iot/tslint.json b/packages/google-cloud-iot/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/packages/google-cloud-iot/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -} From d919a7d4c2e0a30c9dd2b21ace02336e514da22a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Apr 2020 09:55:44 -0700 Subject: [PATCH 195/370] chore: remove unused dev packages (#312) --- packages/google-cloud-iot/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2dc57f70e91..9d09b2d7d70 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -57,7 +57,6 @@ "mocha": "^7.0.0", "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 b181c9babb7908a1db02969535150e576de5fd2c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 17:32:45 +0200 Subject: [PATCH 196/370] chore(deps): update dependency ts-loader to v7 (#313) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 9d09b2d7d70..1acccc487d8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -58,7 +58,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.2", "webpack-cli": "^3.3.10" From 3a4cdea9af09a487b863a3437db98fe4f1654a6e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 18:32:15 +0200 Subject: [PATCH 197/370] chore(deps): update dependency null-loader to v4 (#314) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1acccc487d8..7b827327e70 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -55,7 +55,7 @@ "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", "mocha": "^7.0.0", - "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 f3517bb26a41036ec0ffd3a2033381892968a5a4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Apr 2020 16:26:37 -0700 Subject: [PATCH 198/370] chore: linting --- .../src/v1/device_manager_client.ts | 2802 ++++------ packages/google-cloud-iot/synth.metadata | 4 +- .../system-test/fixtures/sample/src/index.js | 1 + .../google-cloud-iot/system-test/install.ts | 28 +- .../test/gapic_device_manager_v1.ts | 4870 +++++++---------- packages/google-cloud-iot/webpack.config.js | 12 +- 6 files changed, 3303 insertions(+), 4414 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 7aca39540bc..31fcc659ad3 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -17,18 +17,11 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import { - Callback, - CallOptions, - Descriptors, - ClientOptions, - PaginationCallback, - GaxCall, -} 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 { Transform } from 'stream'; +import { RequestType } from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import * as gapicConfig from './device_manager_client_config.json'; @@ -47,12 +40,7 @@ export class DeviceManagerClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; + descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}}; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; deviceManagerStub?: Promise<{[name: string]: Function}>; @@ -86,12 +74,10 @@ export class DeviceManagerClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof DeviceManagerClient; - const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; + 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) { @@ -101,8 +87,8 @@ export class DeviceManagerClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { + const isBrowser = (typeof window !== 'undefined'); + if (isBrowser){ opts.fallback = true; } // If we are in browser, we are already using fallback because of the @@ -119,10 +105,13 @@ export class DeviceManagerClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); // Determine the client header string. - const clientHeader = [`gax/${this._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 { @@ -138,18 +127,12 @@ export class DeviceManagerClient { // 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 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 + opts.fallback ? + // eslint-disable-next-line @typescript-eslint/no-var-requires + require("../../protos/protos.json") : + nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated @@ -171,25 +154,16 @@ export class DeviceManagerClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this.descriptors.page = { - listDeviceRegistries: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'deviceRegistries' - ), - listDevices: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'devices' - ), + listDeviceRegistries: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deviceRegistries'), + listDevices: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'devices') }; // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.iot.v1.DeviceManager', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.cloud.iot.v1.DeviceManager', 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 @@ -217,38 +191,16 @@ export class DeviceManagerClient { // Put together the "service stub" for // google.cloud.iot.v1.DeviceManager. this.deviceManagerStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.iot.v1.DeviceManager' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.iot.v1.DeviceManager') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.iot.v1.DeviceManager, - this._opts - ) as Promise<{[method: string]: Function}>; + 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 deviceManagerStubMethods = [ - 'createDeviceRegistry', - 'getDeviceRegistry', - 'updateDeviceRegistry', - 'deleteDeviceRegistry', - 'listDeviceRegistries', - 'createDevice', - 'getDevice', - 'updateDevice', - 'deleteDevice', - 'listDevices', - 'modifyCloudToDeviceConfig', - 'listDeviceConfigVersions', - 'listDeviceStates', - 'setIamPolicy', - 'getIamPolicy', - 'testIamPermissions', - 'sendCommandToDevice', - 'bindDeviceToGateway', - 'unbindDeviceFromGateway', - ]; + const deviceManagerStubMethods = + ['createDeviceRegistry', 'getDeviceRegistry', 'updateDeviceRegistry', 'deleteDeviceRegistry', 'listDeviceRegistries', 'createDevice', 'getDevice', 'updateDevice', 'deleteDevice', 'listDevices', 'modifyCloudToDeviceConfig', 'listDeviceConfigVersions', 'listDeviceStates', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'sendCommandToDevice', 'bindDeviceToGateway', 'unbindDeviceFromGateway']; for (const methodName of deviceManagerStubMethods) { const callPromise = this.deviceManagerStub.then( stub => (...args: Array<{}>) => { @@ -258,17 +210,16 @@ export class DeviceManagerClient { const func = stub[methodName]; return func.apply(stub, args); }, - (err: Error | null | undefined) => () => { + (err: Error|null|undefined) => () => { throw err; - } - ); + }); const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); this.innerApiCalls[methodName] = apiCall; @@ -306,7 +257,7 @@ export class DeviceManagerClient { static get scopes() { return [ 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudiot', + 'https://www.googleapis.com/auth/cloudiot' ]; } @@ -317,9 +268,8 @@ export class DeviceManagerClient { * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId( - callback?: Callback - ): Promise | void { + getProjectId(callback?: Callback): + Promise|void { if (callback) { this.auth.getProjectId(callback); return; @@ -331,85 +281,64 @@ export class DeviceManagerClient { // -- Service calls -- // ------------------- createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|undefined, {}|undefined + ]>; createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Creates a device registry that contains devices. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; +/** + * Creates a device registry that contains devices. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -418,81 +347,66 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); this.initialize(); return this.innerApiCalls.createDeviceRegistry(request, options, callback); } getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|undefined, {}|undefined + ]>; getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Gets a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; +/** + * Gets a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.IGetDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -501,94 +415,73 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); return this.innerApiCalls.getDeviceRegistry(request, options, callback); } updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|undefined, {}|undefined + ]>; updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Updates a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; +/** + * Updates a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -603,81 +496,60 @@ export class DeviceManagerClient { return this.innerApiCalls.updateDeviceRegistry(request, options, callback); } deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|undefined, {}|undefined + ]>; deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Deletes a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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. - */ + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, + {}|null|undefined>): void; +/** + * Deletes a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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. + */ deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.protobuf.IEmpty, - | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -686,84 +558,71 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); return this.innerApiCalls.deleteDeviceRegistry(request, options, callback); } createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest|undefined, {}|undefined + ]>; createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, + {}|null|undefined>): void; createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Creates a device in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {google.cloud.iot.v1.Device} request.device - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, + {}|null|undefined>): void; +/** + * Creates a device in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -772,83 +631,70 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); this.initialize(); return this.innerApiCalls.createDevice(request, options, callback); } getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest|undefined, {}|undefined + ]>; getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, + {}|null|undefined>): void; getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Gets details about a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are 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 an object representing [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, + {}|null|undefined>): void; +/** + * Gets details about a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are 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 an object representing [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -857,86 +703,73 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); return this.innerApiCalls.getDevice(request, options, callback); } updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest|undefined, {}|undefined + ]>; updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, + {}|null|undefined>): void; updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Updates a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.iot.v1.Device} request.device - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, + {}|null|undefined>): void; +/** + * Updates a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -951,74 +784,61 @@ export class DeviceManagerClient { return this.innerApiCalls.updateDevice(request, options, callback); } deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest|undefined, {}|undefined + ]>; deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, + {}|null|undefined>): void; deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Deletes a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @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. - */ + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, + {}|null|undefined>): void; +/** + * Deletes a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @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. + */ deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1027,98 +847,77 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); return this.innerApiCalls.deleteDevice(request, options, callback); } modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|undefined, {}|undefined + ]>; modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceConfig, - | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, + {}|null|undefined>): void; modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceConfig, - | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Modifies the configuration for the device, which is eventually sent from - * the Cloud IoT Core servers. Returns the modified configuration version and - * its metadata. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.versionToUpdate - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * @param {Buffer} request.binaryData - * Required. The configuration data for the device. - * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, + {}|null|undefined>): void; +/** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.versionToUpdate + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @param {Buffer} request.binaryData + * Required. The configuration data for the device. + * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.iot.v1.IDeviceConfig, - | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IDeviceConfig, - | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1127,97 +926,72 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); - return this.innerApiCalls.modifyCloudToDeviceConfig( - request, - options, - callback - ); + return this.innerApiCalls.modifyCloudToDeviceConfig(request, options, callback); } listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|undefined, {}|undefined + ]>; listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, + {}|null|undefined>): void; listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Lists the last few versions of the device configuration in descending - * order (i.e.: newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.numVersions - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, + {}|null|undefined>): void; +/** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numVersions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1226,91 +1000,72 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); - return this.innerApiCalls.listDeviceConfigVersions( - request, - options, - callback - ); + return this.innerApiCalls.listDeviceConfigVersions(request, options, callback); } listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest|undefined, {}|undefined + ]>; listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, + {}|null|undefined>): void; listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Lists the last few versions of the device state in descending order (i.e.: - * newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.numStates - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, + {}|null|undefined>): void; +/** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numStates + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.IListDeviceStatesResponse, - | protos.google.cloud.iot.v1.IListDeviceStatesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1319,77 +1074,66 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); return this.innerApiCalls.listDeviceStates(request, options, callback); } setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; + request: protos.google.iam.v1.ISetIamPolicyRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>; setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Sets the access control policy on the specified resource. Replaces any - * existing policy. - * - * @param {Object} request - * The request object that will be sent. - * @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 [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; +/** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {} request. + * @param {} request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - > | void { + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1398,78 +1142,67 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - resource: request.resource || '', + 'resource': request.resource || '', }); this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); } getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined - ] - >; + request: protos.google.iam.v1.IGetIamPolicyRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>; getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Gets the access control policy for a resource. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * @param {Object} request - * The request object that will be sent. - * @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 [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; +/** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * @param {Object} request + * The request object that will be sent. + * @param {} request. + * @param {} request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined - ] - > | void { + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1478,78 +1211,67 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - resource: request.resource || '', + 'resource': request.resource || '', }); this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); } testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>; testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Returns permissions that a caller has on the specified resource. - * If the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * @param {Object} request - * The request object that will be sent. - * @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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; +/** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * @param {Object} request + * The request object that will be sent. + * @param {} request. + * @param {} request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - > | void { + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1558,102 +1280,87 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - resource: request.resource || '', + 'resource': request.resource || '', }); this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); } sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|undefined, {}|undefined + ]>; sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, + {}|null|undefined>): void; sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Sends a command to the specified device. In order for a device to be able - * to receive commands, it must: - * 1) be connected to Cloud IoT Core using the MQTT protocol, and - * 2) be subscribed to the group of MQTT topics specified by - * /devices/{device-id}/commands/#. This subscription will receive commands - * at the top-level topic /devices/{device-id}/commands as well as commands - * for subfolders, like /devices/{device-id}/commands/subfolder. - * Note that subscribing to specific subfolders is not supported. - * If the command could not be delivered to the device, this method will - * return an error; in particular, if the device is not subscribed, this - * method will return FAILED_PRECONDITION. Otherwise, this method will - * return OK. If the subscription is QoS 1, at least once delivery will be - * guaranteed; for QoS 0, no acknowledgment will be expected from the device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {Buffer} request.binaryData - * Required. The command data to send to the device. - * @param {string} request.subfolder - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * @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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, + {}|null|undefined>): void; +/** + * Sends a command to the specified device. In order for a device to be able + * to receive commands, it must: + * 1) be connected to Cloud IoT Core using the MQTT protocol, and + * 2) be subscribed to the group of MQTT topics specified by + * /devices/{device-id}/commands/#. This subscription will receive commands + * at the top-level topic /devices/{device-id}/commands as well as commands + * for subfolders, like /devices/{device-id}/commands/subfolder. + * Note that subscribing to specific subfolders is not supported. + * If the command could not be delivered to the device, this method will + * return an error; in particular, if the device is not subscribed, this + * method will return FAILED_PRECONDITION. Otherwise, this method will + * return OK. If the subscription is QoS 1, at least once delivery will be + * guaranteed; for QoS 0, no acknowledgment will be expected from the device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {Buffer} request.binaryData + * Required. The command data to send to the device. + * @param {string} request.subfolder + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * @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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - | protos.google.cloud.iot.v1.ISendCommandToDeviceRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1662,88 +1369,73 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - name: request.name || '', + 'name': request.name || '', }); this.initialize(); return this.innerApiCalls.sendCommandToDevice(request, options, callback); } bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|undefined, {}|undefined + ]>; bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, + {}|null|undefined>): void; bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - callback: Callback< - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Associates the device with the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + callback: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, + {}|null|undefined>): void; +/** + * Associates the device with the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - | protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1752,94 +1444,73 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); this.initialize(); return this.innerApiCalls.bindDeviceToGateway(request, options, callback); } unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|undefined, {}|undefined + ]>; unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, + {}|null|undefined>): void; unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - callback: Callback< - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Deletes the association between the device and the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + callback: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, + {}|null|undefined>): void; +/** + * Deletes the association between the device and the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1848,113 +1519,90 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); this.initialize(); - return this.innerApiCalls.unbindDeviceFromGateway( - request, - options, - callback - ); + return this.innerApiCalls.unbindDeviceFromGateway(request, options, callback); } listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry[], - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - ] - >; + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry[], + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest|null, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + ]>; listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options: gax.CallOptions, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - | null - | undefined, - protos.google.cloud.iot.v1.IDeviceRegistry - > - ): void; + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, + protos.google.cloud.iot.v1.IDeviceRegistry>): void; listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - | null - | undefined, - protos.google.cloud.iot.v1.IDeviceRegistry - > - ): void; - /** - * Lists device registries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesRequest]{@link google.cloud.iot.v1.ListDeviceRegistriesRequest} - * 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 - * [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, + protos.google.cloud.iot.v1.IDeviceRegistry>): void; +/** + * Lists device registries. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesRequest]{@link google.cloud.iot.v1.ListDeviceRegistriesRequest} + * 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 + * [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - optionsOrCallback?: - | gax.CallOptions - | PaginationCallback< + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + optionsOrCallback?: gax.CallOptions|PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, + protos.google.cloud.iot.v1.IDeviceRegistry>, + callback?: PaginationCallback< protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - | null - | undefined, - protos.google.cloud.iot.v1.IDeviceRegistry - >, - callback?: PaginationCallback< - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - | null - | undefined, - protos.google.cloud.iot.v1.IDeviceRegistry - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDeviceRegistry[], - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - ] - > | void { + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, + protos.google.cloud.iot.v1.IDeviceRegistry>): + Promise<[ + protos.google.cloud.iot.v1.IDeviceRegistry[], + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest|null, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1963,48 +1611,48 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); this.initialize(); return this.innerApiCalls.listDeviceRegistries(request, options, callback); } - /** - * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. - */ +/** + * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. + */ listDeviceRegistriesStream( - request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions - ): Transform { + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions): + Transform{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2012,7 +1660,7 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); @@ -2023,34 +1671,34 @@ export class DeviceManagerClient { ); } - /** - * Equivalent to {@link listDeviceRegistries}, 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 and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @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. - */ +/** + * Equivalent to {@link listDeviceRegistries}, 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @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. + */ listDeviceRegistriesAsync( - request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions - ): AsyncIterable { + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions): + AsyncIterable{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2058,118 +1706,107 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listDeviceRegistries.asyncIterate( this.innerApiCalls['listDeviceRegistries'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice[], - protos.google.cloud.iot.v1.IListDevicesRequest | null, - protos.google.cloud.iot.v1.IListDevicesResponse - ] - >; + request: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest|null, + protos.google.cloud.iot.v1.IListDevicesResponse + ]>; listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - options: gax.CallOptions, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, - protos.google.cloud.iot.v1.IDevice - > - ): void; + request: protos.google.cloud.iot.v1.IListDevicesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, + protos.google.cloud.iot.v1.IDevice>): void; listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, - protos.google.cloud.iot.v1.IDevice - > - ): void; - /** - * List devices in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} request.deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} request.deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions - * Options related to gateways. - * @param {number} request.pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. - * 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 [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesRequest]{@link google.cloud.iot.v1.ListDevicesRequest} - * 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 - * [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDevicesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, + protos.google.cloud.iot.v1.IDevice>): void; +/** + * List devices in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. + * 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 [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesRequest]{@link google.cloud.iot.v1.ListDevicesRequest} + * 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 + * [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - optionsOrCallback?: - | gax.CallOptions - | PaginationCallback< + request: protos.google.cloud.iot.v1.IListDevicesRequest, + optionsOrCallback?: gax.CallOptions|PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, + protos.google.cloud.iot.v1.IDevice>, + callback?: PaginationCallback< protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, - protos.google.cloud.iot.v1.IDevice - >, - callback?: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, - protos.google.cloud.iot.v1.IDevice - > - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice[], - protos.google.cloud.iot.v1.IListDevicesRequest | null, - protos.google.cloud.iot.v1.IListDevicesResponse - ] - > | void { + protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, + protos.google.cloud.iot.v1.IDevice>): + Promise<[ + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest|null, + protos.google.cloud.iot.v1.IListDevicesResponse + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -2178,60 +1815,60 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); this.initialize(); return this.innerApiCalls.listDevices(request, options, callback); } - /** - * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} request.deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} request.deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions - * Options related to gateways. - * @param {number} request.pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. - */ +/** + * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. + */ listDevicesStream( - request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions - ): Transform { + request?: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions): + Transform{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2239,7 +1876,7 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); @@ -2250,46 +1887,46 @@ export class DeviceManagerClient { ); } - /** - * Equivalent to {@link listDevices}, 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 device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} request.deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} request.deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions - * Options related to gateways. - * @param {number} request.pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * @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. - */ +/** + * Equivalent to {@link listDevices}, 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @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. + */ listDevicesAsync( - request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions - ): AsyncIterable { + request?: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions): + AsyncIterable{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2297,14 +1934,14 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'parent': request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listDevices.asyncIterate( this.innerApiCalls['listDevices'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2321,12 +1958,7 @@ export class DeviceManagerClient { * @param {string} device * @returns {string} Resource name string. */ - devicePath( - project: string, - location: string, - registry: string, - device: string - ) { + devicePath(project:string,location:string,registry:string,device:string) { return this.pathTemplates.devicePathTemplate.render({ project: project, location: location, @@ -2386,7 +2018,7 @@ export class DeviceManagerClient { * @param {string} location * @returns {string} Resource name string. */ - locationPath(project: string, location: string) { + locationPath(project:string,location:string) { return this.pathTemplates.locationPathTemplate.render({ project: project, location: location, @@ -2423,7 +2055,7 @@ export class DeviceManagerClient { * @param {string} registry * @returns {string} Resource name string. */ - registryPath(project: string, location: string, registry: string) { + registryPath(project:string,location:string,registry:string) { return this.pathTemplates.registryPathTemplate.render({ project: project, location: location, diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index d7a0c58d51a..455c2408b9e 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "00f9e698ce04c7d67f4cf6b2a38ea6187a2300cb" + "remote": "https://github.com/googleapis/nodejs-iot.git", + "sha": "0bd60867e0111804fe8f4b10e5a3cc888ee08cf7" } }, { diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index a2565258670..aad4bca1cfd 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** + /* eslint-disable node/no-missing-require, no-unused-vars */ const iot = require('@google-cloud/iot'); diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index c4d80e9c0c8..5e4ed636481 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/system-test/install.ts @@ -16,36 +16,34 @@ // ** 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'; +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. + 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(), - }, + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } }; - await packNTest(options); // will throw upon error. + 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. + 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(), - }, + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } }; - await packNTest(options); // will throw upon error. + await packNTest(options); // will throw upon error. }); + }); diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 2723b330599..d4d54f91b50 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -20,7 +20,7 @@ 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 { describe, it } from 'mocha'; import * as devicemanagerModule from '../src'; import {PassThrough} from 'stream'; @@ -28,2901 +28,2159 @@ 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; + 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]); + 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 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]); +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({}); - }); + 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(); }); } - setImmediate(() => { - mockStream.end(); - }); - } else { - setImmediate(() => { - mockStream.write({}); - }); - setImmediate(() => { - mockStream.end(); - }); - } - return sinon.stub().returns(mockStream); + 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); +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('v1.DeviceManagerClient', () => { - it('has servicePath', () => { - const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = devicemanagerModule.v1.DeviceManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - fallback: true, + it('has servicePath', () => { + const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; + assert(servicePath); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.deviceManagerStub, undefined); - await client.initialize(); - assert(client.deviceManagerStub); - }); - - it('has close method', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - 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 devicemanagerModule.v1.DeviceManagerClient({ - 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('createDeviceRegistry', () => { - it('invokes createDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceRegistry() - ); - client.innerApiCalls.createDeviceRegistry = stubSimpleCall( - expectedResponse - ); - const [response] = await client.createDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has apiEndpoint', () => { + const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; + assert(apiEndpoint); }); - it('invokes createDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceRegistry() - ); - client.innerApiCalls.createDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.createDeviceRegistry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDeviceRegistry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has port', () => { + const port = devicemanagerModule.v1.DeviceManagerClient.port; + assert(port); + assert(typeof port === 'number'); }); - it('invokes createDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeviceRegistry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.createDeviceRegistry(request); - }, expectedError); - assert( - (client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('getDeviceRegistry', () => { - it('invokes getDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceRegistry() - ); - client.innerApiCalls.getDeviceRegistry = stubSimpleCall(expectedResponse); - const [response] = await client.getDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('should create a client with no option', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient(); + assert(client); }); - it('invokes getDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceRegistry() - ); - client.innerApiCalls.getDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.getDeviceRegistry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDeviceRegistry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('should create a client with gRPC fallback', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + fallback: true, + }); + assert(client); }); - it('invokes getDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getDeviceRegistry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.getDeviceRegistry(request); - }, expectedError); - assert( - (client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('updateDeviceRegistry', () => { - it('invokes updateDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() - ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceRegistry() - ); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( - expectedResponse - ); - const [response] = await client.updateDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has initialize method and supports deferred initialization', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManagerStub, undefined); + await client.initialize(); + assert(client.deviceManagerStub); }); - it('invokes updateDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() - ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceRegistry() - ); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.updateDeviceRegistry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDeviceRegistry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has close method', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.close(); }); - it('invokes updateDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() - ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.updateDeviceRegistry(request); - }, expectedError); - assert( - (client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('deleteDeviceRegistry', () => { - it('invokes deleteDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( - expectedResponse - ); - const [response] = await client.deleteDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + 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('invokes deleteDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.deleteDeviceRegistry( - 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.deleteDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + 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('createDeviceRegistry', () => { + it('invokes createDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); + client.innerApiCalls.createDeviceRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.createDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes deleteDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.deleteDeviceRegistry(request); - }, expectedError); - assert( - (client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('createDevice', () => { - it('invokes createDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.CreateDeviceRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.Device() - ); - client.innerApiCalls.createDevice = stubSimpleCall(expectedResponse); - const [response] = await client.createDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + it('invokes createDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); + client.innerApiCalls.createDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDeviceRegistry( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes createDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.CreateDeviceRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.Device() - ); - client.innerApiCalls.createDevice = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.createDevice( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDevice | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('invokes createDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeviceRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.createDeviceRegistry(request); }, expectedError); + assert((client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes createDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.CreateDeviceRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createDevice = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.createDevice(request); - }, expectedError); - assert( - (client.innerApiCalls.createDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('getDevice', () => { - it('invokes getDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.GetDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.Device() - ); - client.innerApiCalls.getDevice = stubSimpleCall(expectedResponse); - const [response] = await client.getDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + describe('getDeviceRegistry', () => { + it('invokes getDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRegistryRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); + client.innerApiCalls.getDeviceRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.getDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes getDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.GetDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.Device() - ); - client.innerApiCalls.getDevice = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.getDevice( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDevice | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + it('invokes getDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRegistryRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); + client.innerApiCalls.getDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeviceRegistry( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes getDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.GetDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getDevice(request); - }, expectedError); - assert( - (client.innerApiCalls.getDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('updateDevice', () => { - it('invokes updateDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UpdateDeviceRequest() - ); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.Device() - ); - client.innerApiCalls.updateDevice = stubSimpleCall(expectedResponse); - const [response] = await client.updateDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('invokes getDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRegistryRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeviceRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.getDeviceRegistry(request); }, expectedError); + assert((client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes updateDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UpdateDeviceRequest() - ); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.Device() - ); - client.innerApiCalls.updateDevice = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.updateDevice( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDevice | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + describe('updateDeviceRegistry', () => { + it('invokes updateDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest()); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = "device_registry.name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.updateDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes updateDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UpdateDeviceRequest() - ); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDevice = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.updateDevice(request); - }, expectedError); - assert( - (client.innerApiCalls.updateDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('deleteDevice', () => { - it('invokes deleteDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.DeleteDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteDevice = stubSimpleCall(expectedResponse); - const [response] = await client.deleteDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + it('invokes updateDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest()); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = "device_registry.name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeviceRegistry( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes deleteDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.DeleteDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteDevice = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.deleteDevice( - 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.deleteDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('invokes updateDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest()); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = "device_registry.name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.updateDeviceRegistry(request); }, expectedError); + assert((client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes deleteDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.DeleteDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDevice = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.deleteDevice(request); - }, expectedError); - assert( - (client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('modifyCloudToDeviceConfig', () => { - it('invokes modifyCloudToDeviceConfig without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceConfig() - ); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( - expectedResponse - ); - const [response] = await client.modifyCloudToDeviceConfig(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + describe('deleteDeviceRegistry', () => { + it('invokes deleteDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.deleteDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes modifyCloudToDeviceConfig without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.DeviceConfig() - ); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.modifyCloudToDeviceConfig( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDeviceConfig | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + it('invokes deleteDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDeviceRegistry( + 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.deleteDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes modifyCloudToDeviceConfig with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.modifyCloudToDeviceConfig(request); - }, expectedError); - assert( - (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('listDeviceConfigVersions', () => { - it('invokes listDeviceConfigVersions without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() - ); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( - expectedResponse - ); - const [response] = await client.listDeviceConfigVersions(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('invokes deleteDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.deleteDeviceRegistry(request); }, expectedError); + assert((client.innerApiCalls.deleteDeviceRegistry as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDeviceConfigVersions without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() - ); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.listDeviceConfigVersions( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + describe('createDevice', () => { + it('invokes createDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); + client.innerApiCalls.createDevice = stubSimpleCall(expectedResponse); + const [response] = await client.createDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.createDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes listDeviceConfigVersions with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.listDeviceConfigVersions(request); - }, expectedError); - assert( - (client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('listDeviceStates', () => { - it('invokes listDeviceStates without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceStatesRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceStatesResponse() - ); - client.innerApiCalls.listDeviceStates = stubSimpleCall(expectedResponse); - const [response] = await client.listDeviceStates(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + it('invokes createDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); + client.innerApiCalls.createDevice = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDevice( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.createDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes listDeviceStates without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceStatesRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceStatesResponse() - ); - client.innerApiCalls.listDeviceStates = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.listDeviceStates( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IListDeviceStatesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('invokes createDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.createDevice(request); }, expectedError); + assert((client.innerApiCalls.createDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDeviceStates with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceStatesRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeviceStates = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.listDeviceStates(request); - }, expectedError); - assert( - (client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + describe('getDevice', () => { + it('invokes getDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); + client.innerApiCalls.getDevice = stubSimpleCall(expectedResponse); + const [response] = await client.getDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + it('invokes getDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); + client.innerApiCalls.getDevice = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDevice( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes setIamPolicy with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.setIamPolicy(request); - }, expectedError); - assert( - (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('invokes getDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.getDevice(request); }, expectedError); + assert((client.innerApiCalls.getDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + describe('updateDevice', () => { + it('invokes updateDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRequest()); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = "device.name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); + client.innerApiCalls.updateDevice = stubSimpleCall(expectedResponse); + const [response] = await client.updateDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.updateDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes getIamPolicy with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.getIamPolicy(request); - }, expectedError); - assert( - (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - expectedResponse - ); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + it('invokes updateDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRequest()); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = "device.name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); + client.innerApiCalls.updateDevice = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDevice( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.updateDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('invokes updateDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRequest()); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = "device.name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.updateDevice(request); }, expectedError); + assert((client.innerApiCalls.updateDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes testIamPermissions with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.testIamPermissions(request); - }, expectedError); - assert( - (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('sendCommandToDevice', () => { - it('invokes sendCommandToDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() - ); - client.innerApiCalls.sendCommandToDevice = stubSimpleCall( - expectedResponse - ); - const [response] = await client.sendCommandToDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + describe('deleteDevice', () => { + it('invokes deleteDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); + client.innerApiCalls.deleteDevice = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.deleteDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes sendCommandToDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() - ); - client.innerApiCalls.sendCommandToDevice = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.sendCommandToDevice( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.ISendCommandToDeviceResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + it('invokes deleteDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); + client.innerApiCalls.deleteDevice = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDevice( + 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.deleteDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes sendCommandToDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.sendCommandToDevice = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.sendCommandToDevice(request); - }, expectedError); - assert( - (client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('bindDeviceToGateway', () => { - it('invokes bindDeviceToGateway without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() - ); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( - expectedResponse - ); - const [response] = await client.bindDeviceToGateway(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('invokes deleteDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.deleteDevice(request); }, expectedError); + assert((client.innerApiCalls.deleteDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes bindDeviceToGateway without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() - ); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.bindDeviceToGateway( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + describe('modifyCloudToDeviceConfig', () => { + it('invokes modifyCloudToDeviceConfig without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceConfig()); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall(expectedResponse); + const [response] = await client.modifyCloudToDeviceConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes bindDeviceToGateway with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.bindDeviceToGateway(request); - }, expectedError); - assert( - (client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('unbindDeviceFromGateway', () => { - it('invokes unbindDeviceFromGateway without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() - ); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( - expectedResponse - ); - const [response] = await client.unbindDeviceFromGateway(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); + it('invokes modifyCloudToDeviceConfig without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceConfig()); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.modifyCloudToDeviceConfig( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('invokes unbindDeviceFromGateway without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() - ); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.unbindDeviceFromGateway( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('invokes modifyCloudToDeviceConfig with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.modifyCloudToDeviceConfig(request); }, expectedError); + assert((client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes unbindDeviceFromGateway with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.unbindDeviceFromGateway(request); - }, expectedError); - assert( - (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('listDeviceRegistries', () => { - it('invokes listDeviceRegistries without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.innerApiCalls.listDeviceRegistries = stubSimpleCall( - expectedResponse - ); - const [response] = await client.listDeviceRegistries(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('listDeviceConfigVersions', () => { + it('invokes listDeviceConfigVersions without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse()); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceConfigVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes listDeviceConfigVersions without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse()); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeviceConfigVersions( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes listDeviceConfigVersions with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.listDeviceConfigVersions(request); }, expectedError); + assert((client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDeviceRegistries without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.innerApiCalls.listDeviceRegistries = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.listDeviceRegistries( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDeviceRegistry[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + describe('listDeviceStates', () => { + it('invokes listDeviceStates without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesResponse()); + client.innerApiCalls.listDeviceStates = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceStates(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes listDeviceStates without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesResponse()); + client.innerApiCalls.listDeviceStates = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeviceStates( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IListDeviceStatesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes listDeviceStates with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceStates = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.listDeviceStates(request); }, expectedError); + assert((client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDeviceRegistries with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeviceRegistries = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.listDeviceRegistries(request); - }, expectedError); - assert( - (client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.SetIamPolicyRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.SetIamPolicyRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.SetIamPolicyRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.setIamPolicy(request); }, expectedError); + assert((client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDeviceRegistriesStream without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( - expectedResponse - ); - const stream = client.listDeviceRegistriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.iot.v1.DeviceRegistry) => { - 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.listDeviceRegistries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listDeviceRegistries, request) - ); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], - expectedHeaderRequestParams - ); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.GetIamPolicyRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.GetIamPolicyRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.GetIamPolicyRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.getIamPolicy(request); }, expectedError); + assert((client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDeviceRegistriesStream with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listDeviceRegistriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.iot.v1.DeviceRegistry) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(async () => { - await promise; - }, expectedError); - assert( - (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listDeviceRegistries, request) - ); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], - expectedHeaderRequestParams - ); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsResponse()); + client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsResponse()); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsRequest()); + request.resource = ''; + const expectedHeaderRequestParams = "resource="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.testIamPermissions(request); }, expectedError); + assert((client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('uses async iteration with listDeviceRegistries without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; - const iterable = client.listDeviceRegistriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[1], - request - ); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], - expectedHeaderRequestParams - ); + describe('sendCommandToDevice', () => { + it('invokes sendCommandToDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceResponse()); + client.innerApiCalls.sendCommandToDevice = stubSimpleCall(expectedResponse); + const [response] = await client.sendCommandToDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes sendCommandToDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceResponse()); + client.innerApiCalls.sendCommandToDevice = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.sendCommandToDevice( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.ISendCommandToDeviceResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes sendCommandToDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.sendCommandToDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.sendCommandToDevice(request); }, expectedError); + assert((client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('uses async iteration with listDeviceRegistries with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listDeviceRegistriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[1], - request - ); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], - expectedHeaderRequestParams - ); + describe('bindDeviceToGateway', () => { + it('invokes bindDeviceToGateway without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse()); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCall(expectedResponse); + const [response] = await client.bindDeviceToGateway(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes bindDeviceToGateway without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse()); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bindDeviceToGateway( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes bindDeviceToGateway with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.bindDeviceToGateway(request); }, expectedError); + assert((client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - }); - - describe('listDevices', () => { - it('invokes listDevices without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.innerApiCalls.listDevices = stubSimpleCall(expectedResponse); - const [response] = await client.listDevices(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDevices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + + describe('unbindDeviceFromGateway', () => { + it('invokes unbindDeviceFromGateway without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse()); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall(expectedResponse); + const [response] = await client.unbindDeviceFromGateway(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes unbindDeviceFromGateway without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse()); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.unbindDeviceFromGateway( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes unbindDeviceFromGateway with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.unbindDeviceFromGateway(request); }, expectedError); + assert((client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes listDevices without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.innerApiCalls.listDevices = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.listDevices( - request, - ( - err?: Error | null, - result?: protos.google.cloud.iot.v1.IDevice[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); + describe('listDeviceRegistries', () => { + it('invokes listDeviceRegistries without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.innerApiCalls.listDeviceRegistries = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceRegistries(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes listDeviceRegistries without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.innerApiCalls.listDeviceRegistries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeviceRegistries( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes listDeviceRegistries with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceRegistries = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.listDeviceRegistries(request); }, expectedError); + assert((client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes listDeviceRegistriesStream without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDeviceRegistriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.DeviceRegistry) => { + 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.listDeviceRegistries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeviceRegistries, request)); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listDeviceRegistriesStream with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeviceRegistriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.DeviceRegistry) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(async () => { await promise; }, expectedError); + assert((client.descriptors.page.listDeviceRegistries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeviceRegistries, request)); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDeviceRegistries without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent=";const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; + const iterable = client.listDeviceRegistriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDevices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); - it('invokes listDevices with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDevices = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.listDevices(request); - }, expectedError); - assert( - (client.innerApiCalls.listDevices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('uses async iteration with listDeviceRegistries with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent=";const expectedError = new Error('expected'); + client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeviceRegistriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); }); - it('invokes listDevicesStream without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.descriptors.page.listDevices.createStream = stubPageStreamingCall( - expectedResponse - ); - const stream = client.listDevicesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.Device[] = []; - stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { - 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.listDevices.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listDevices, request) - ); - assert.strictEqual( - (client.descriptors.page.listDevices.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + describe('listDevices', () => { + it('invokes listDevices without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.innerApiCalls.listDevices = stubSimpleCall(expectedResponse); + const [response] = await client.listDevices(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDevices as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('invokes listDevicesStream with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listDevices.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listDevicesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.Device[] = []; - stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(async () => { - await promise; - }, expectedError); - assert( - (client.descriptors.page.listDevices.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listDevices, request) - ); - assert.strictEqual( - (client.descriptors.page.listDevices.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('invokes listDevices without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.innerApiCalls.listDevices = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDevices( + request, + (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.listDevices as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); - it('uses async iteration with listDevices without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.iot.v1.IDevice[] = []; - const iterable = client.listDevicesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert.strictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('invokes listDevices with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDevices = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.listDevices(request); }, expectedError); + assert((client.innerApiCalls.listDevices as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); - it('uses async iteration with listDevices with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.iot.v1.ListDevicesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listDevicesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.iot.v1.IDevice[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert.strictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - }); - - describe('Path templates', () => { - describe('device', () => { - const fakePath = '/rendered/path/device'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - registry: 'registryValue', - device: 'deviceValue', - }; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.devicePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.devicePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('devicePath', () => { - const result = client.devicePath( - 'projectValue', - 'locationValue', - 'registryValue', - 'deviceValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.devicePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromDeviceName', () => { - const result = client.matchProjectFromDeviceName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromDeviceName', () => { - const result = client.matchLocationFromDeviceName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchRegistryFromDeviceName', () => { - const result = client.matchRegistryFromDeviceName(fakePath); - assert.strictEqual(result, 'registryValue'); - assert( - (client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchDeviceFromDeviceName', () => { - const result = client.matchDeviceFromDeviceName(fakePath); - assert.strictEqual(result, 'deviceValue'); - assert( - (client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); + it('invokes listDevicesStream without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.descriptors.page.listDevices.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.Device[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { + 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.listDevices.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDevices, request)); + assert.strictEqual( + (client.descriptors.page.listDevices.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); + it('invokes listDevicesStream with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent="; + const expectedError = new Error('expected'); + client.descriptors.page.listDevices.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.Device[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(async () => { await promise; }, expectedError); + assert((client.descriptors.page.listDevices.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDevices, request)); + assert.strictEqual( + (client.descriptors.page.listDevices.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDevices without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent=";const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.iot.v1.IDevice[] = []; + const iterable = client.listDevicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert.strictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDevices with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); + request.parent = ''; + const expectedHeaderRequestParams = "parent=";const expectedError = new Error('expected'); + client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDevicesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.iot.v1.IDevice[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert.strictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); }); - describe('registry', () => { - const fakePath = '/rendered/path/registry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - registry: 'registryValue', - }; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.registryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.registryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('registryPath', () => { - const result = client.registryPath( - 'projectValue', - 'locationValue', - 'registryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.registryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromRegistryName', () => { - const result = client.matchProjectFromRegistryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.registryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromRegistryName', () => { - const result = client.matchLocationFromRegistryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.registryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchRegistryFromRegistryName', () => { - const result = client.matchRegistryFromRegistryName(fakePath); - assert.strictEqual(result, 'registryValue'); - assert( - (client.pathTemplates.registryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); + describe('Path templates', () => { + + describe('device', () => { + const fakePath = "/rendered/path/device"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + registry: "registryValue", + device: "deviceValue", + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.devicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.devicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('devicePath', () => { + const result = client.devicePath("projectValue", "locationValue", "registryValue", "deviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.devicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDeviceName', () => { + const result = client.matchProjectFromDeviceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDeviceName', () => { + const result = client.matchLocationFromDeviceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRegistryFromDeviceName', () => { + const result = client.matchRegistryFromDeviceName(fakePath); + assert.strictEqual(result, "registryValue"); + assert((client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceFromDeviceName', () => { + const result = client.matchDeviceFromDeviceName(fakePath); + assert.strictEqual(result, "deviceValue"); + assert((client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('registry', () => { + const fakePath = "/rendered/path/registry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + registry: "registryValue", + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.registryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.registryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('registryPath', () => { + const result = client.registryPath("projectValue", "locationValue", "registryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.registryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRegistryName', () => { + const result = client.matchProjectFromRegistryName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRegistryName', () => { + const result = client.matchLocationFromRegistryName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRegistryFromRegistryName', () => { + const result = client.matchRegistryFromRegistryName(fakePath); + assert.strictEqual(result, "registryValue"); + assert((client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); - }); }); diff --git a/packages/google-cloud-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js index 1f0f42dd4c1..66f66d15c23 100644 --- a/packages/google-cloud-iot/webpack.config.js +++ b/packages/google-cloud-iot/webpack.config.js @@ -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 4ab7685c0957e492fcf8d9ca24c18eb1286b6d19 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Mon, 20 Apr 2020 12:49:21 -0700 Subject: [PATCH 199/370] chore: clean up synth.py (#316) * run synthtool * rerun synthtool --- packages/google-cloud-iot/src/index.ts | 4 +- .../src/v1/device_manager_client.ts | 2808 ++++++---- packages/google-cloud-iot/synth.metadata | 10 +- packages/google-cloud-iot/synth.py | 6 +- .../system-test/fixtures/sample/src/index.js | 1 - .../google-cloud-iot/system-test/install.ts | 32 +- .../test/gapic_device_manager_v1.ts | 4870 ++++++++++------- packages/google-cloud-iot/webpack.config.js | 12 +- 8 files changed, 4429 insertions(+), 3314 deletions(-) diff --git a/packages/google-cloud-iot/src/index.ts b/packages/google-cloud-iot/src/index.ts index 14472f0bef4..61507dd22ad 100644 --- a/packages/google-cloud-iot/src/index.ts +++ b/packages/google-cloud-iot/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. @@ -19,8 +19,6 @@ import * as v1 from './v1'; const DeviceManagerClient = v1.DeviceManagerClient; export {v1, DeviceManagerClient}; -// For compatibility with JavaScript libraries we need to provide this default export: -// tslint:disable-next-line no-default-export export default {v1, DeviceManagerClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 31fcc659ad3..7c3601a664c 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -17,11 +17,18 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} 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 {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import * as gapicConfig from './device_manager_client_config.json'; @@ -40,7 +47,12 @@ export class DeviceManagerClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}}; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; deviceManagerStub?: Promise<{[name: string]: Function}>; @@ -74,10 +86,12 @@ export class DeviceManagerClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof DeviceManagerClient; - const servicePath = opts && opts.servicePath ? - opts.servicePath : - ((opts && opts.apiEndpoint) ? opts.apiEndpoint : - staticMembers.servicePath); + 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) { @@ -87,8 +101,8 @@ export class DeviceManagerClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = (typeof window !== 'undefined'); - if (isBrowser){ + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { opts.fallback = true; } // If we are in browser, we are already using fallback because of the @@ -105,13 +119,10 @@ export class DeviceManagerClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [ - `gax/${this._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 { @@ -127,12 +138,18 @@ export class DeviceManagerClient { // 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 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 + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated @@ -154,16 +171,25 @@ export class DeviceManagerClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this.descriptors.page = { - listDeviceRegistries: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deviceRegistries'), - listDevices: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'devices') + listDeviceRegistries: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'deviceRegistries' + ), + listDevices: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'devices' + ), }; // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.iot.v1.DeviceManager', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + 'google.cloud.iot.v1.DeviceManager', + 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 @@ -191,16 +217,38 @@ export class DeviceManagerClient { // Put together the "service stub" for // google.cloud.iot.v1.DeviceManager. this.deviceManagerStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.iot.v1.DeviceManager') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.iot.v1.DeviceManager' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.iot.v1.DeviceManager, - this._opts) as Promise<{[method: string]: Function}>; + 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 deviceManagerStubMethods = - ['createDeviceRegistry', 'getDeviceRegistry', 'updateDeviceRegistry', 'deleteDeviceRegistry', 'listDeviceRegistries', 'createDevice', 'getDevice', 'updateDevice', 'deleteDevice', 'listDevices', 'modifyCloudToDeviceConfig', 'listDeviceConfigVersions', 'listDeviceStates', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'sendCommandToDevice', 'bindDeviceToGateway', 'unbindDeviceFromGateway']; + const deviceManagerStubMethods = [ + 'createDeviceRegistry', + 'getDeviceRegistry', + 'updateDeviceRegistry', + 'deleteDeviceRegistry', + 'listDeviceRegistries', + 'createDevice', + 'getDevice', + 'updateDevice', + 'deleteDevice', + 'listDevices', + 'modifyCloudToDeviceConfig', + 'listDeviceConfigVersions', + 'listDeviceStates', + 'setIamPolicy', + 'getIamPolicy', + 'testIamPermissions', + 'sendCommandToDevice', + 'bindDeviceToGateway', + 'unbindDeviceFromGateway', + ]; for (const methodName of deviceManagerStubMethods) { const callPromise = this.deviceManagerStub.then( stub => (...args: Array<{}>) => { @@ -210,16 +258,17 @@ export class DeviceManagerClient { const func = stub[methodName]; return func.apply(stub, args); }, - (err: Error|null|undefined) => () => { + (err: Error | null | undefined) => () => { throw err; - }); + } + ); const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); this.innerApiCalls[methodName] = apiCall; @@ -257,7 +306,7 @@ export class DeviceManagerClient { static get scopes() { return [ 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloudiot' + 'https://www.googleapis.com/auth/cloudiot', ]; } @@ -268,8 +317,9 @@ export class DeviceManagerClient { * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId(callback?: Callback): - Promise|void { + getProjectId( + callback?: Callback + ): Promise | void { if (callback) { this.auth.getProjectId(callback); return; @@ -281,64 +331,85 @@ export class DeviceManagerClient { // -- Service calls -- // ------------------- createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + {} | undefined + ] + >; createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; -/** - * Creates a device registry that contains devices. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a device registry that contains devices. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -347,66 +418,81 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.createDeviceRegistry(request, options, callback); } getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + {} | undefined + ] + >; getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, + {} | null | undefined + > + ): void; getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; -/** - * Gets a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IGetDeviceRegistryRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IGetDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -415,73 +501,94 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.getDeviceRegistry(request, options, callback); } updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + {} | undefined + ] + >; updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; -/** - * Updates a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Updates a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry, - protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDeviceRegistry, + | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry, + protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -496,60 +603,81 @@ export class DeviceManagerClient { return this.innerApiCalls.updateDeviceRegistry(request, options, callback); } deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + {} | undefined + ] + >; deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, - {}|null|undefined>): void; -/** - * Deletes a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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. - */ + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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. + */ deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -558,71 +686,84 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.deleteDeviceRegistry(request, options, callback); } createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + {} | undefined + ] + >; createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, - {}|null|undefined>): void; -/** - * Creates a device in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {google.cloud.iot.v1.Device} request.device - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a device in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.ICreateDeviceRequest|undefined, {}|undefined - ]>|void { + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.ICreateDeviceRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -631,70 +772,83 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.createDevice(request, options, callback); } getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | undefined, + {} | undefined + ] + >; getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, - {}|null|undefined>): void; -/** - * Gets details about a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are 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 an object representing [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets details about a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are 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 an object representing [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.iot.v1.IGetDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IGetDeviceRequest|undefined, {}|undefined - ]>|void { + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IGetDeviceRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -703,73 +857,86 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.getDevice(request, options, callback); } updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + ] + >; updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, - {}|null|undefined>): void; -/** - * Updates a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.iot.v1.Device} request.device - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Updates a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest|undefined, {}|undefined - ]>|void { + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -784,61 +951,74 @@ export class DeviceManagerClient { return this.innerApiCalls.updateDevice(request, options, callback); } deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + {} | undefined + ] + >; deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, - {}|null|undefined>): void; -/** - * Deletes a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @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. - */ + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @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. + */ deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.iot.v1.IDeleteDeviceRequest|undefined, {}|undefined - ]>|void { + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.iot.v1.IDeleteDeviceRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -847,77 +1027,98 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.deleteDevice(request, options, callback); } modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest | undefined, + {} | undefined + ] + >; modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, - {}|null|undefined>): void; -/** - * Modifies the configuration for the device, which is eventually sent from - * the Cloud IoT Core servers. Returns the modified configuration version and - * its metadata. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.versionToUpdate - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * @param {Buffer} request.binaryData - * Required. The configuration data for the device. - * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.versionToUpdate + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @param {Buffer} request.binaryData + * Required. The configuration data for the device. + * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IDeviceConfig, - protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IDeviceConfig, + | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceConfig, + protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -926,72 +1127,97 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); - return this.innerApiCalls.modifyCloudToDeviceConfig(request, options, callback); + return this.innerApiCalls.modifyCloudToDeviceConfig( + request, + options, + callback + ); } listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest | undefined, + {} | undefined + ] + >; listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null + | undefined, + {} | null | undefined + > + ): void; listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, - {}|null|undefined>): void; -/** - * Lists the last few versions of the device configuration in descending - * order (i.e.: newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.numVersions - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numVersions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, - protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, + protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1000,72 +1226,91 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); - return this.innerApiCalls.listDeviceConfigVersions(request, options, callback); + return this.innerApiCalls.listDeviceConfigVersions( + request, + options, + callback + ); } listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + {} | undefined + ] + >; listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, + {} | null | undefined + > + ): void; listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - callback: Callback< - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, - {}|null|undefined>): void; -/** - * Lists the last few versions of the device state in descending order (i.e.: - * newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.numStates - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + callback: Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numStates + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IListDeviceStatesResponse, - protos.google.cloud.iot.v1.IListDeviceStatesRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IListDeviceStatesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IListDeviceStatesResponse, + protos.google.cloud.iot.v1.IListDeviceStatesRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1074,66 +1319,79 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.listDeviceStates(request, options, callback); } setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined - ]>; + request: protos.google.iam.v1.ISetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; -/** - * Sets the access control policy on the specified resource. Replaces any - * existing policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {} request. - * @param {} request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {} request. + * @param {} request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined - ]>|void { + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1142,67 +1400,80 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'resource': request.resource || '', + resource: request.resource || '', }); this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); } getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined - ]>; + request: protos.google.iam.v1.IGetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + >; getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; -/** - * Gets the access control policy for a resource. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * @param {Object} request - * The request object that will be sent. - * @param {} request. - * @param {} request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * @param {Object} request + * The request object that will be sent. + * @param {} request. + * @param {} request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined - ]>|void { + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1211,67 +1482,80 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'resource': request.resource || '', + resource: request.resource || '', }); this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); } testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>; + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; -/** - * Returns permissions that a caller has on the specified resource. - * If the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * @param {Object} request - * The request object that will be sent. - * @param {} request. - * @param {} request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * @param {Object} request + * The request object that will be sent. + * @param {} request. + * @param {} request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>|void { + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1280,87 +1564,102 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'resource': request.resource || '', + resource: request.resource || '', }); this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); } sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + {} | undefined + ] + >; sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, - {}|null|undefined>): void; -/** - * Sends a command to the specified device. In order for a device to be able - * to receive commands, it must: - * 1) be connected to Cloud IoT Core using the MQTT protocol, and - * 2) be subscribed to the group of MQTT topics specified by - * /devices/{device-id}/commands/#. This subscription will receive commands - * at the top-level topic /devices/{device-id}/commands as well as commands - * for subfolders, like /devices/{device-id}/commands/subfolder. - * Note that subscribing to specific subfolders is not supported. - * If the command could not be delivered to the device, this method will - * return an error; in particular, if the device is not subscribed, this - * method will return FAILED_PRECONDITION. Otherwise, this method will - * return OK. If the subscription is QoS 1, at least once delivery will be - * guaranteed; for QoS 0, no acknowledgment will be expected from the device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {Buffer} request.binaryData - * Required. The command data to send to the device. - * @param {string} request.subfolder - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * @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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Sends a command to the specified device. In order for a device to be able + * to receive commands, it must: + * 1) be connected to Cloud IoT Core using the MQTT protocol, and + * 2) be subscribed to the group of MQTT topics specified by + * /devices/{device-id}/commands/#. This subscription will receive commands + * at the top-level topic /devices/{device-id}/commands as well as commands + * for subfolders, like /devices/{device-id}/commands/subfolder. + * Note that subscribing to specific subfolders is not supported. + * If the command could not be delivered to the device, this method will + * return an error; in particular, if the device is not subscribed, this + * method will return FAILED_PRECONDITION. Otherwise, this method will + * return OK. If the subscription is QoS 1, at least once delivery will be + * guaranteed; for QoS 0, no acknowledgment will be expected from the device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {Buffer} request.binaryData + * Required. The command data to send to the device. + * @param {string} request.subfolder + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * @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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.ISendCommandToDeviceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1369,73 +1668,88 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'name': request.name || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.sendCommandToDevice(request, options, callback); } bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + {} | undefined + ] + >; bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, + {} | null | undefined + > + ): void; bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - callback: Callback< - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, - {}|null|undefined>): void; -/** - * Associates the device with the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + callback: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Associates the device with the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, - protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, + protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1444,73 +1758,94 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.bindDeviceToGateway(request, options, callback); } unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest | undefined, + {} | undefined + ] + >; unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null + | undefined, + {} | null | undefined + > + ): void; unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - callback: Callback< - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, - {}|null|undefined>): void; -/** - * Deletes the association between the device and the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + callback: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes the association between the device and the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, - protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, + protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1519,90 +1854,113 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.unbindDeviceFromGateway(request, options, callback); + return this.innerApiCalls.unbindDeviceFromGateway( + request, + options, + callback + ); } listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry[], - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest|null, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - ]>; + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry[], + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + ] + >; listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options: gax.CallOptions, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, - protos.google.cloud.iot.v1.IDeviceRegistry>): void; + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry + > + ): void; listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, - protos.google.cloud.iot.v1.IDeviceRegistry>): void; -/** - * Lists device registries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesRequest]{@link google.cloud.iot.v1.ListDeviceRegistriesRequest} - * 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 - * [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry + > + ): void; + /** + * Lists device registries. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesRequest]{@link google.cloud.iot.v1.ListDeviceRegistriesRequest} + * 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 + * [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - optionsOrCallback?: gax.CallOptions|PaginationCallback< - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, - protos.google.cloud.iot.v1.IDeviceRegistry>, - callback?: PaginationCallback< + request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse|null|undefined, - protos.google.cloud.iot.v1.IDeviceRegistry>): - Promise<[ - protos.google.cloud.iot.v1.IDeviceRegistry[], - protos.google.cloud.iot.v1.IListDeviceRegistriesRequest|null, - protos.google.cloud.iot.v1.IListDeviceRegistriesResponse - ]>|void { + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry + >, + callback?: PaginationCallback< + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + | null + | undefined, + protos.google.cloud.iot.v1.IDeviceRegistry + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDeviceRegistry[], + protos.google.cloud.iot.v1.IListDeviceRegistriesRequest | null, + protos.google.cloud.iot.v1.IListDeviceRegistriesResponse + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1611,48 +1969,48 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.listDeviceRegistries(request, options, callback); } -/** - * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. - */ + /** + * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDeviceRegistries} 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} on 'data' event. + */ listDeviceRegistriesStream( - request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions): - Transform{ + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions + ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1660,7 +2018,7 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); @@ -1671,34 +2029,34 @@ export class DeviceManagerClient { ); } -/** - * Equivalent to {@link listDeviceRegistries}, 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 and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @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. - */ + /** + * Equivalent to {@link listDeviceRegistries}, 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 and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @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. + */ listDeviceRegistriesAsync( - request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions): - AsyncIterable{ + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + options?: gax.CallOptions + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1706,107 +2064,118 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listDeviceRegistries.asyncIterate( this.innerApiCalls['listDeviceRegistries'] as GaxCall, - request as unknown as RequestType, + (request as unknown) as RequestType, callSettings ) as AsyncIterable; } listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.iot.v1.IDevice[], - protos.google.cloud.iot.v1.IListDevicesRequest|null, - protos.google.cloud.iot.v1.IListDevicesResponse - ]>; + request: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest | null, + protos.google.cloud.iot.v1.IListDevicesResponse + ] + >; listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - options: gax.CallOptions, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, - protos.google.cloud.iot.v1.IDevice>): void; + request: protos.google.cloud.iot.v1.IListDevicesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + > + ): void; listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, - protos.google.cloud.iot.v1.IDevice>): void; -/** - * List devices in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} request.deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} request.deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions - * Options related to gateways. - * @param {number} request.pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. - * 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 [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesRequest]{@link google.cloud.iot.v1.ListDevicesRequest} - * 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 - * [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.iot.v1.IListDevicesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + > + ): void; + /** + * List devices in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Device]{@link google.cloud.iot.v1.Device}. + * 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 [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesRequest]{@link google.cloud.iot.v1.ListDevicesRequest} + * 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 + * [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - optionsOrCallback?: gax.CallOptions|PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, - protos.google.cloud.iot.v1.IDevice>, - callback?: PaginationCallback< + request: protos.google.cloud.iot.v1.IListDevicesRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse|null|undefined, - protos.google.cloud.iot.v1.IDevice>): - Promise<[ - protos.google.cloud.iot.v1.IDevice[], - protos.google.cloud.iot.v1.IListDevicesRequest|null, - protos.google.cloud.iot.v1.IListDevicesResponse - ]>|void { + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + >, + callback?: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + > + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest | null, + protos.google.cloud.iot.v1.IListDevicesResponse + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -1815,60 +2184,60 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.listDevices(request, options, callback); } -/** - * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} request.deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} request.deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions - * Options related to gateways. - * @param {number} request.pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. - */ + /** + * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDevices} 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @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 [Device]{@link google.cloud.iot.v1.Device} on 'data' event. + */ listDevicesStream( - request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions): - Transform{ + request?: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions + ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1876,7 +2245,7 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); @@ -1887,46 +2256,46 @@ export class DeviceManagerClient { ); } -/** - * Equivalent to {@link listDevices}, 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 device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param {number[]} request.deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @param {string[]} request.deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified. - * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions - * Options related to gateways. - * @param {number} request.pageSize - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * @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. - */ + /** + * Equivalent to {@link listDevices}, 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param {number[]} request.deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @param {string[]} request.deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified. + * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions + * Options related to gateways. + * @param {number} request.pageSize + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * @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. + */ listDevicesAsync( - request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions): - AsyncIterable{ + request?: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: gax.CallOptions + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1934,14 +2303,14 @@ export class DeviceManagerClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'parent': request.parent || '', + parent: request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listDevices.asyncIterate( this.innerApiCalls['listDevices'] as GaxCall, - request as unknown as RequestType, + (request as unknown) as RequestType, callSettings ) as AsyncIterable; } @@ -1958,7 +2327,12 @@ export class DeviceManagerClient { * @param {string} device * @returns {string} Resource name string. */ - devicePath(project:string,location:string,registry:string,device:string) { + devicePath( + project: string, + location: string, + registry: string, + device: string + ) { return this.pathTemplates.devicePathTemplate.render({ project: project, location: location, @@ -2018,7 +2392,7 @@ export class DeviceManagerClient { * @param {string} location * @returns {string} Resource name string. */ - locationPath(project:string,location:string) { + locationPath(project: string, location: string) { return this.pathTemplates.locationPathTemplate.render({ project: project, location: location, @@ -2055,7 +2429,7 @@ export class DeviceManagerClient { * @param {string} registry * @returns {string} Resource name string. */ - registryPath(project:string,location:string,registry:string) { + registryPath(project: string, location: string, registry: string) { return this.pathTemplates.registryPathTemplate.render({ project: project, location: location, diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 455c2408b9e..554aa8be2d4 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "0bd60867e0111804fe8f4b10e5a3cc888ee08cf7" + "remote": "git@github.com:googleapis/nodejs-iot.git", + "sha": "121c4db3e99b755b831df8c6c7474efcc1c48227" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dea1f52034d188ca371c3a70c716ca2a6b3f2aa1", - "internalRef": "306298030" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "682c0c37d1054966ca662a44259e96cc7aea4413" + "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" } } ], diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 0d791b6dace..3a023fd6912 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -32,8 +32,8 @@ 'iot', generator_args={ "grpc-service-config": f"google/cloud/iot/{version}/cloudiot_grpc_service_config.json", - "package-name": f"@google-cloud/iot", - "main-service": f"iot" + "package-name": "@google-cloud/iot", + "main-service": "iot" }, proto_path=f'/google/cloud/iot/{version}', extra_proto_files=['google/cloud/common_resources.proto'], @@ -42,7 +42,7 @@ # skip index, protos, package.json, and README.md s.copy( library, - excludes=['package.json', 'README.md', 'src/index.ts'], + excludes=['package.json', 'README.md'], ) # Copy common templated files diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index aad4bca1cfd..a2565258670 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js @@ -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 iot = require('@google-cloud/iot'); diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index 5e4ed636481..4c1ba3eb79a 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/system-test/install.ts @@ -16,34 +16,36 @@ // ** 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'; +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() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + 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() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, }; - await packNTest(options); // will throw upon error. + 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. + 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() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); // will throw upon error. }); - }); diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index d4d54f91b50..2723b330599 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -20,7 +20,7 @@ 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 {describe, it} from 'mocha'; import * as devicemanagerModule from '../src'; import {PassThrough} from 'stream'; @@ -28,2159 +28,2901 @@ 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; + 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]); + 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 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]); - } +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(); }); + } + 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({}); + }); } - return sinon.stub().returns(mockStream); + 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); +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('v1.DeviceManagerClient', () => { - it('has servicePath', () => { - const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; - assert(servicePath); + it('has servicePath', () => { + const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = devicemanagerModule.v1.DeviceManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + fallback: true, }); + assert(client); + }); - it('has apiEndpoint', () => { - const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; - assert(apiEndpoint); + it('has initialize method and supports deferred initialization', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - - it('has port', () => { - const port = devicemanagerModule.v1.DeviceManagerClient.port; - assert(port); - assert(typeof port === 'number'); + assert.strictEqual(client.deviceManagerStub, undefined); + await client.initialize(); + assert(client.deviceManagerStub); + }); + + it('has close method', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - - it('should create a client with no option', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient(); - assert(client); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - - it('should create a client with gRPC fallback', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - fallback: true, - }); - assert(client); + 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 devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.deviceManagerStub, undefined); - await client.initialize(); - assert(client.deviceManagerStub); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); - - it('has close method', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.close(); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('createDeviceRegistry', () => { + it('invokes createDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.createDeviceRegistry = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - 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('invokes createDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.createDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createDeviceRegistry( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - 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('createDeviceRegistry', () => { - it('invokes createDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); - client.innerApiCalls.createDeviceRegistry = stubSimpleCall(expectedResponse); - const [response] = await client.createDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes createDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); - client.innerApiCalls.createDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDeviceRegistry( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes createDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeviceRegistry = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.createDeviceRegistry(request); }, expectedError); - assert((client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes createDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.createDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.createDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - - describe('getDeviceRegistry', () => { - it('invokes getDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRegistryRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); - client.innerApiCalls.getDeviceRegistry = stubSimpleCall(expectedResponse); - const [response] = await client.getDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes getDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRegistryRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); - client.innerApiCalls.getDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDeviceRegistry( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes getDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRegistryRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getDeviceRegistry = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.getDeviceRegistry(request); }, expectedError); - assert((client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + }); + + describe('getDeviceRegistry', () => { + it('invokes getDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.getDeviceRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.getDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('updateDeviceRegistry', () => { - it('invokes updateDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest()); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = "device_registry.name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCall(expectedResponse); - const [response] = await client.updateDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes updateDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest()); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = "device_registry.name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDeviceRegistry( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes updateDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest()); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = "device_registry.name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.updateDeviceRegistry(request); }, expectedError); - assert((client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes getDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.getDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getDeviceRegistry( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('deleteDeviceRegistry', () => { - it('invokes deleteDeviceRegistry without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall(expectedResponse); - const [response] = await client.deleteDeviceRegistry(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes deleteDeviceRegistry without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDeviceRegistry( - 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.deleteDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes deleteDeviceRegistry with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.deleteDeviceRegistry(request); }, expectedError); - assert((client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes getDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.getDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - - describe('createDevice', () => { - it('invokes createDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); - client.innerApiCalls.createDevice = stubSimpleCall(expectedResponse); - const [response] = await client.createDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.createDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes createDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); - client.innerApiCalls.createDevice = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDevice( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.createDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes createDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.CreateDeviceRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.createDevice(request); }, expectedError); - assert((client.innerApiCalls.createDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + }); + + describe('updateDeviceRegistry', () => { + it('invokes updateDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('getDevice', () => { - it('invokes getDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); - client.innerApiCalls.getDevice = stubSimpleCall(expectedResponse); - const [response] = await client.getDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes getDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); - client.innerApiCalls.getDevice = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDevice( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes getDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.GetDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.getDevice(request); }, expectedError); - assert((client.innerApiCalls.getDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes updateDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceRegistry() + ); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateDeviceRegistry( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('updateDevice', () => { - it('invokes updateDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRequest()); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = "device.name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); - client.innerApiCalls.updateDevice = stubSimpleCall(expectedResponse); - const [response] = await client.updateDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.updateDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes updateDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRequest()); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = "device.name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.Device()); - client.innerApiCalls.updateDevice = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDevice( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.updateDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes updateDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UpdateDeviceRequest()); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = "device.name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.updateDevice(request); }, expectedError); - assert((client.innerApiCalls.updateDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes updateDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.updateDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.updateDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteDeviceRegistry', () => { + it('invokes deleteDeviceRegistry without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteDeviceRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('deleteDevice', () => { - it('invokes deleteDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); - client.innerApiCalls.deleteDevice = stubSimpleCall(expectedResponse); - const [response] = await client.deleteDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes deleteDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.protobuf.Empty()); - client.innerApiCalls.deleteDevice = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDevice( - 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.deleteDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes deleteDeviceRegistry without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteDeviceRegistry( + 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.deleteDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes deleteDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.DeleteDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.deleteDevice(request); }, expectedError); - assert((client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes deleteDeviceRegistry with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteDeviceRegistry(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteDeviceRegistry as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createDevice', () => { + it('invokes createDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.createDevice = stubSimpleCall(expectedResponse); + const [response] = await client.createDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('modifyCloudToDeviceConfig', () => { - it('invokes modifyCloudToDeviceConfig without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceConfig()); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall(expectedResponse); - const [response] = await client.modifyCloudToDeviceConfig(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes createDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.createDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes modifyCloudToDeviceConfig without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.DeviceConfig()); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.modifyCloudToDeviceConfig( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes createDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDevice = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.createDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.createDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getDevice', () => { + it('invokes getDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.getDevice = stubSimpleCall(expectedResponse); + const [response] = await client.getDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes modifyCloudToDeviceConfig with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.modifyCloudToDeviceConfig(request); }, expectedError); - assert((client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes getDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.getDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('listDeviceConfigVersions', () => { - it('invokes listDeviceConfigVersions without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse()); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall(expectedResponse); - const [response] = await client.listDeviceConfigVersions(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes getDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { + await client.getDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.getDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateDevice', () => { + it('invokes updateDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.updateDevice = stubSimpleCall(expectedResponse); + const [response] = await client.updateDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes listDeviceConfigVersions without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse()); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDeviceConfigVersions( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes updateDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.Device() + ); + client.innerApiCalls.updateDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes listDeviceConfigVersions with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.listDeviceConfigVersions(request); }, expectedError); - assert((client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes updateDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDevice = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.updateDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.updateDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteDevice', () => { + it('invokes deleteDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDevice = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('listDeviceStates', () => { - it('invokes listDeviceStates without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesResponse()); - client.innerApiCalls.listDeviceStates = stubSimpleCall(expectedResponse); - const [response] = await client.listDeviceStates(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes deleteDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteDevice( + 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.deleteDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes listDeviceStates without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesResponse()); - client.innerApiCalls.listDeviceStates = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDeviceStates( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IListDeviceStatesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes deleteDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDevice = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('modifyCloudToDeviceConfig', () => { + it('invokes modifyCloudToDeviceConfig without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceConfig() + ); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.modifyCloudToDeviceConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes listDeviceStates with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceStatesRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeviceStates = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.listDeviceStates(request); }, expectedError); - assert((client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes modifyCloudToDeviceConfig without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.DeviceConfig() + ); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.modifyCloudToDeviceConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.SetIamPolicyRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes modifyCloudToDeviceConfig with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.modifyCloudToDeviceConfig(request); + }, expectedError); + assert( + (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDeviceConfigVersions', () => { + it('invokes listDeviceConfigVersions without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() + ); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listDeviceConfigVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.SetIamPolicyRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); - client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes listDeviceConfigVersions without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() + ); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDeviceConfigVersions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes setIamPolicy with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.SetIamPolicyRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.setIamPolicy(request); }, expectedError); - assert((client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes listDeviceConfigVersions with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.listDeviceConfigVersions(request); + }, expectedError); + assert( + (client.innerApiCalls.listDeviceConfigVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDeviceStates', () => { + it('invokes listDeviceStates without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesResponse() + ); + client.innerApiCalls.listDeviceStates = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceStates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.GetIamPolicyRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes listDeviceStates without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesResponse() + ); + client.innerApiCalls.listDeviceStates = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDeviceStates( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IListDeviceStatesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.GetIamPolicyRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.iam.v1.Policy()); - client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes listDeviceStates with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceStates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.listDeviceStates(request); + }, expectedError); + assert( + (client.innerApiCalls.listDeviceStates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes getIamPolicy with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.GetIamPolicyRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.getIamPolicy(request); }, expectedError); - assert((client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsResponse()); - client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes setIamPolicy with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.setIamPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsResponse()); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes testIamPermissions with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.iam.v1.TestIamPermissionsRequest()); - request.resource = ''; - const expectedHeaderRequestParams = "resource="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.testIamPermissions(request); }, expectedError); - assert((client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes getIamPolicy with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getIamPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + expectedResponse + ); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('sendCommandToDevice', () => { - it('invokes sendCommandToDevice without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceResponse()); - client.innerApiCalls.sendCommandToDevice = stubSimpleCall(expectedResponse); - const [response] = await client.sendCommandToDevice(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes sendCommandToDevice without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceResponse()); - client.innerApiCalls.sendCommandToDevice = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.sendCommandToDevice( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.ISendCommandToDeviceResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes testIamPermissions with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.testIamPermissions(request); + }, expectedError); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('sendCommandToDevice', () => { + it('invokes sendCommandToDevice without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() + ); + client.innerApiCalls.sendCommandToDevice = stubSimpleCall( + expectedResponse + ); + const [response] = await client.sendCommandToDevice(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes sendCommandToDevice with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.SendCommandToDeviceRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.sendCommandToDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.sendCommandToDevice(request); }, expectedError); - assert((client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes sendCommandToDevice without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() + ); + client.innerApiCalls.sendCommandToDevice = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.sendCommandToDevice( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.ISendCommandToDeviceResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('bindDeviceToGateway', () => { - it('invokes bindDeviceToGateway without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse()); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCall(expectedResponse); - const [response] = await client.bindDeviceToGateway(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes sendCommandToDevice with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.sendCommandToDevice = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.sendCommandToDevice(request); + }, expectedError); + assert( + (client.innerApiCalls.sendCommandToDevice as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('bindDeviceToGateway', () => { + it('invokes bindDeviceToGateway without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() + ); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( + expectedResponse + ); + const [response] = await client.bindDeviceToGateway(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes bindDeviceToGateway without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse()); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.bindDeviceToGateway( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes bindDeviceToGateway without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() + ); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.bindDeviceToGateway( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes bindDeviceToGateway with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.bindDeviceToGateway(request); }, expectedError); - assert((client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes bindDeviceToGateway with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.bindDeviceToGateway(request); + }, expectedError); + assert( + (client.innerApiCalls.bindDeviceToGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('unbindDeviceFromGateway', () => { + it('invokes unbindDeviceFromGateway without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() + ); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( + expectedResponse + ); + const [response] = await client.unbindDeviceFromGateway(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('unbindDeviceFromGateway', () => { - it('invokes unbindDeviceFromGateway without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse()); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall(expectedResponse); - const [response] = await client.unbindDeviceFromGateway(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes unbindDeviceFromGateway without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() + ); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.unbindDeviceFromGateway( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); - it('invokes unbindDeviceFromGateway without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse()); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.unbindDeviceFromGateway( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes unbindDeviceFromGateway with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.unbindDeviceFromGateway(request); + }, expectedError); + assert( + (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDeviceRegistries', () => { + it('invokes listDeviceRegistries without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.innerApiCalls.listDeviceRegistries = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listDeviceRegistries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes unbindDeviceFromGateway with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.unbindDeviceFromGateway(request); }, expectedError); - assert((client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes listDeviceRegistries without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.innerApiCalls.listDeviceRegistries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDeviceRegistries( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDeviceRegistry[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('listDeviceRegistries', () => { - it('invokes listDeviceRegistries without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.innerApiCalls.listDeviceRegistries = stubSimpleCall(expectedResponse); - const [response] = await client.listDeviceRegistries(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes listDeviceRegistries with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceRegistries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.listDeviceRegistries(request); + }, expectedError); + assert( + (client.innerApiCalls.listDeviceRegistries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes listDeviceRegistries without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.innerApiCalls.listDeviceRegistries = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDeviceRegistries( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDeviceRegistry[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); + it('invokes listDeviceRegistriesStream without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listDeviceRegistriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; + stream.on( + 'data', + (response: protos.google.cloud.iot.v1.DeviceRegistry) => { + 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.listDeviceRegistries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDeviceRegistries, request) + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); - it('invokes listDeviceRegistries with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeviceRegistries = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.listDeviceRegistries(request); }, expectedError); - assert((client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes listDeviceRegistriesStream with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listDeviceRegistriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; + stream.on( + 'data', + (response: protos.google.cloud.iot.v1.DeviceRegistry) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDeviceRegistries, request) + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); - it('invokes listDeviceRegistriesStream without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDeviceRegistriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; - stream.on('data', (response: protos.google.cloud.iot.v1.DeviceRegistry) => { - 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.listDeviceRegistries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDeviceRegistries, request)); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('uses async iteration with listDeviceRegistries without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), + ]; + client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; + const iterable = client.listDeviceRegistriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); - it('invokes listDeviceRegistriesStream with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedError = new Error('expected'); - client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDeviceRegistriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; - stream.on('data', (response: protos.google.cloud.iot.v1.DeviceRegistry) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(async () => { await promise; }, expectedError); - assert((client.descriptors.page.listDeviceRegistries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDeviceRegistries, request)); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('uses async iteration with listDeviceRegistries with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listDeviceRegistriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDeviceRegistries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listDevices', () => { + it('invokes listDevices without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.innerApiCalls.listDevices = stubSimpleCall(expectedResponse); + const [response] = await client.listDevices(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDevices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('uses async iteration with listDeviceRegistries without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent=";const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), - ]; - client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; - const iterable = client.listDeviceRegistriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); + it('invokes listDevices without error using callback', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.innerApiCalls.listDevices = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDevices( + request, + ( + err?: Error | null, + result?: protos.google.cloud.iot.v1.IDevice[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('uses async iteration with listDeviceRegistries with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent=";const expectedError = new Error('expected'); - client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDeviceRegistriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert.strictEqual( - (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDevices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('listDevices', () => { - it('invokes listDevices without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.innerApiCalls.listDevices = stubSimpleCall(expectedResponse); - const [response] = await client.listDevices(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDevices as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes listDevices without error using callback', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.innerApiCalls.listDevices = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDevices( - request, - (err?: Error|null, result?: protos.google.cloud.iot.v1.IDevice[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.listDevices as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes listDevices with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listDevices = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.listDevices(request); }, expectedError); - assert((client.innerApiCalls.listDevices as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes listDevicesStream without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.descriptors.page.listDevices.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDevicesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.Device[] = []; - stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { - 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.listDevices.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDevices, request)); - assert.strictEqual( - (client.descriptors.page.listDevices.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('invokes listDevices with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDevices = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.listDevices(request); + }, expectedError); + assert( + (client.innerApiCalls.listDevices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); - it('invokes listDevicesStream with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent="; - const expectedError = new Error('expected'); - client.descriptors.page.listDevices.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDevicesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.iot.v1.Device[] = []; - stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(async () => { await promise; }, expectedError); - assert((client.descriptors.page.listDevices.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDevices, request)); - assert.strictEqual( - (client.descriptors.page.listDevices.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('invokes listDevicesStream without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.descriptors.page.listDevices.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.Device[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { + 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.listDevices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDevices, request) + ); + assert.strictEqual( + (client.descriptors.page.listDevices.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); - it('uses async iteration with listDevices without error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent=";const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - generateSampleMessage(new protos.google.cloud.iot.v1.Device()), - ]; - client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.iot.v1.IDevice[] = []; - const iterable = client.listDevicesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert.strictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('invokes listDevicesStream with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDevices.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.iot.v1.Device[] = []; + stream.on('data', (response: protos.google.cloud.iot.v1.Device) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listDevices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDevices, request) + ); + assert.strictEqual( + (client.descriptors.page.listDevices.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); - it('uses async iteration with listDevices with error', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.iot.v1.ListDevicesRequest()); - request.parent = ''; - const expectedHeaderRequestParams = "parent=";const expectedError = new Error('expected'); - client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDevicesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.iot.v1.IDevice[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert.strictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); + it('uses async iteration with listDevices without error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + generateSampleMessage(new protos.google.cloud.iot.v1.Device()), + ]; + client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.iot.v1.IDevice[] = []; + const iterable = client.listDevicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); }); - describe('Path templates', () => { - - describe('device', () => { - const fakePath = "/rendered/path/device"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - registry: "registryValue", - device: "deviceValue", - }; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.devicePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.devicePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('devicePath', () => { - const result = client.devicePath("projectValue", "locationValue", "registryValue", "deviceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.devicePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDeviceName', () => { - const result = client.matchProjectFromDeviceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDeviceName', () => { - const result = client.matchLocationFromDeviceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRegistryFromDeviceName', () => { - const result = client.matchRegistryFromDeviceName(fakePath); - assert.strictEqual(result, "registryValue"); - assert((client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeviceFromDeviceName', () => { - const result = client.matchDeviceFromDeviceName(fakePath); - assert.strictEqual(result, "deviceValue"); - assert((client.pathTemplates.devicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); + it('uses async iteration with listDevices with error', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDevicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listDevicesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.iot.v1.IDevice[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('device', () => { + const fakePath = '/rendered/path/device'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + registry: 'registryValue', + device: 'deviceValue', + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.devicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.devicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('devicePath', () => { + const result = client.devicePath( + 'projectValue', + 'locationValue', + 'registryValue', + 'deviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.devicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeviceName', () => { + const result = client.matchProjectFromDeviceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeviceName', () => { + const result = client.matchLocationFromDeviceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRegistryFromDeviceName', () => { + const result = client.matchRegistryFromDeviceName(fakePath); + assert.strictEqual(result, 'registryValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeviceFromDeviceName', () => { + const result = client.matchDeviceFromDeviceName(fakePath); + assert.strictEqual(result, 'deviceValue'); + assert( + (client.pathTemplates.devicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); - describe('registry', () => { - const fakePath = "/rendered/path/registry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - registry: "registryValue", - }; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.registryPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.registryPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('registryPath', () => { - const result = client.registryPath("projectValue", "locationValue", "registryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.registryPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRegistryName', () => { - const result = client.matchProjectFromRegistryName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.registryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRegistryName', () => { - const result = client.matchLocationFromRegistryName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.registryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRegistryFromRegistryName', () => { - const result = client.matchRegistryFromRegistryName(fakePath); - assert.strictEqual(result, "registryValue"); - assert((client.pathTemplates.registryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); + describe('registry', () => { + const fakePath = '/rendered/path/registry'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + registry: 'registryValue', + }; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.registryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.registryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('registryPath', () => { + const result = client.registryPath( + 'projectValue', + 'locationValue', + 'registryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.registryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRegistryName', () => { + const result = client.matchProjectFromRegistryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRegistryName', () => { + const result = client.matchLocationFromRegistryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRegistryFromRegistryName', () => { + const result = client.matchRegistryFromRegistryName(fakePath); + assert.strictEqual(result, 'registryValue'); + assert( + (client.pathTemplates.registryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); }); + }); }); diff --git a/packages/google-cloud-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js index 66f66d15c23..1f0f42dd4c1 100644 --- a/packages/google-cloud-iot/webpack.config.js +++ b/packages/google-cloud-iot/webpack.config.js @@ -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 4f2741987bf03d80e4538e944eb252807ab90522 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 Apr 2020 14:21:19 -0700 Subject: [PATCH 200/370] build: use codecov's action, now that it's authless (#317) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/73563d93-aea4-4354-9013-d19800d55cda/targets --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 554aa8be2d4..3f470d17b30 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "121c4db3e99b755b831df8c6c7474efcc1c48227" + "remote": "https://github.com/googleapis/nodejs-iot.git", + "sha": "a7877a76474e40808205e7ba1634b7610bc53864" } }, { From 87a4a32af44c1faf12d4e49db39b4a69721ac650 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Apr 2020 20:22:58 -0700 Subject: [PATCH 201/370] build: adopt changes to generator formatter (#318) --- packages/google-cloud-iot/protos/protos.js | 496 ++++++++++----------- packages/google-cloud-iot/synth.metadata | 2 +- 2 files changed, 249 insertions(+), 249 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 17807afb145..74e1b52ccb3 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -793,9 +793,9 @@ CreateDeviceRegistryRequest.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.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + if (message.deviceRegistry != null && Object.hasOwnProperty.call(message, "deviceRegistry")) $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -999,7 +999,7 @@ GetDeviceRegistryRequest.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; }; @@ -1186,7 +1186,7 @@ DeleteDeviceRegistryRequest.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; }; @@ -1382,9 +1382,9 @@ UpdateDeviceRegistryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceRegistry != null && message.hasOwnProperty("deviceRegistry")) + if (message.deviceRegistry != null && Object.hasOwnProperty.call(message, "deviceRegistry")) $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistry, 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; }; @@ -1611,11 +1611,11 @@ ListDeviceRegistriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -1838,7 +1838,7 @@ if (message.deviceRegistries != null && message.deviceRegistries.length) for (var i = 0; i < message.deviceRegistries.length; ++i) $root.google.cloud.iot.v1.DeviceRegistry.encode(message.deviceRegistries[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; }; @@ -2065,9 +2065,9 @@ CreateDeviceRequest.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.device != null && message.hasOwnProperty("device")) + if (message.device != null && Object.hasOwnProperty.call(message, "device")) $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -2280,9 +2280,9 @@ GetDeviceRequest.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.fieldMask != null && message.hasOwnProperty("fieldMask")) + if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -2495,9 +2495,9 @@ UpdateDeviceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.device != null && message.hasOwnProperty("device")) + if (message.device != null && Object.hasOwnProperty.call(message, "device")) $root.google.cloud.iot.v1.Device.encode(message.device, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -2706,7 +2706,7 @@ DeleteDeviceRequest.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; }; @@ -2949,7 +2949,7 @@ ListDevicesRequest.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.deviceNumIds != null && message.deviceNumIds.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); @@ -2960,13 +2960,13 @@ if (message.deviceIds != null && message.deviceIds.length) for (var i = 0; i < message.deviceIds.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceIds[i]); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.gatewayListOptions != null && message.hasOwnProperty("gatewayListOptions")) + if (message.gatewayListOptions != null && Object.hasOwnProperty.call(message, "gatewayListOptions")) $root.google.cloud.iot.v1.GatewayListOptions.encode(message.gatewayListOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 100, wireType 0 =*/800).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 101, wireType 2 =*/810).string(message.pageToken); return writer; }; @@ -3307,11 +3307,11 @@ GatewayListOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + if (message.gatewayType != null && Object.hasOwnProperty.call(message, "gatewayType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); - if (message.associationsGatewayId != null && message.hasOwnProperty("associationsGatewayId")) + if (message.associationsGatewayId != null && Object.hasOwnProperty.call(message, "associationsGatewayId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.associationsGatewayId); - if (message.associationsDeviceId != null && message.hasOwnProperty("associationsDeviceId")) + if (message.associationsDeviceId != null && Object.hasOwnProperty.call(message, "associationsDeviceId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.associationsDeviceId); return writer; }; @@ -3567,7 +3567,7 @@ if (message.devices != null && message.devices.length) for (var i = 0; i < message.devices.length; ++i) $root.google.cloud.iot.v1.Device.encode(message.devices[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; }; @@ -3803,11 +3803,11 @@ ModifyCloudToDeviceConfigRequest.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.versionToUpdate != null && message.hasOwnProperty("versionToUpdate")) + if (message.versionToUpdate != null && Object.hasOwnProperty.call(message, "versionToUpdate")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.versionToUpdate); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.binaryData); return writer; }; @@ -4049,9 +4049,9 @@ ListDeviceConfigVersionsRequest.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.numVersions != null && message.hasOwnProperty("numVersions")) + if (message.numVersions != null && Object.hasOwnProperty.call(message, "numVersions")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numVersions); return writer; }; @@ -4467,9 +4467,9 @@ ListDeviceStatesRequest.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.numStates != null && message.hasOwnProperty("numStates")) + if (message.numStates != null && Object.hasOwnProperty.call(message, "numStates")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numStates); return writer; }; @@ -4894,11 +4894,11 @@ SendCommandToDeviceRequest.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.binaryData != null && message.hasOwnProperty("binaryData")) + if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); - if (message.subfolder != null && message.hasOwnProperty("subfolder")) + if (message.subfolder != null && Object.hasOwnProperty.call(message, "subfolder")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.subfolder); return writer; }; @@ -5295,11 +5295,11 @@ BindDeviceToGatewayRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (message.gatewayId != null && Object.hasOwnProperty.call(message, "gatewayId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); return writer; }; @@ -5687,11 +5687,11 @@ UnbindDeviceFromGatewayRequest.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.gatewayId != null && message.hasOwnProperty("gatewayId")) + if (message.gatewayId != null && Object.hasOwnProperty.call(message, "gatewayId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.gatewayId); - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId); return writer; }; @@ -6207,41 +6207,41 @@ Device.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.numId != null && message.hasOwnProperty("numId")) + if (message.numId != null && Object.hasOwnProperty.call(message, "numId")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.numId); - if (message.lastHeartbeatTime != null && message.hasOwnProperty("lastHeartbeatTime")) + if (message.lastHeartbeatTime != null && Object.hasOwnProperty.call(message, "lastHeartbeatTime")) $root.google.protobuf.Timestamp.encode(message.lastHeartbeatTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastEventTime != null && message.hasOwnProperty("lastEventTime")) + if (message.lastEventTime != null && Object.hasOwnProperty.call(message, "lastEventTime")) $root.google.protobuf.Timestamp.encode(message.lastEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.lastErrorTime != null && message.hasOwnProperty("lastErrorTime")) + if (message.lastErrorTime != null && Object.hasOwnProperty.call(message, "lastErrorTime")) $root.google.protobuf.Timestamp.encode(message.lastErrorTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.lastErrorStatus != null && message.hasOwnProperty("lastErrorStatus")) + if (message.lastErrorStatus != null && Object.hasOwnProperty.call(message, "lastErrorStatus")) $root.google.rpc.Status.encode(message.lastErrorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.credentials != null && message.credentials.length) for (var i = 0; i < message.credentials.length; ++i) $root.google.cloud.iot.v1.DeviceCredential.encode(message.credentials[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) $root.google.cloud.iot.v1.DeviceConfig.encode(message.config, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.lastConfigAckTime != null && message.hasOwnProperty("lastConfigAckTime")) + if (message.lastConfigAckTime != null && Object.hasOwnProperty.call(message, "lastConfigAckTime")) $root.google.protobuf.Timestamp.encode(message.lastConfigAckTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) $root.google.cloud.iot.v1.DeviceState.encode(message.state, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.lastConfigSendTime != null && message.hasOwnProperty("lastConfigSendTime")) + if (message.lastConfigSendTime != null && Object.hasOwnProperty.call(message, "lastConfigSendTime")) $root.google.protobuf.Timestamp.encode(message.lastConfigSendTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.blocked != null && message.hasOwnProperty("blocked")) + if (message.blocked != null && Object.hasOwnProperty.call(message, "blocked")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.blocked); - if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) + if (message.lastStateTime != null && Object.hasOwnProperty.call(message, "lastStateTime")) $root.google.protobuf.Timestamp.encode(message.lastStateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) writer.uint32(/* id 21, wireType 0 =*/168).int32(message.logLevel); - if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) + if (message.gatewayConfig != null && Object.hasOwnProperty.call(message, "gatewayConfig")) $root.google.cloud.iot.v1.GatewayConfig.encode(message.gatewayConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -6764,13 +6764,13 @@ GatewayConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) + if (message.gatewayType != null && Object.hasOwnProperty.call(message, "gatewayType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gatewayType); - if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) + if (message.gatewayAuthMethod != null && Object.hasOwnProperty.call(message, "gatewayAuthMethod")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gatewayAuthMethod); - if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) + if (message.lastAccessedGatewayId != null && Object.hasOwnProperty.call(message, "lastAccessedGatewayId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAccessedGatewayId); - if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) + if (message.lastAccessedGatewayTime != null && Object.hasOwnProperty.call(message, "lastAccessedGatewayTime")) $root.google.protobuf.Timestamp.encode(message.lastAccessedGatewayTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -7102,23 +7102,23 @@ DeviceRegistry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.mqttConfig != null && message.hasOwnProperty("mqttConfig")) + if (message.mqttConfig != null && Object.hasOwnProperty.call(message, "mqttConfig")) $root.google.cloud.iot.v1.MqttConfig.encode(message.mqttConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stateNotificationConfig != null && message.hasOwnProperty("stateNotificationConfig")) + if (message.stateNotificationConfig != null && Object.hasOwnProperty.call(message, "stateNotificationConfig")) $root.google.cloud.iot.v1.StateNotificationConfig.encode(message.stateNotificationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.credentials != null && message.credentials.length) for (var i = 0; i < message.credentials.length; ++i) $root.google.cloud.iot.v1.RegistryCredential.encode(message.credentials[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.httpConfig != null && message.hasOwnProperty("httpConfig")) + if (message.httpConfig != null && Object.hasOwnProperty.call(message, "httpConfig")) $root.google.cloud.iot.v1.HttpConfig.encode(message.httpConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.eventNotificationConfigs != null && message.eventNotificationConfigs.length) for (var i = 0; i < message.eventNotificationConfigs.length; ++i) $root.google.cloud.iot.v1.EventNotificationConfig.encode(message.eventNotificationConfigs[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logLevel); return writer; }; @@ -7466,7 +7466,7 @@ MqttConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) + if (message.mqttEnabledState != null && Object.hasOwnProperty.call(message, "mqttEnabledState")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mqttEnabledState); return writer; }; @@ -7618,7 +7618,7 @@ /** * MqttState enum. * @name google.cloud.iot.v1.MqttState - * @enum {string} + * @enum {number} * @property {number} MQTT_STATE_UNSPECIFIED=0 MQTT_STATE_UNSPECIFIED value * @property {number} MQTT_ENABLED=1 MQTT_ENABLED value * @property {number} MQTT_DISABLED=2 MQTT_DISABLED value @@ -7687,7 +7687,7 @@ HttpConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) + if (message.httpEnabledState != null && Object.hasOwnProperty.call(message, "httpEnabledState")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.httpEnabledState); return writer; }; @@ -7839,7 +7839,7 @@ /** * HttpState enum. * @name google.cloud.iot.v1.HttpState - * @enum {string} + * @enum {number} * @property {number} HTTP_STATE_UNSPECIFIED=0 HTTP_STATE_UNSPECIFIED value * @property {number} HTTP_ENABLED=1 HTTP_ENABLED value * @property {number} HTTP_DISABLED=2 HTTP_DISABLED value @@ -7855,7 +7855,7 @@ /** * LogLevel enum. * @name google.cloud.iot.v1.LogLevel - * @enum {string} + * @enum {number} * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value * @property {number} NONE=10 NONE value * @property {number} ERROR=20 ERROR value @@ -7875,7 +7875,7 @@ /** * GatewayType enum. * @name google.cloud.iot.v1.GatewayType - * @enum {string} + * @enum {number} * @property {number} GATEWAY_TYPE_UNSPECIFIED=0 GATEWAY_TYPE_UNSPECIFIED value * @property {number} GATEWAY=1 GATEWAY value * @property {number} NON_GATEWAY=2 NON_GATEWAY value @@ -7891,7 +7891,7 @@ /** * GatewayAuthMethod enum. * @name google.cloud.iot.v1.GatewayAuthMethod - * @enum {string} + * @enum {number} * @property {number} GATEWAY_AUTH_METHOD_UNSPECIFIED=0 GATEWAY_AUTH_METHOD_UNSPECIFIED value * @property {number} ASSOCIATION_ONLY=1 ASSOCIATION_ONLY value * @property {number} DEVICE_AUTH_TOKEN_ONLY=2 DEVICE_AUTH_TOKEN_ONLY value @@ -7971,9 +7971,9 @@ EventNotificationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (message.pubsubTopicName != null && Object.hasOwnProperty.call(message, "pubsubTopicName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); - if (message.subfolderMatches != null && message.hasOwnProperty("subfolderMatches")) + if (message.subfolderMatches != null && Object.hasOwnProperty.call(message, "subfolderMatches")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.subfolderMatches); return writer; }; @@ -8172,7 +8172,7 @@ StateNotificationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubTopicName != null && message.hasOwnProperty("pubsubTopicName")) + if (message.pubsubTopicName != null && Object.hasOwnProperty.call(message, "pubsubTopicName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubsubTopicName); return writer; }; @@ -8373,7 +8373,7 @@ RegistryCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKeyCertificate != null && message.hasOwnProperty("publicKeyCertificate")) + if (message.publicKeyCertificate != null && Object.hasOwnProperty.call(message, "publicKeyCertificate")) $root.google.cloud.iot.v1.PublicKeyCertificate.encode(message.publicKeyCertificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -8615,17 +8615,17 @@ X509CertificateDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issuer != null && message.hasOwnProperty("issuer")) + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); - if (message.subject != null && message.hasOwnProperty("subject")) + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); - 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 3, wireType 2 =*/26).fork()).ldelim(); - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) + if (message.expiryTime != null && Object.hasOwnProperty.call(message, "expiryTime")) $root.google.protobuf.Timestamp.encode(message.expiryTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + if (message.signatureAlgorithm != null && Object.hasOwnProperty.call(message, "signatureAlgorithm")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.signatureAlgorithm); - if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType")) + if (message.publicKeyType != null && Object.hasOwnProperty.call(message, "publicKeyType")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.publicKeyType); return writer; }; @@ -8896,11 +8896,11 @@ PublicKeyCertificate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && message.hasOwnProperty("format")) + if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.certificate != null && message.hasOwnProperty("certificate")) + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificate); - if (message.x509Details != null && message.hasOwnProperty("x509Details")) + if (message.x509Details != null && Object.hasOwnProperty.call(message, "x509Details")) $root.google.cloud.iot.v1.X509CertificateDetails.encode(message.x509Details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -9075,7 +9075,7 @@ /** * PublicKeyCertificateFormat enum. * @name google.cloud.iot.v1.PublicKeyCertificateFormat - * @enum {string} + * @enum {number} * @property {number} UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT value * @property {number} X509_CERTIFICATE_PEM=1 X509_CERTIFICATE_PEM value */ @@ -9165,9 +9165,9 @@ DeviceCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) $root.google.cloud.iot.v1.PublicKeyCredential.encode(message.publicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -9390,9 +9390,9 @@ PublicKeyCredential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && message.hasOwnProperty("format")) + if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); return writer; }; @@ -9566,7 +9566,7 @@ /** * PublicKeyFormat enum. * @name google.cloud.iot.v1.PublicKeyFormat - * @enum {string} + * @enum {number} * @property {number} UNSPECIFIED_PUBLIC_KEY_FORMAT=0 UNSPECIFIED_PUBLIC_KEY_FORMAT value * @property {number} RSA_PEM=3 RSA_PEM value * @property {number} RSA_X509_PEM=1 RSA_X509_PEM value @@ -9666,13 +9666,13 @@ DeviceConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); - if (message.cloudUpdateTime != null && message.hasOwnProperty("cloudUpdateTime")) + if (message.cloudUpdateTime != null && Object.hasOwnProperty.call(message, "cloudUpdateTime")) $root.google.protobuf.Timestamp.encode(message.cloudUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.deviceAckTime != null && message.hasOwnProperty("deviceAckTime")) + if (message.deviceAckTime != null && Object.hasOwnProperty.call(message, "deviceAckTime")) $root.google.protobuf.Timestamp.encode(message.deviceAckTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.binaryData); return writer; }; @@ -9935,9 +9935,9 @@ DeviceState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.binaryData != null && message.hasOwnProperty("binaryData")) + if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.binaryData); return writer; }; @@ -10181,7 +10181,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; }; @@ -10495,26 +10495,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; }; @@ -10871,9 +10871,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; }; @@ -11019,7 +11019,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 @@ -11140,18 +11140,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; }; @@ -11371,7 +11371,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 @@ -11452,9 +11452,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; }; @@ -11979,9 +11979,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) @@ -11998,9 +11998,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) @@ -12008,7 +12008,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; }; @@ -12546,7 +12546,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) @@ -12563,7 +12563,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) @@ -13028,11 +13028,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; }; @@ -13256,9 +13256,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; }; @@ -13749,25 +13749,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; }; @@ -14114,7 +14114,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 @@ -14160,7 +14160,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 @@ -14241,9 +14241,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; }; @@ -14486,12 +14486,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) @@ -14794,9 +14794,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; }; @@ -15016,11 +15016,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; }; @@ -15254,12 +15254,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; }; @@ -15539,17 +15539,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; }; @@ -15988,45 +15988,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) @@ -16453,7 +16453,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 @@ -16571,18 +16571,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; }; @@ -16924,17 +16924,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) @@ -16945,7 +16945,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; }; @@ -17281,7 +17281,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 @@ -17297,7 +17297,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 @@ -17596,9 +17596,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) @@ -17841,7 +17841,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) @@ -18090,14 +18090,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; }; @@ -18376,9 +18376,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) @@ -18386,7 +18386,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; }; @@ -18620,7 +18620,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 @@ -18750,17 +18750,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; }; @@ -19537,9 +19537,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) @@ -20070,11 +20070,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; }; @@ -20327,9 +20327,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; }; @@ -20551,9 +20551,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; }; @@ -21155,9 +21155,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) @@ -21554,9 +21554,9 @@ SetIamPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && message.hasOwnProperty("policy")) + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -21769,9 +21769,9 @@ GetIamPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -21985,7 +21985,7 @@ TestIamPermissionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); if (message.permissions != null && message.permissions.length) for (var i = 0; i < message.permissions.length; ++i) @@ -22404,7 +22404,7 @@ GetPolicyOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); return writer; }; @@ -22610,9 +22610,9 @@ Policy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); if (message.bindings != null && message.bindings.length) for (var i = 0; i < message.bindings.length; ++i) @@ -22873,12 +22873,12 @@ Binding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.role != null && message.hasOwnProperty("role")) + if (message.role != null && Object.hasOwnProperty.call(message, "role")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && message.hasOwnProperty("condition")) + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23387,13 +23387,13 @@ BindingDelta.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && message.hasOwnProperty("role")) + if (message.role != null && Object.hasOwnProperty.call(message, "role")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && message.hasOwnProperty("member")) + if (message.member != null && Object.hasOwnProperty.call(message, "member")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && message.hasOwnProperty("condition")) + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -23581,7 +23581,7 @@ /** * Action enum. * @name google.iam.v1.BindingDelta.Action - * @enum {string} + * @enum {number} * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value * @property {number} ADD=1 ADD value * @property {number} REMOVE=2 REMOVE value @@ -23680,13 +23680,13 @@ AuditConfigDelta.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && message.hasOwnProperty("logType")) + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); return writer; }; @@ -23869,7 +23869,7 @@ /** * Action enum. * @name google.iam.v1.AuditConfigDelta.Action - * @enum {string} + * @enum {number} * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value * @property {number} ADD=1 ADD value * @property {number} REMOVE=2 REMOVE value @@ -23983,13 +23983,13 @@ Expr.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.expression != null && message.hasOwnProperty("expression")) + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && Object.hasOwnProperty.call(message, "title")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - 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.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); return writer; }; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 3f470d17b30..99eaff79301 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "a7877a76474e40808205e7ba1634b7610bc53864" + "sha": "7e088380505e8b3fcf37bbb9fac6b62ef66d4a64" } }, { From 8b337e817b47723084870a0a4a082e1238bc297d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Apr 2020 08:08:40 -0700 Subject: [PATCH 202/370] docs: update jsdoc annotations (#319) --- .../src/v1/device_manager_client.ts | 28 +++++++++++++++---- packages/google-cloud-iot/synth.metadata | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 7c3601a664c..eb4b7d4dbaa 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -1357,8 +1357,14 @@ export class DeviceManagerClient { * * @param {Object} request * The request object that will be sent. - * @param {} request. - * @param {} request. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. * @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. @@ -1439,8 +1445,12 @@ export class DeviceManagerClient { * * @param {Object} request * The request object that will be sent. - * @param {} request. - * @param {} request. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. * @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. @@ -1521,8 +1531,14 @@ export class DeviceManagerClient { * * @param {Object} request * The request object that will be sent. - * @param {} request. - * @param {} request. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @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. diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 99eaff79301..a74b691f4aa 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "7e088380505e8b3fcf37bbb9fac6b62ef66d4a64" + "sha": "73137b64bcd84cc7be2a0effee867e34e88f700e" } }, { From f075ba6b3aa70c9fe255d427d28239935d76a25e Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 23 Apr 2020 19:30:06 -0700 Subject: [PATCH 203/370] chore: update npm scripts and synth.py (#320) 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-iot/package.json | 5 +++-- packages/google-cloud-iot/synth.py | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 7b827327e70..fcd48f41703 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -29,7 +29,7 @@ "scripts": { "test": "c8 mocha build/test", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", - "lint": "gts fix", + "lint": "gts check", "docs": "jsdoc -c .jsdoc.js", "system-test": "mocha build/system-test", "fix": "gts fix", @@ -39,7 +39,8 @@ "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install" + "prelint": "cd samples; npm link ../; npm install", + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.1.0" diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 3a023fd6912..8d6cd677ec0 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -16,8 +16,8 @@ import synthtool as s import synthtool.gcp as gcp +import synthtool.languages.node as node import logging -import subprocess logging.basicConfig(level=logging.DEBUG) @@ -50,7 +50,4 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) -subprocess.run(['npx', 'compileProtos', 'src']) +node.postprocess_gapic_library() From 38d8148bacc1574b90b0ff529b3ca261f308971a Mon Sep 17 00:00:00 2001 From: Gus Class Date: Mon, 27 Apr 2020 14:17:01 -0700 Subject: [PATCH 204/370] docs(samples): Adds samples used in documentation (#266) --- packages/google-cloud-iot/samples/README.md | 63 ++++++++----------- .../google-cloud-iot/samples/package.json | 16 ++++- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index 30a621cb0a6..9c0a9dbed78 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -1,52 +1,41 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo # [Google Cloud Internet of Things (IoT) Core: Node.js Samples](https://github.com/googleapis/nodejs-iot) -[![Open in Cloud Shell][shell_img]][shell_link] +This folder contains NodeJS samples that demonstrate an overview of the Google +Cloud IoT Core platform. -> Node.js idiomatic client for [Cloud IoT Core][product-docs]. +## Quickstart -[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. +1. Install the Google Cloud SDK as described in [the Cloud IoT Core documentation](https://cloud.google.com/iot/docs/how-tos/getting-started#set_up_the_google_cloud_sdk_and_gcloud). +1. Create a Cloud Pub/Sub topic: -## Table of Contents + gcloud beta pubsub topics create projects/my-iot-project/topics/device-events -* [Before you begin](#before-you-begin) -* [Samples](#samples) - * [Quickstart](#quickstart) +1. Add the service account `cloud-iot@system.gserviceaccount.com` with the role `Publisher` to that + Cloud Pub/Sub topic from the [Cloud Developer Console](https://console.cloud.google.com) + or by setting the `GOOGLE_CLOUD_PROJECT` environment variable and using the + helper script in the `scripts/` folder. -## Before you begin +1. Create a registry: -Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-iot#using-the-client-library). + gcloud iot registries create "your-registry-id" \ + --project= \ + --region=us-central1 \ + --event-notification-config=topic=projects//topics/ -`cd samples` +1. Use the `generate_keys.sh` script to generate your signing keys: -`npm install` + ./scripts/generate_keys.sh -`cd ..` +1. Create a device. -## Samples + gcloud iot devices create my-node-device \ + --project=my-iot-project \ + --region=us-central1 \ + --registry=my-registry \ + --public-key path=rsa_cert.pem,type=rs256 - - -### Quickstart - -View the [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) - -__Usage:__ - - -`node samples/quickstart.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-iot&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/iot +1. Connect a sample device using the sample app in the `mqtt_example` folder. +1. Learn how to manage devices programatically with the sample app in the + `manager` folder. diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index f61449f4b59..87977eb1e2e 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -12,13 +12,23 @@ "repository": "googleapis/nodejs-iot", "private": true, "scripts": { - "test": "mocha --timeout 10000" + "test": "mocha --timeout 60000 manager/system-test/manager.test.js http_example/system-test/cloudiot_http_example.test.js mqtt_example/system-test/cloudiot_mqtt_example.test.js" }, "dependencies": { - "@google-cloud/iot": "^2.0.0" + "@google-cloud/iot": "^2.0.0", + "@google-cloud/pubsub": "^1.6.0", + "googleapis": "^47.0.0" }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^7.0.0" + "hash_file": "^0.1.1", + "jsonwebtoken": "^8.5.0", + "mocha": "^7.1.1", + "mqtt": "^3.0.0", + "request": "^2.88.0", + "retry-request": "^4.0.0", + "tape": "^4.13.0", + "uuid": "^3.3.2", + "yargs": "^15.1.0" } } From 777c4fb97ab9c910a8f18968a950a84b433fdb47 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Apr 2020 09:42:53 -0700 Subject: [PATCH 205/370] docs: regenerated README --- packages/google-cloud-iot/samples/README.md | 63 ++++++++++++--------- packages/google-cloud-iot/synth.metadata | 2 +- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index 9c0a9dbed78..30a621cb0a6 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -1,41 +1,52 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo # [Google Cloud Internet of Things (IoT) Core: Node.js Samples](https://github.com/googleapis/nodejs-iot) -This folder contains NodeJS samples that demonstrate an overview of the Google -Cloud IoT Core platform. +[![Open in Cloud Shell][shell_img]][shell_link] -## Quickstart +> Node.js idiomatic client for [Cloud IoT Core][product-docs]. -1. Install the Google Cloud SDK as described in [the Cloud IoT Core documentation](https://cloud.google.com/iot/docs/how-tos/getting-started#set_up_the_google_cloud_sdk_and_gcloud). -1. Create a Cloud Pub/Sub topic: +[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. - gcloud beta pubsub topics create projects/my-iot-project/topics/device-events +## Table of Contents -1. Add the service account `cloud-iot@system.gserviceaccount.com` with the role `Publisher` to that - Cloud Pub/Sub topic from the [Cloud Developer Console](https://console.cloud.google.com) - or by setting the `GOOGLE_CLOUD_PROJECT` environment variable and using the - helper script in the `scripts/` folder. +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) -1. Create a registry: +## Before you begin - gcloud iot registries create "your-registry-id" \ - --project= \ - --region=us-central1 \ - --event-notification-config=topic=projects//topics/ +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-iot#using-the-client-library). -1. Use the `generate_keys.sh` script to generate your signing keys: +`cd samples` - ./scripts/generate_keys.sh +`npm install` -1. Create a device. +`cd ..` - gcloud iot devices create my-node-device \ - --project=my-iot-project \ - --region=us-central1 \ - --registry=my-registry \ - --public-key path=rsa_cert.pem,type=rs256 +## Samples -1. Connect a sample device using the sample app in the `mqtt_example` folder. -1. Learn how to manage devices programatically with the sample app in the - `manager` folder. + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.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-iot&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/iot diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a74b691f4aa..781a567a5aa 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "73137b64bcd84cc7be2a0effee867e34e88f700e" + "sha": "cc635d6a851a093342f4603574df256ba14643a1" } }, { From 3bdd39d7297c35fa8303d49c8774e3f3cc0ba00f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Apr 2020 19:00:11 +0200 Subject: [PATCH 206/370] fix(deps): update dependency googleapis to v49 (#327) 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 | |---|---|---|---| | [googleapis](https://togithub.com/googleapis/google-api-nodejs-client) | dependencies | major | [`^47.0.0` -> `^49.0.0`](https://renovatebot.com/diffs/npm/googleapis/47.0.0/49.0.0) | --- ### Release Notes
googleapis/google-api-nodejs-client ### [`v49.0.0`](https://togithub.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md#​4900-httpswwwgithubcomgoogleapisgoogle-api-nodejs-clientcomparev4800v4900-2020-04-15) [Compare Source](https://togithub.com/googleapis/google-api-nodejs-client/compare/v48.0.0...v49.0.0) ##### ⚠ BREAKING CHANGES - regenerate the API ([#​2028](https://togithub.com/googleapis/google-api-nodejs-client/issues/2028)) - **dep:** deprecate node 8 ([#​2021](https://togithub.com/googleapis/google-api-nodejs-client/issues/2021)) ##### Features - regenerate the API ([#​2028](https://www.github.com/googleapis/google-api-nodejs-client/issues/2028)) ([fea414a](https://www.github.com/googleapis/google-api-nodejs-client/commit/fea414a450e5702f71c84f40b3e1ab8981ab997e)) ##### Bug Fixes - apache license URL ([#​468](https://www.github.com/googleapis/google-api-nodejs-client/issues/468)) ([#​2017](https://www.github.com/googleapis/google-api-nodejs-client/issues/2017)) ([05090da](https://www.github.com/googleapis/google-api-nodejs-client/commit/05090da6fd417af1a53be83b5d5e59c89ed48e7e)) - **deps:** update common and auth ([#​2038](https://www.github.com/googleapis/google-api-nodejs-client/issues/2038)) ([73d284b](https://www.github.com/googleapis/google-api-nodejs-client/commit/73d284be28a7fdbd6c1b43adc6eee765ea4cad73)) ##### Miscellaneous Chores - **dep:** deprecate node 8 ([#​2021](https://www.github.com/googleapis/google-api-nodejs-client/issues/2021)) ([48a4f05](https://www.github.com/googleapis/google-api-nodejs-client/commit/48a4f051ecb42c592540716284fa6d00d4a9d375)) ### [`v48.0.0`](https://togithub.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md#​4800-httpswwwgithubcomgoogleapisgoogle-api-nodejs-clientcomparev4700v4800-2020-03-11) [Compare Source](https://togithub.com/googleapis/google-api-nodejs-client/compare/v47.0.0...v48.0.0) ##### ⚠ BREAKING CHANGES - removes toolresults_v1. - regenerate all APIs ([#​1978](https://togithub.com/googleapis/google-api-nodejs-client/issues/1978)) ##### Features - regenerate all APIs ([#​1978](https://www.github.com/googleapis/google-api-nodejs-client/issues/1978)) ([f0d4913](https://www.github.com/googleapis/google-api-nodejs-client/commit/f0d49136eaa12838a74a56aa45e08fa870278ae5)) - run the generator (adds: displayvideo, gamesConfiguration, managedidentities, networkmanagement) ([#​1989](https://www.github.com/googleapis/google-api-nodejs-client/issues/1989)) ([8bcb212](https://www.github.com/googleapis/google-api-nodejs-client/commit/8bcb212fbab43a1e3214da4712b4c3363d1b1285)) ##### Bug Fixes - **deps:** update dependency uuid to v7 ([#​1970](https://www.github.com/googleapis/google-api-nodejs-client/issues/1970)) ([fdf096e](https://www.github.com/googleapis/google-api-nodejs-client/commit/fdf096ee80c87a98b7d20666a2e38996228fbaf1)) - allow an empty requestBody to be provided for APIs that support multipart post ([#​1988](https://www.github.com/googleapis/google-api-nodejs-client/issues/1988)) ([074f641](https://www.github.com/googleapis/google-api-nodejs-client/commit/074f6417754930cbcbf5589bbcb88549b9f430a9))
--- ### 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-iot). --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 87977eb1e2e..ac80bb4d81e 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.0.0", "@google-cloud/pubsub": "^1.6.0", - "googleapis": "^47.0.0" + "googleapis": "^49.0.0" }, "devDependencies": { "chai": "^4.2.0", From 744867634519faee0639078ed38e30e758eac950 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Apr 2020 19:16:07 +0200 Subject: [PATCH 207/370] chore(deps): update dependency uuid to v7 (#325) 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 | [`^3.3.2` -> `^7.0.0`](https://renovatebot.com/diffs/npm/uuid/3.4.0/7.0.3) | | [uuid](https://togithub.com/uuidjs/uuid) | dependencies | major | [`^3.3.2` -> `^7.0.0`](https://renovatebot.com/diffs/npm/uuid/3.4.0/7.0.3) | --- ### Release Notes
uuidjs/uuid ### [`v7.0.3`](https://togithub.com/uuidjs/uuid/blob/master/CHANGELOG.md#​703-httpsgithubcomuuidjsuuidcomparev702v703-2020-03-31) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) ### [`v7.0.2`](https://togithub.com/uuidjs/uuid/blob/master/CHANGELOG.md#​702-httpsgithubcomuuidjsuuidcomparev701v702-2020-03-04) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) ### [`v7.0.1`](https://togithub.com/uuidjs/uuid/blob/master/CHANGELOG.md#​701-httpsgithubcomuuidjsuuidcomparev700v701-2020-02-25) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) ### [`v7.0.0`](https://togithub.com/uuidjs/uuid/blob/master/CHANGELOG.md#​700-httpsgithubcomuuidjsuuidcomparev340v700-2020-02-24) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) ##### ⚠ BREAKING CHANGES - The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. - Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. - Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. - Remove support for generating v3 and v5 UUIDs in Node.js<4.x - Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. ##### Features - add UMD build to npm package ([#​357](https://togithub.com/uuidjs/uuid/issues/357)) ([4e75adf](https://togithub.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#​345](https://togithub.com/uuidjs/uuid/issues/345) - add various es module and CommonJS examples ([b238510](https://togithub.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) - ensure that docs are up-to-date in CI ([ee5e77d](https://togithub.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) - hybrid CommonJS & ECMAScript modules build ([a3f078f](https://togithub.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) - remove insecure fallback random number generator ([3a5842b](https://togithub.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#​173](https://togithub.com/uuidjs/uuid/issues/173) - remove support for pre Node.js v4 Buffer API ([#​356](https://togithub.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://togithub.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) - rename repository to github:uuidjs/uuid ([#​351](https://togithub.com/uuidjs/uuid/issues/351)) ([c37a518](https://togithub.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#​338](https://togithub.com/uuidjs/uuid/issues/338) ##### Bug Fixes - add deep-require proxies for local testing and adjust tests ([#​365](https://togithub.com/uuidjs/uuid/issues/365)) ([7fedc79](https://togithub.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) - add note about removal of default export ([#​372](https://togithub.com/uuidjs/uuid/issues/372)) ([12749b7](https://togithub.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#​370](https://togithub.com/uuidjs/uuid/issues/370) - deprecated deep requiring of the different algorithm versions ([#​361](https://togithub.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://togithub.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-iot). --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index ac80bb4d81e..f945ee9037c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -28,7 +28,7 @@ "request": "^2.88.0", "retry-request": "^4.0.0", "tape": "^4.13.0", - "uuid": "^3.3.2", + "uuid": "^7.0.0", "yargs": "^15.1.0" } } From f213344a48117d636a186c568d2a4d74ce98443b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Apr 2020 21:02:07 +0200 Subject: [PATCH 208/370] chore(deps): update dependency mqtt to v4 (#323) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mqtt](https://togithub.com/mqttjs/MQTT.js) | devDependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/mqtt/3.0.0/4.0.0) | | [mqtt](https://togithub.com/mqttjs/MQTT.js) | dependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/mqtt/3.0.0/4.0.0) | --- ### Release Notes
mqttjs/MQTT.js ### [`v4.0.0`](https://togithub.com/mqttjs/MQTT.js/releases/v4.0.0) [Compare Source](https://togithub.com/mqttjs/MQTT.js/compare/v3.0.0...v4.0.0) - refactor: callbacks on end() ([#​1080](https://togithub.com/mqttjs/MQTT.js/issues/1080)) - chore: change workflow to v10-14 and doc fixes ([#​1079](https://togithub.com/mqttjs/MQTT.js/issues/1079)) - feat(client): error handling and test resilience ([#​1076](https://togithub.com/mqttjs/MQTT.js/issues/1076)) - chore: add master branch action ([#​1062](https://togithub.com/mqttjs/MQTT.js/issues/1062)) - chore: istanbul to nyc and uglify-js to uglify-es ([#​1061](https://togithub.com/mqttjs/MQTT.js/issues/1061)) - chore: github actions ([#​1059](https://togithub.com/mqttjs/MQTT.js/issues/1059)) - feat: connection error handler ([#​1053](https://togithub.com/mqttjs/MQTT.js/issues/1053)) - fix: remove only ([#​1058](https://togithub.com/mqttjs/MQTT.js/issues/1058)) - feat: support SNI on TLS ([#​1055](https://togithub.com/mqttjs/MQTT.js/issues/1055)) - chore: tidy up debug logs ([#​1052](https://togithub.com/mqttjs/MQTT.js/issues/1052)) - fix various options definition for ts usage ([#​1043](https://togithub.com/mqttjs/MQTT.js/issues/1043)) - refactor: zuul to airtap for browser testing ([#​1045](https://togithub.com/mqttjs/MQTT.js/issues/1045))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-iot). --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index f945ee9037c..88cd3f7a33c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -24,7 +24,7 @@ "hash_file": "^0.1.1", "jsonwebtoken": "^8.5.0", "mocha": "^7.1.1", - "mqtt": "^3.0.0", + "mqtt": "^4.0.0", "request": "^2.88.0", "retry-request": "^4.0.0", "tape": "^4.13.0", From 5d037c6b3ad1d7ba44d4fdaeb6264c710ea7a13e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 May 2020 06:54:47 +0200 Subject: [PATCH 209/370] chore(deps): update dependency uuid to v8 (#329) 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) | | [uuid](https://togithub.com/uuidjs/uuid) | dependencies | 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 these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-iot). --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 88cd3f7a33c..ec704c89089 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -28,7 +28,7 @@ "request": "^2.88.0", "retry-request": "^4.0.0", "tape": "^4.13.0", - "uuid": "^7.0.0", + "uuid": "^8.0.0", "yargs": "^15.1.0" } } From ba8458e3da9068f9a2a6b9875888f98edb17cbce Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 18:38:43 -0700 Subject: [PATCH 210/370] fix: regenerate unit tests (#333) --- packages/google-cloud-iot/synth.metadata | 14 +-- .../test/gapic_device_manager_v1.ts | 93 ++++++------------- 2 files changed, 33 insertions(+), 74 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 781a567a5aa..85fbda101bf 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "cc635d6a851a093342f4603574df256ba14643a1" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", - "internalRef": "307114445" + "remote": "git@github.com:googleapis/nodejs-iot.git", + "sha": "7ca140e19076ba61234478ffcb2d02e4cc6f816b" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 2723b330599..ec29479b20d 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -299,9 +299,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createDeviceRegistry(request); - }, expectedError); + await assert.rejects(client.createDeviceRegistry(request), expectedError); assert( (client.innerApiCalls.createDeviceRegistry as SinonStub) .getCall(0) @@ -413,9 +411,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getDeviceRegistry(request); - }, expectedError); + await assert.rejects(client.getDeviceRegistry(request), expectedError); assert( (client.innerApiCalls.getDeviceRegistry as SinonStub) .getCall(0) @@ -532,9 +528,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateDeviceRegistry(request); - }, expectedError); + await assert.rejects(client.updateDeviceRegistry(request), expectedError); assert( (client.innerApiCalls.updateDeviceRegistry as SinonStub) .getCall(0) @@ -648,9 +642,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteDeviceRegistry(request); - }, expectedError); + await assert.rejects(client.deleteDeviceRegistry(request), expectedError); assert( (client.innerApiCalls.deleteDeviceRegistry as SinonStub) .getCall(0) @@ -762,9 +754,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createDevice(request); - }, expectedError); + await assert.rejects(client.createDevice(request), expectedError); assert( (client.innerApiCalls.createDevice as SinonStub) .getCall(0) @@ -873,9 +863,7 @@ describe('v1.DeviceManagerClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getDevice(request); - }, expectedError); + await assert.rejects(client.getDevice(request), expectedError); assert( (client.innerApiCalls.getDevice as SinonStub) .getCall(0) @@ -990,9 +978,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateDevice(request); - }, expectedError); + await assert.rejects(client.updateDevice(request), expectedError); assert( (client.innerApiCalls.updateDevice as SinonStub) .getCall(0) @@ -1104,9 +1090,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteDevice(request); - }, expectedError); + await assert.rejects(client.deleteDevice(request), expectedError); assert( (client.innerApiCalls.deleteDevice as SinonStub) .getCall(0) @@ -1220,9 +1204,10 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.modifyCloudToDeviceConfig(request); - }, expectedError); + await assert.rejects( + client.modifyCloudToDeviceConfig(request), + expectedError + ); assert( (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) .getCall(0) @@ -1336,9 +1321,10 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listDeviceConfigVersions(request); - }, expectedError); + await assert.rejects( + client.listDeviceConfigVersions(request), + expectedError + ); assert( (client.innerApiCalls.listDeviceConfigVersions as SinonStub) .getCall(0) @@ -1450,9 +1436,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listDeviceStates(request); - }, expectedError); + await assert.rejects(client.listDeviceStates(request), expectedError); assert( (client.innerApiCalls.listDeviceStates as SinonStub) .getCall(0) @@ -1564,9 +1548,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.setIamPolicy(request); - }, expectedError); + await assert.rejects(client.setIamPolicy(request), expectedError); assert( (client.innerApiCalls.setIamPolicy as SinonStub) .getCall(0) @@ -1678,9 +1660,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getIamPolicy(request); - }, expectedError); + await assert.rejects(client.getIamPolicy(request), expectedError); assert( (client.innerApiCalls.getIamPolicy as SinonStub) .getCall(0) @@ -1794,9 +1774,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.testIamPermissions(request); - }, expectedError); + await assert.rejects(client.testIamPermissions(request), expectedError); assert( (client.innerApiCalls.testIamPermissions as SinonStub) .getCall(0) @@ -1910,9 +1888,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.sendCommandToDevice(request); - }, expectedError); + await assert.rejects(client.sendCommandToDevice(request), expectedError); assert( (client.innerApiCalls.sendCommandToDevice as SinonStub) .getCall(0) @@ -2026,9 +2002,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.bindDeviceToGateway(request); - }, expectedError); + await assert.rejects(client.bindDeviceToGateway(request), expectedError); assert( (client.innerApiCalls.bindDeviceToGateway as SinonStub) .getCall(0) @@ -2142,9 +2116,10 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.unbindDeviceFromGateway(request); - }, expectedError); + await assert.rejects( + client.unbindDeviceFromGateway(request), + expectedError + ); assert( (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) .getCall(0) @@ -2262,9 +2237,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listDeviceRegistries(request); - }, expectedError); + await assert.rejects(client.listDeviceRegistries(request), expectedError); assert( (client.innerApiCalls.listDeviceRegistries as SinonStub) .getCall(0) @@ -2355,9 +2328,7 @@ describe('v1.DeviceManagerClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) .getCall(0) @@ -2556,9 +2527,7 @@ describe('v1.DeviceManagerClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listDevices(request); - }, expectedError); + await assert.rejects(client.listDevices(request), expectedError); assert( (client.innerApiCalls.listDevices as SinonStub) .getCall(0) @@ -2642,9 +2611,7 @@ describe('v1.DeviceManagerClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listDevices.createStream as SinonStub) .getCall(0) From abd8150b449b5eaeea2dadf7880b6a9359f79e40 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 May 2020 22:45:15 +0200 Subject: [PATCH 211/370] fix(deps): update dependency googleapis to v50 (#334) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index ec704c89089..7ff3160b4d1 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.0.0", "@google-cloud/pubsub": "^1.6.0", - "googleapis": "^49.0.0" + "googleapis": "^50.0.0" }, "devDependencies": { "chai": "^4.2.0", From 128d907434a8aff8e98e1f78384d862156e93dc0 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Wed, 6 May 2020 16:48:07 -0700 Subject: [PATCH 212/370] fix: synth.py clean up for multiple version (#335) --- packages/google-cloud-iot/src/index.ts | 6 ++++-- packages/google-cloud-iot/synth.metadata | 12 ++++++++++-- packages/google-cloud-iot/synth.py | 5 +++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/src/index.ts b/packages/google-cloud-iot/src/index.ts index 61507dd22ad..214766df541 100644 --- a/packages/google-cloud-iot/src/index.ts +++ b/packages/google-cloud-iot/src/index.ts @@ -12,12 +12,14 @@ // 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 v1 from './v1'; + const DeviceManagerClient = v1.DeviceManagerClient; + export {v1, DeviceManagerClient}; export default {v1, DeviceManagerClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 85fbda101bf..964d589181d 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,14 +4,22 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "7ca140e19076ba61234478ffcb2d02e4cc6f816b" + "sha": "f4a35b369297d7ff91793f59a0451931d4abff94" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1", + "internalRef": "310168181" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" } } ], diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 8d6cd677ec0..4ef37e61e9b 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -34,7 +34,7 @@ "grpc-service-config": f"google/cloud/iot/{version}/cloudiot_grpc_service_config.json", "package-name": "@google-cloud/iot", "main-service": "iot" - }, + }, proto_path=f'/google/cloud/iot/{version}', extra_proto_files=['google/cloud/common_resources.proto'], version=version) @@ -47,7 +47,8 @@ # Copy common templated files common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') +templates = common_templates.node_library( + source_location='build/src', versions=versions, default_version='v1') s.copy(templates) node.postprocess_gapic_library() From 4e0db01bf22ab8bcdcd2b37dca9f65722044a9d3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 May 2020 11:33:54 -0700 Subject: [PATCH 213/370] build: do not fail builds on codecov errors (#528) (#338) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/13e8b547-7af0-436b-b85e-2c1942f8f36a/targets Source-Link: https://github.com/googleapis/synthtool/commit/be74d3e532faa47eb59f1a0eaebde0860d1d8ab4 --- packages/google-cloud-iot/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 964d589181d..19cdac89a67 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "f4a35b369297d7ff91793f59a0451931d4abff94" + "remote": "https://github.com/googleapis/nodejs-iot.git", + "sha": "a329db210db15e6a34b4fa6cae400b52f62dafa2" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" + "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" } } ], From 21f181f6781874d4faefd83946b7e1129e2b2ece Mon Sep 17 00:00:00 2001 From: Mike <45373284+munkhuushmgl@users.noreply.github.com> Date: Mon, 18 May 2020 10:27:38 -0700 Subject: [PATCH 214/370] chore: corrected async structure [last part] for manager.js (#337) --- packages/google-cloud-iot/samples/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 7ff3160b4d1..dd573f8dddd 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -7,7 +7,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=8" + "node": ">=10" }, "repository": "googleapis/nodejs-iot", "private": true, @@ -17,7 +17,8 @@ "dependencies": { "@google-cloud/iot": "^2.0.0", "@google-cloud/pubsub": "^1.6.0", - "googleapis": "^50.0.0" + "googleapis": "^50.0.0", + "util.promisify": "^1.0.1" }, "devDependencies": { "chai": "^4.2.0", From f4487c9a303bf6e9427ac90232ecb61e0ad42aa9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 May 2020 22:36:12 +0200 Subject: [PATCH 215/370] fix(deps): update dependency googleapis to v51 (#339) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index dd573f8dddd..d20b7766e71 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.0.0", "@google-cloud/pubsub": "^1.6.0", - "googleapis": "^50.0.0", + "googleapis": "^51.0.0", "util.promisify": "^1.0.1" }, "devDependencies": { From e862e88f6199911ab0437b5a053a2a6ece7a1772 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 18 May 2020 20:48:38 +0000 Subject: [PATCH 216/370] chore: release 2.0.1 (#310) :robot: I have created a release \*beep\* \*boop\* --- ### [2.0.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.0...v2.0.1) (2020-05-18) ### Bug Fixes * **deps:** update dependency @google-cloud/iot to v2 ([#326](https://www.github.com/googleapis/nodejs-iot/issues/326)) ([37a9faf](https://www.github.com/googleapis/nodejs-iot/commit/37a9faf5bece0d08b3205baa4e8e4505b07cbd73)) * **deps:** update dependency googleapis to v49 ([#327](https://www.github.com/googleapis/nodejs-iot/issues/327)) ([e1fee34](https://www.github.com/googleapis/nodejs-iot/commit/e1fee342fa0eedb2ec9f0d1c0ed9e20da2b1cd6c)) * regenerate unit tests ([#333](https://www.github.com/googleapis/nodejs-iot/issues/333)) ([f4a35b3](https://www.github.com/googleapis/nodejs-iot/commit/f4a35b369297d7ff91793f59a0451931d4abff94)) * remove unused file, fix synth ([#309](https://www.github.com/googleapis/nodejs-iot/issues/309)) ([17b2ddc](https://www.github.com/googleapis/nodejs-iot/commit/17b2ddccc72a91023a348a0dbf13705670e0c0ca)) * **deps:** update dependency googleapis to v50 ([#334](https://www.github.com/googleapis/nodejs-iot/issues/334)) ([a5b5fcc](https://www.github.com/googleapis/nodejs-iot/commit/a5b5fcccfffe06f4cd3969ba374e67a0f2144add)) * synth.py clean up for multiple version ([#335](https://www.github.com/googleapis/nodejs-iot/issues/335)) ([a329db2](https://www.github.com/googleapis/nodejs-iot/commit/a329db210db15e6a34b4fa6cae400b52f62dafa2)) * **deps:** update dependency googleapis to v51 ([#339](https://www.github.com/googleapis/nodejs-iot/issues/339)) ([70b65b7](https://www.github.com/googleapis/nodejs-iot/commit/70b65b74e803e1fd8cdaed258cbc63f73a110a87)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-iot/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 12398c27484..78de3355f43 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +### [2.0.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.0...v2.0.1) (2020-05-18) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/iot to v2 ([#326](https://www.github.com/googleapis/nodejs-iot/issues/326)) ([37a9faf](https://www.github.com/googleapis/nodejs-iot/commit/37a9faf5bece0d08b3205baa4e8e4505b07cbd73)) +* **deps:** update dependency googleapis to v49 ([#327](https://www.github.com/googleapis/nodejs-iot/issues/327)) ([e1fee34](https://www.github.com/googleapis/nodejs-iot/commit/e1fee342fa0eedb2ec9f0d1c0ed9e20da2b1cd6c)) +* regenerate unit tests ([#333](https://www.github.com/googleapis/nodejs-iot/issues/333)) ([f4a35b3](https://www.github.com/googleapis/nodejs-iot/commit/f4a35b369297d7ff91793f59a0451931d4abff94)) +* remove unused file, fix synth ([#309](https://www.github.com/googleapis/nodejs-iot/issues/309)) ([17b2ddc](https://www.github.com/googleapis/nodejs-iot/commit/17b2ddccc72a91023a348a0dbf13705670e0c0ca)) +* **deps:** update dependency googleapis to v50 ([#334](https://www.github.com/googleapis/nodejs-iot/issues/334)) ([a5b5fcc](https://www.github.com/googleapis/nodejs-iot/commit/a5b5fcccfffe06f4cd3969ba374e67a0f2144add)) +* synth.py clean up for multiple version ([#335](https://www.github.com/googleapis/nodejs-iot/issues/335)) ([a329db2](https://www.github.com/googleapis/nodejs-iot/commit/a329db210db15e6a34b4fa6cae400b52f62dafa2)) +* **deps:** update dependency googleapis to v51 ([#339](https://www.github.com/googleapis/nodejs-iot/issues/339)) ([70b65b7](https://www.github.com/googleapis/nodejs-iot/commit/70b65b74e803e1fd8cdaed258cbc63f73a110a87)) + ## [2.0.0](https://www.github.com/googleapis/nodejs-iot/compare/v1.8.0...v2.0.0) (2020-04-12) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index fcd48f41703..ba697214e36 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index d20b7766e71..4268bb4dfed 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000 manager/system-test/manager.test.js http_example/system-test/cloudiot_http_example.test.js mqtt_example/system-test/cloudiot_mqtt_example.test.js" }, "dependencies": { - "@google-cloud/iot": "^2.0.0", + "@google-cloud/iot": "^2.0.1", "@google-cloud/pubsub": "^1.6.0", "googleapis": "^51.0.0", "util.promisify": "^1.0.1" From b6b3578a2c085989712a4a30c4f67fb70c8d7f3c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 May 2020 03:12:34 +0200 Subject: [PATCH 217/370] fix(deps): update dependency @google-cloud/pubsub to v2 (#341) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 4268bb4dfed..36f7b8c2942 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/iot": "^2.0.1", - "@google-cloud/pubsub": "^1.6.0", + "@google-cloud/pubsub": "^2.0.0", "googleapis": "^51.0.0", "util.promisify": "^1.0.1" }, From 3d236119a77272eb3c4667d0db59b723f57e2e42 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 26 May 2020 18:26:07 -0700 Subject: [PATCH 218/370] build: import in protos/protos.js changed (#340) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e68b2757-435d-4717-8786-35adc2df62d5/targets --- packages/google-cloud-iot/protos/protos.js | 2 +- packages/google-cloud-iot/synth.metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 74e1b52ccb3..a3351b712f6 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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_iot_2_0_0_protos || ($protobuf.roots._google_cloud_iot_2_0_0_protos = {}); + var $root = $protobuf.roots._google_cloud_iot_2_0_1_protos || ($protobuf.roots._google_cloud_iot_2_0_1_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 19cdac89a67..8af5a0b8bd0 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "a329db210db15e6a34b4fa6cae400b52f62dafa2" + "sha": "a1014047d5c58645e16fdf41c49c435d96450795" } }, { From 8a57a12a6e5dd3bcff71530e03ba20083198828d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Jun 2020 02:24:24 +0200 Subject: [PATCH 219/370] fix(deps): update dependency googleapis to v52 (#343) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 36f7b8c2942..6afd4ac02fc 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.0.1", "@google-cloud/pubsub": "^2.0.0", - "googleapis": "^51.0.0", + "googleapis": "^52.0.0", "util.promisify": "^1.0.1" }, "devDependencies": { From c0d841b26a901a754033918fb0214a1f08449a50 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Jun 2020 17:58:12 -0700 Subject: [PATCH 220/370] build: update protos.js (#345) 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 --- packages/google-cloud-iot/protos/protos.d.ts | 6 +++++ packages/google-cloud-iot/protos/protos.js | 26 ++++++++++++++++++-- packages/google-cloud-iot/protos/protos.json | 6 ++++- packages/google-cloud-iot/synth.metadata | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index dcd723ac4a4..a68f247d982 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -5613,6 +5613,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -5654,6 +5657,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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index a3351b712f6..b877223205a 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -13628,6 +13628,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 */ /** @@ -13725,6 +13726,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 @@ -13769,6 +13778,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; }; @@ -13833,6 +13844,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; @@ -13927,6 +13941,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -14049,6 +14066,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; }; @@ -14076,6 +14095,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14097,6 +14117,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; }; @@ -15890,7 +15912,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -16376,7 +16398,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-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index eac8501c631..91e94a8cd0b 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -1375,6 +1375,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -1610,7 +1614,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 8af5a0b8bd0..98f80f246c4 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "a1014047d5c58645e16fdf41c49c435d96450795" + "sha": "79c9222966de82c6d497f8e8e394a2efbdd51f69" } }, { From 674d776563303a9e2fd5901343a3e128599a38d7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2020 18:26:07 +0000 Subject: [PATCH 221/370] chore: release 2.0.2 (#342) :robot: I have created a release \*beep\* \*boop\* --- ### [2.0.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.1...v2.0.2) (2020-06-04) ### Bug Fixes * **deps:** update dependency @google-cloud/pubsub to v2 ([#341](https://www.github.com/googleapis/nodejs-iot/issues/341)) ([81609b8](https://www.github.com/googleapis/nodejs-iot/commit/81609b84406077532f58af70028ccf675fa838f3)) * **deps:** update dependency googleapis to v52 ([#343](https://www.github.com/googleapis/nodejs-iot/issues/343)) ([d26347e](https://www.github.com/googleapis/nodejs-iot/commit/d26347e4b80ac6bff4270442dc9f8e24c7245316)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-iot/CHANGELOG.md | 8 ++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 78de3355f43..0eaeb383d11 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.0.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.1...v2.0.2) (2020-06-04) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/pubsub to v2 ([#341](https://www.github.com/googleapis/nodejs-iot/issues/341)) ([81609b8](https://www.github.com/googleapis/nodejs-iot/commit/81609b84406077532f58af70028ccf675fa838f3)) +* **deps:** update dependency googleapis to v52 ([#343](https://www.github.com/googleapis/nodejs-iot/issues/343)) ([d26347e](https://www.github.com/googleapis/nodejs-iot/commit/d26347e4b80ac6bff4270442dc9f8e24c7245316)) + ### [2.0.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.0...v2.0.1) (2020-05-18) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index ba697214e36..54d4c85de48 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.0.1", + "version": "2.0.2", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 6afd4ac02fc..6736056fc56 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000 manager/system-test/manager.test.js http_example/system-test/cloudiot_http_example.test.js mqtt_example/system-test/cloudiot_mqtt_example.test.js" }, "dependencies": { - "@google-cloud/iot": "^2.0.1", + "@google-cloud/iot": "^2.0.2", "@google-cloud/pubsub": "^2.0.0", "googleapis": "^52.0.0", "util.promisify": "^1.0.1" From cbc7ec31f52e5bdff00f038c754ff3dab4b4144f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:41:06 -0700 Subject: [PATCH 222/370] feat: move ts target to es2018 from es2016 (#348) 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-iot/protos/protos.js | 2 +- packages/google-cloud-iot/src/v1/device_manager_client.ts | 7 +++++++ packages/google-cloud-iot/synth.metadata | 4 ++-- packages/google-cloud-iot/tsconfig.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index b877223205a..792b1e3b5d6 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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_iot_2_0_1_protos || ($protobuf.roots._google_cloud_iot_2_0_1_protos = {}); + var $root = $protobuf.roots._google_cloud_iot_protos || ($protobuf.roots._google_cloud_iot_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index eb4b7d4dbaa..3dbeb5576fb 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -99,6 +99,13 @@ export class DeviceManagerClient { } 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 98f80f246c4..9d2d9319fc3 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "79c9222966de82c6d497f8e8e394a2efbdd51f69" + "sha": "6c8b88f1ef9eba93c6cb0094a4c089a4a71254e9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/packages/google-cloud-iot/tsconfig.json b/packages/google-cloud-iot/tsconfig.json index 613d35597b5..c78f1c884ef 100644 --- a/packages/google-cloud-iot/tsconfig.json +++ b/packages/google-cloud-iot/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From a2145fa679729b69a53705e11dc402d771780ea5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 17:50:07 +0200 Subject: [PATCH 223/370] chore(deps): update dependency mocha to v8 (#350) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | devDependencies | major | [`^7.1.1` -> `^8.0.0`](https://renovatebot.com/diffs/npm/mocha/7.2.0/8.0.1) | | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | dependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/mocha/7.2.0/8.0.1) | --- ### Release Notes
mochajs/mocha ### [`v8.0.1`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​801--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.0.0...v8.0.1) The obligatory patch after a major. #### :bug: Fixes - [#​4328](https://togithub.com/mochajs/mocha/issues/4328): Fix `--parallel` when combined with `--watch` ([**@​boneskull**](https://togithub.com/boneskull)) ### [`v8.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​800--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v7.2.0...v8.0.0) In this major release, Mocha adds the ability to _run tests in parallel_. Better late than never! Please note the **breaking changes** detailed below. Let's welcome [**@​giltayar**](https://togithub.com/giltayar) and [**@​nicojs**](https://togithub.com/nicojs) to the maintenance team! #### :boom: Breaking Changes - [#​4164](https://togithub.com/mochajs/mocha/issues/4164): **Mocha v8.0.0 now requires Node.js v10.0.0 or newer.** Mocha no longer supports the Node.js v8.x line ("Carbon"), which entered End-of-Life at the end of 2019 ([**@​UlisesGascon**](https://togithub.com/UlisesGascon)) - [#​4175](https://togithub.com/mochajs/mocha/issues/4175): Having been deprecated with a warning since v7.0.0, **`mocha.opts` is no longer supported** ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND:** Replace `mocha.opts` with a [configuration file](https://mochajs.org/#configuring-mocha-nodejs). - [#​4260](https://togithub.com/mochajs/mocha/issues/4260): Remove `enableTimeout()` (`this.enableTimeout()`) from the context object ([**@​craigtaub**](https://togithub.com/craigtaub)) :sparkles: **WORKAROUND:** Replace usage of `this.enableTimeout(false)` in your tests with `this.timeout(0)`. - [#​4315](https://togithub.com/mochajs/mocha/issues/4315): The `spec` option no longer supports a comma-delimited list of files ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND**: Use an array instead (e.g., `"spec": "foo.js,bar.js"` becomes `"spec": ["foo.js", "bar.js"]`). - [#​4309](https://togithub.com/mochajs/mocha/issues/4309): Drop support for Node.js v13.x line, which is now End-of-Life ([**@​juergba**](https://togithub.com/juergba)) - [#​4282](https://togithub.com/mochajs/mocha/issues/4282): `--forbid-only` will throw an error even if exclusive tests are avoided via `--grep` or other means ([**@​arvidOtt**](https://togithub.com/arvidOtt)) - [#​4223](https://togithub.com/mochajs/mocha/issues/4223): The context object's `skip()` (`this.skip()`) in a "before all" (`before()`) hook will no longer execute subsequent sibling hooks, in addition to hooks in child suites ([**@​juergba**](https://togithub.com/juergba)) - [#​4178](https://togithub.com/mochajs/mocha/issues/4178): Remove previously soft-deprecated APIs ([**@​wnghdcjfe**](https://togithub.com/wnghdcjfe)): - `Mocha.prototype.ignoreLeaks()` - `Mocha.prototype.useColors()` - `Mocha.prototype.useInlineDiffs()` - `Mocha.prototype.hideDiff()` #### :tada: Enhancements - [#​4245](https://togithub.com/mochajs/mocha/issues/4245): Add ability to run tests in parallel for Node.js (see [docs](https://mochajs.org/#parallel-tests)) ([**@​boneskull**](https://togithub.com/boneskull)) :exclamation: See also [#​4244](https://togithub.com/mochajs/mocha/issues/4244); [Root Hook Plugins (docs)](https://mochajs.org/#root-hook-plugins) -- _root hooks must be defined via Root Hook Plugins to work in parallel mode_ - [#​4304](https://togithub.com/mochajs/mocha/issues/4304): `--require` now works with ES modules ([**@​JacobLey**](https://togithub.com/JacobLey)) - [#​4299](https://togithub.com/mochajs/mocha/issues/4299): In some circumstances, Mocha can run ES modules under Node.js v10 -- _use at your own risk!_ ([**@​giltayar**](https://togithub.com/giltayar)) #### :book: Documentation - [#​4246](https://togithub.com/mochajs/mocha/issues/4246): Add documentation for parallel mode and Root Hook plugins ([**@​boneskull**](https://togithub.com/boneskull)) #### :bug: Fixes (All bug fixes in Mocha v8.0.0 are also breaking changes, and are listed above)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-iot). --- packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 54d4c85de48..185ddaabee1 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -55,7 +55,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^7.0.0", + "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-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 6736056fc56..8726a3191fd 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -24,7 +24,7 @@ "chai": "^4.2.0", "hash_file": "^0.1.1", "jsonwebtoken": "^8.5.0", - "mocha": "^7.1.1", + "mocha": "^8.0.0", "mqtt": "^4.0.0", "request": "^2.88.0", "retry-request": "^4.0.0", From 8026a7df4180e7915fe391999ba5f3dbf3635935 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 10:00:40 -0700 Subject: [PATCH 224/370] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#351) 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-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 9d2d9319fc3..adcbb07d871 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "6c8b88f1ef9eba93c6cb0094a4c089a4a71254e9" + "sha": "e876504a2670481c9263ef56261469463dacad47" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From 48dc57716bf332a905ba0aa1ca65db1a20554844 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 15 Jun 2020 11:20:07 -0700 Subject: [PATCH 225/370] 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/v1/device_manager_client.ts | 13 +++++-------- packages/google-cloud-iot/synth.metadata | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 3dbeb5576fb..3d7fc684c9a 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -108,14 +108,11 @@ export class DeviceManagerClient { // 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 DeviceManagerClient 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index adcbb07d871..6ea7e773600 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "e876504a2670481c9263ef56261469463dacad47" + "sha": "2ddba2e1109842d830cf748371771bf3af789751" } }, { From 5336eb0c05acd00613d982b76ecf88f9b351e3de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 07:48:20 -0700 Subject: [PATCH 226/370] chore: update node issue template (#353) 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-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 6ea7e773600..abbeb06fef3 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "2ddba2e1109842d830cf748371771bf3af789751" + "sha": "3a595f0636429914c5384f02b78f9ef21d9d08d6" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From fc9321ef67ba66538bfb3654a1d5e1415067fb61 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jun 2020 17:47:37 -0700 Subject: [PATCH 227/370] build: add config .gitattributes (#354) 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-iot/.gitattributes | 3 +++ packages/google-cloud-iot/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-iot/.gitattributes diff --git a/packages/google-cloud-iot/.gitattributes b/packages/google-cloud-iot/.gitattributes new file mode 100644 index 00000000000..2e63216ae9c --- /dev/null +++ b/packages/google-cloud-iot/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index abbeb06fef3..0c1e61b3c61 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "3a595f0636429914c5384f02b78f9ef21d9d08d6" + "sha": "cc6d7c2fe6973ce9f0cd3540c83577771e389509" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From 99c3c4ca853798ce632c77a8a6383976576a4c61 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2020 15:01:22 -0700 Subject: [PATCH 228/370] chore: release 2.1.0 (#349) --- packages/google-cloud-iot/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 0eaeb383d11..e1aef7f0612 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [2.1.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.2...v2.1.0) (2020-06-28) + + +### Features + +* move ts target to es2018 from es2016 ([#348](https://www.github.com/googleapis/nodejs-iot/issues/348)) ([e876504](https://www.github.com/googleapis/nodejs-iot/commit/e876504a2670481c9263ef56261469463dacad47)) + + +### Bug Fixes + +* proper fallback option handling ([3a595f0](https://www.github.com/googleapis/nodejs-iot/commit/3a595f0636429914c5384f02b78f9ef21d9d08d6)) + ### [2.0.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.1...v2.0.2) (2020-06-04) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 185ddaabee1..13e7b4be319 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.0.2", + "version": "2.1.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 8726a3191fd..cb1bda724e7 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000 manager/system-test/manager.test.js http_example/system-test/cloudiot_http_example.test.js mqtt_example/system-test/cloudiot_mqtt_example.test.js" }, "dependencies": { - "@google-cloud/iot": "^2.0.2", + "@google-cloud/iot": "^2.1.0", "@google-cloud/pubsub": "^2.0.0", "googleapis": "^52.0.0", "util.promisify": "^1.0.1" From 1881e270b2d3ce498dea76b89b0569d1d22d1a41 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:16:42 -0700 Subject: [PATCH 229/370] build: use bazel build (#355) --- packages/google-cloud-iot/synth.metadata | 18 +++++------------- packages/google-cloud-iot/synth.py | 13 ++----------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 0c1e61b3c61..3bdab605291 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "cc6d7c2fe6973ce9f0cd3540c83577771e389509" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1", - "internalRef": "310168181" + "remote": "git@github.com:googleapis/nodejs-iot.git", + "sha": "ec97cbd41b38547d1a7c0f1ca8c434d1b1a2424b" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -29,8 +21,8 @@ "source": "googleapis", "apiName": "iot", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py index 4ef37e61e9b..e4b0b11fd94 100644 --- a/packages/google-cloud-iot/synth.py +++ b/packages/google-cloud-iot/synth.py @@ -24,20 +24,11 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() versions = ['v1'] for version in versions: - library = gapic.typescript_library( - 'iot', - generator_args={ - "grpc-service-config": f"google/cloud/iot/{version}/cloudiot_grpc_service_config.json", - "package-name": "@google-cloud/iot", - "main-service": "iot" - }, - proto_path=f'/google/cloud/iot/{version}', - extra_proto_files=['google/cloud/common_resources.proto'], - version=version) + library = gapic.node_library('iot', version) # skip index, protos, package.json, and README.md s.copy( From 39d8ab0b3eb34d148e41239a7a0d7c486809c2ad Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 23:26:09 -0700 Subject: [PATCH 230/370] build: typeo in nodejs .gitattribute (#358) 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-iot/.gitattributes | 2 +- packages/google-cloud-iot/synth.metadata | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/.gitattributes b/packages/google-cloud-iot/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/packages/google-cloud-iot/.gitattributes +++ b/packages/google-cloud-iot/.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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 3bdab605291..a36de4616d5 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "ec97cbd41b38547d1a7c0f1ca8c434d1b1a2424b" + "remote": "https://github.com/googleapis/nodejs-iot.git", + "sha": "364a49d84577fdc8ce141a93e5f790788681ec80" + } + }, + { + "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 a6d2e569c1f4083e77569032edaf31ab115a8d54 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jul 2020 18:50:20 +0200 Subject: [PATCH 231/370] chore(deps): update dependency ts-loader to v8 (#357) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 13e7b4be319..918647ca759 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -59,7 +59,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.2", "webpack-cli": "^3.3.10" From 6945a1d1f6e9d2eee643fc8b50efe30cc8a0cafe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jul 2020 18:48:48 +0200 Subject: [PATCH 232/370] chore(deps): update dependency @types/mocha to v8 (#359) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 918647ca759..85c91f839d5 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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.0.0", "@types/sinon": "^9.0.0", "c8": "^7.0.0", From 57ecc848ebe736a5718e00e96cbc1841b15c2f88 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jul 2020 18:02:58 +0200 Subject: [PATCH 233/370] fix(deps): update dependency googleapis to v54 (#360) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index cb1bda724e7..07d957fe0ee 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.1.0", "@google-cloud/pubsub": "^2.0.0", - "googleapis": "^52.0.0", + "googleapis": "^54.0.0", "util.promisify": "^1.0.1" }, "devDependencies": { From 10d6b0aa7fcca8b1b3f945158a6eb7a0b92f71af Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 17:42:18 -0700 Subject: [PATCH 234/370] chore: update generated protos.js (#362) --- packages/google-cloud-iot/protos/protos.js | 24 +++++++++++++++++----- packages/google-cloud-iot/synth.metadata | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 792b1e3b5d6..cdd99753e7b 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -6273,7 +6273,7 @@ Device.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iot.v1.Device(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6325,12 +6325,26 @@ message.logLevel = reader.int32(); break; case 17: - reader.skip().pos++; if (message.metadata === $util.emptyObject) message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[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.metadata[key] = value; break; case 24: message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a36de4616d5..b96b4c025d4 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "364a49d84577fdc8ce141a93e5f790788681ec80" + "sha": "f8cfba17d87b92034803707baf9daafed74f5e1a" } }, { From 1d8943217e500ca1faa454042b1b674cde098451 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 17:56:35 -0700 Subject: [PATCH 235/370] build: missing closing paren in publish script (#363) --- packages/google-cloud-iot/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index b96b4c025d4..e4ab3f1c3f1 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e" } } ], From 8621d7d00d4f223a42e1762bbadfbfe84a26aa73 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2020 10:10:14 -0700 Subject: [PATCH 236/370] chore: release 2.1.1 (#364) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index e1aef7f0612..986ff81f30b 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.1.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.0...v2.1.1) (2020-07-15) + + +### Bug Fixes + +* **deps:** update dependency googleapis to v54 ([#360](https://www.github.com/googleapis/nodejs-iot/issues/360)) ([d4fc58a](https://www.github.com/googleapis/nodejs-iot/commit/d4fc58a9588af800556f884b8e8d3e2418eda94a)) + ## [2.1.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.0.2...v2.1.0) (2020-06-28) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 85c91f839d5..bb3d999e2b5 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.1.0", + "version": "2.1.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 07d957fe0ee..c9c2ca57e10 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000 manager/system-test/manager.test.js http_example/system-test/cloudiot_http_example.test.js mqtt_example/system-test/cloudiot_mqtt_example.test.js" }, "dependencies": { - "@google-cloud/iot": "^2.1.0", + "@google-cloud/iot": "^2.1.1", "@google-cloud/pubsub": "^2.0.0", "googleapis": "^54.0.0", "util.promisify": "^1.0.1" From 4645d3ea315e28f66466c3560d90341b5d03a4bf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 15:10:34 -0700 Subject: [PATCH 237/370] chore: add config files for cloud-rad for node.js, delete Node 8 templates (#368) 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 Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a --- packages/google-cloud-iot/api-extractor.json | 369 +++++++++++++++++++ packages/google-cloud-iot/synth.metadata | 4 +- 2 files changed, 371 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-iot/api-extractor.json diff --git a/packages/google-cloud-iot/api-extractor.json b/packages/google-cloud-iot/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-iot/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index e4ab3f1c3f1..f350f5b81d8 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "f8cfba17d87b92034803707baf9daafed74f5e1a" + "sha": "cb7d09ccadab0ea1cbc8dffb1735f6dadd36bd22" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From 7dbf1b12b95e0db118c9bfe649cbd852dfae2f5c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 18 Jul 2020 17:40:58 +0200 Subject: [PATCH 238/370] chore(deps): update dependency googleapis to v55 (#369) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index c9c2ca57e10..fe1a4b5c68d 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.1.1", "@google-cloud/pubsub": "^2.0.0", - "googleapis": "^54.0.0", + "googleapis": "^55.0.0", "util.promisify": "^1.0.1" }, "devDependencies": { From ae2b66b6a5b3abe356029a1f94c075833c344236 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:43:31 -0400 Subject: [PATCH 239/370] chore: add dev dependencies for cloud-rad ref docs (#370) --- packages/google-cloud-iot/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index bb3d999e2b5..17eb460ff2f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -40,7 +40,9 @@ "compile-protos": "compileProtos src", "prepare": "npm run compile", "prelint": "cd samples; npm link ../; npm install", - "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" @@ -62,6 +64,8 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" + "webpack-cli": "^3.3.10", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" } } From 1b6ff623ce6be14ba5236ae6314a9b8716f21dcc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Jul 2020 22:20:09 -0700 Subject: [PATCH 240/370] build: rename _toc to toc (#371) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/940354f9-15cd-4361-bbf4-dc9af1426979/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f350f5b81d8..cbb6264cbe5 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "cb7d09ccadab0ea1cbc8dffb1735f6dadd36bd22" + "sha": "49beb3147f763d7c3532b2e7ea95b11e63bdf4f5" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], From 5f92ec51333ed4205e294eb104b2f445d12043da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jul 2020 20:06:10 -0700 Subject: [PATCH 241/370] chore: move gitattributes files to node templates (#372) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d43b90cc-a087-4c57-864c-1e4f93292dc6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 --- packages/google-cloud-iot/.gitattributes | 1 + packages/google-cloud-iot/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.gitattributes b/packages/google-cloud-iot/.gitattributes index d4f4169b28b..33739cb74e4 100644 --- a/packages/google-cloud-iot/.gitattributes +++ b/packages/google-cloud-iot/.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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index cbb6264cbe5..bc0faf04133 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "49beb3147f763d7c3532b2e7ea95b11e63bdf4f5" + "sha": "d7ac267f5b110bd38413b978e92d6529c187c44e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" } } ], From 65590136cff0e2cc18eefaf4af8d89fbb7dbffd6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 25 Jul 2020 19:49:29 +0200 Subject: [PATCH 242/370] chore(deps): update dependency googleapis to v56 (#373) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index fe1a4b5c68d..ed875005256 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.1.1", "@google-cloud/pubsub": "^2.0.0", - "googleapis": "^55.0.0", + "googleapis": "^56.0.0", "util.promisify": "^1.0.1" }, "devDependencies": { From 9fac5cdbcf352fe001933081215aeac3a67c7461 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 17:13:26 -0700 Subject: [PATCH 243/370] chore(node): fix kokoro build path for cloud-rad (#375) Source-Author: F. Hinkelmann Source-Date: Wed Jul 29 00:28:42 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa Source-Link: https://github.com/googleapis/synthtool/commit/89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index bc0faf04133..7dc3051c70b 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "d7ac267f5b110bd38413b978e92d6529c187c44e" + "sha": "e55b1bce18fdf6abf72f3fafcd000f70e8d7beca" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From 93e391a5392c5aa4b685422d7fd2441219f37389 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:44:37 -0700 Subject: [PATCH 244/370] build: update protos --- packages/google-cloud-iot/protos/protos.d.ts | 2 +- packages/google-cloud-iot/protos/protos.js | 2 +- packages/google-cloud-iot/synth.metadata | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index a68f247d982..1d36922c143 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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 { diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index cdd99753e7b..9773aecee0e 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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"; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 7dc3051c70b..16324005f78 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "e55b1bce18fdf6abf72f3fafcd000f70e8d7beca" + "sha": "d364f0019ab0f2a671c854edc24e57135b90883f" } }, { From 8abfcb0a8d832b5f9ec0eca3a7aaecb3d0ab4b56 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 31 Jul 2020 09:30:03 -0700 Subject: [PATCH 245/370] docs: add links to the CHANGELOG from the README.md for Java and Node (#378) 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-iot/README.md | 3 +++ packages/google-cloud-iot/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 37b4de1e2df..c8a9d8d63af 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -16,6 +16,9 @@ [Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-iot/blob/master/CHANGELOG.md). + * [Google Cloud Internet of Things (IoT) Core Node.js Client API Reference][client-docs] * [Google Cloud Internet of Things (IoT) Core Documentation][product-docs] * [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 16324005f78..8964bfa3fcc 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "d364f0019ab0f2a671c854edc24e57135b90883f" + "sha": "6dc6d7c7f7baf485a0c9bb5c64319ec35b114a46" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From 27f25e330b4ec3161e3d5afb73c42ce175337b86 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jul 2020 16:03:47 -0700 Subject: [PATCH 246/370] docs(samples): remove apiary lib from samples (#379) --- packages/google-cloud-iot/package.json | 8 ++++---- packages/google-cloud-iot/samples/package.json | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 17eb460ff2f..eec8a849e2b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -48,10 +48,12 @@ "google-gax": "^2.1.0" }, "devDependencies": { + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10", "@types/mocha": "^8.0.0", "@types/node": "^12.0.0", "@types/sinon": "^9.0.0", - "c8": "^7.0.0", + "c8": "^7.2.1", "gts": "^2.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", @@ -64,8 +66,6 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "webpack-cli": "^3.3.10" } } diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index ed875005256..dc4489286f0 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -16,9 +16,7 @@ }, "dependencies": { "@google-cloud/iot": "^2.1.1", - "@google-cloud/pubsub": "^2.0.0", - "googleapis": "^56.0.0", - "util.promisify": "^1.0.1" + "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { "chai": "^4.2.0", From c07df2891f4f4bcb556a25486533adf949e7c1bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 8 Aug 2020 11:36:38 -0700 Subject: [PATCH 247/370] build: --credential-file-override is no longer required (#381) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 8964bfa3fcc..4ad8d868020 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "6dc6d7c7f7baf485a0c9bb5c64319ec35b114a46" + "sha": "c42606aa5b98f83dd7fb1e878b8de5e0b382a35d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From f484aec6830184e6b1de09313af533b0bdbf281a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 11 Aug 2020 22:13:28 -0700 Subject: [PATCH 248/370] build: use gapic-generator-typescript v1.0.7. (#382) This new generator will bring some changes to the generated code across all libraries, but the behavior will only change for nodejs-logging and nodejs-pubsub (those two libraries that use request batching). For other libraries, the changes should be minor (the createApiCall call is simplified) and it should be safe to merge them. Please talk to @alexander-fenster if you have any questions. PiperOrigin-RevId: 325949033 Source-Author: Google APIs Source-Date: Mon Aug 10 21:11:13 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 94006b3cb8d2fb44703cf535da15608eed6bf7db Source-Link: https://github.com/googleapis/googleapis/commit/94006b3cb8d2fb44703cf535da15608eed6bf7db --- packages/google-cloud-iot/src/v1/device_manager_client.ts | 5 ++--- packages/google-cloud-iot/synth.metadata | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 3d7fc684c9a..4c6f9004682 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -267,12 +267,11 @@ export class DeviceManagerClient { } ); + 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 4ad8d868020..0ef07e6c320 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "c42606aa5b98f83dd7fb1e878b8de5e0b382a35d" + "sha": "88666253443952c2b4445573e92df180e8691498" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", - "internalRef": "320300472" + "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", + "internalRef": "325949033" } }, { From 2396f3aee407ab9674f41316a88b5444ca9b63d9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 11 Aug 2020 22:26:03 -0700 Subject: [PATCH 249/370] chore: update cloud rad kokoro build job (#383) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5f7f9c6d-c75a-4c60-8bb8-0026a14cead7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/bd0deaa1113b588d70449535ab9cbf0f2bd0e72f --- packages/google-cloud-iot/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 0ef07e6c320..1e881827749 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" } } ], From 73f652fef4b842c761f5f300ee84fc7169f19f06 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Aug 2020 09:14:21 -0700 Subject: [PATCH 250/370] build: perform publish using Node 12 (#385) 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-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 1e881827749..0aa02cde794 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "88666253443952c2b4445573e92df180e8691498" + "sha": "717b0b905329c48bb3a862ff73984020db71ebc4" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], From 69140fc38bf4c0cd6d221c21ed0461f2caa0dae4 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 17 Aug 2020 17:16:37 -0700 Subject: [PATCH 251/370] refactor: clean up sample test structure (#386) --- packages/google-cloud-iot/samples/.eslintrc.yml | 1 - packages/google-cloud-iot/samples/package.json | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/samples/.eslintrc.yml b/packages/google-cloud-iot/samples/.eslintrc.yml index 0aa37ac630e..282535f55f6 100644 --- a/packages/google-cloud-iot/samples/.eslintrc.yml +++ b/packages/google-cloud-iot/samples/.eslintrc.yml @@ -1,4 +1,3 @@ --- rules: no-console: off - node/no-missing-require: off diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index dc4489286f0..b06999b60a6 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -12,7 +12,7 @@ "repository": "googleapis/nodejs-iot", "private": true, "scripts": { - "test": "mocha --timeout 60000 manager/system-test/manager.test.js http_example/system-test/cloudiot_http_example.test.js mqtt_example/system-test/cloudiot_mqtt_example.test.js" + "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { "@google-cloud/iot": "^2.1.1", @@ -22,11 +22,8 @@ "chai": "^4.2.0", "hash_file": "^0.1.1", "jsonwebtoken": "^8.5.0", - "mocha": "^8.0.0", + "mocha": "^8.1.1", "mqtt": "^4.0.0", - "request": "^2.88.0", - "retry-request": "^4.0.0", - "tape": "^4.13.0", "uuid": "^8.0.0", "yargs": "^15.1.0" } From f89fcdfc4248d048ba4772993f8369e29bcbf5bd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 Aug 2020 22:08:22 -0700 Subject: [PATCH 252/370] chore: start tracking obsolete files --- packages/google-cloud-iot/synth.metadata | 81 ++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 0aa02cde794..17f644bbbdd 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "717b0b905329c48bb3a862ff73984020db71ebc4" + "sha": "7d8bd41418375965a7fbbd4bcc667055329cfc3a" } }, { "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,78 @@ "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.1501047777", + "protos/google/cloud/iot/v1/device_manager.proto", + "protos/google/cloud/iot/v1/resources.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.275963151", + "src/index.ts", + "src/v1/device_manager_client.ts", + "src/v1/device_manager_client_config.json", + "src/v1/device_manager_proto_list.json", + "src/v1/index.ts", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_device_manager_v1.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 0781dd4a213d8c6b68dfe4200c0d5c7dea18c5cb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 Aug 2020 09:34:11 -0700 Subject: [PATCH 253/370] build: move system and samples test from Node 10 to Node 12 (#388) 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-iot/synth.metadata | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 17f644bbbdd..e248e51bca6 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "7d8bd41418375965a7fbbd4bcc667055329cfc3a" + "sha": "fc9f29ac2b4d01a7db6c94f0f06030562cc4466d" } }, { @@ -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.1501047777", "protos/google/cloud/iot/v1/device_manager.proto", "protos/google/cloud/iot/v1/resources.proto", "protos/protos.d.ts", @@ -94,7 +93,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.275963151", "src/index.ts", "src/v1/device_manager_client.ts", "src/v1/device_manager_client_config.json", From f2e51ebdff776763cba352f29abe91c15ce44314 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Aug 2020 20:37:21 -0700 Subject: [PATCH 254/370] build: track flaky tests for "nightly", add new secrets for tagging (#390) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 26 14:28:22 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 8cf6d2834ad14318e64429c3b94f6443ae83daf9 Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- packages/google-cloud-iot/synth.metadata | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index e248e51bca6..5e677eda0cd 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "fc9f29ac2b4d01a7db6c94f0f06030562cc4466d" + "sha": "a454a5876e779976a62590b82083b24b35c78cab" } }, { @@ -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 4073934ffcad5a70739a8aa1028b278b4d36d5f8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Sep 2020 19:04:10 +0200 Subject: [PATCH 255/370] chore(deps): update dependency yargs to v16 (#393) 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)) | devDependencies | major | [`^15.1.0` -> `^16.0.0`](https://renovatebot.com/diffs/npm/yargs/15.4.1/16.0.1) | | [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 these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-iot). --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index b06999b60a6..1f5686321c7 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -25,6 +25,6 @@ "mocha": "^8.1.1", "mqtt": "^4.0.0", "uuid": "^8.0.0", - "yargs": "^15.1.0" + "yargs": "^16.0.0" } } From 26cc21ce097dc21ce0aa5faf3ae290ba18082742 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 11:20:07 -0700 Subject: [PATCH 256/370] build(test): recursively find test files; fail on unsupported dependency versions (#394) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/396d1a63-c8ed-42ae-811f-d2b08d6e2089/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- packages/google-cloud-iot/.mocharc.js | 3 ++- packages/google-cloud-iot/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/.mocharc.js b/packages/google-cloud-iot/.mocharc.js index ff7b34fa5d1..0b600509bed 100644 --- a/packages/google-cloud-iot/.mocharc.js +++ b/packages/google-cloud-iot/.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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 5e677eda0cd..7d7efeaf197 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "a454a5876e779976a62590b82083b24b35c78cab" + "sha": "fe6b2c190c58928e30b102d5bc4ec8a25050852b" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From 8c5d4877ece7d99b84f479fdf2e41e764579f7f7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 19 Oct 2020 15:54:10 -0700 Subject: [PATCH 257/370] chore: update bucket for cloud-rad (#396) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/fca23fa0-3627-48c1-abed-db8e850d5a5a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 7d7efeaf197..61191671778 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "fe6b2c190c58928e30b102d5bc4ec8a25050852b" + "sha": "cd7bf85083bade2f6522d5484fd7635b38344ef6" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From 40a37b3c0e8fbd23b6320331e965d8c97da4af24 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Oct 2020 01:14:06 +0200 Subject: [PATCH 258/370] chore(deps): update dependency webpack-cli to v4 (#399) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | major | [`^3.3.10` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.1.0) | --- ### Release Notes
webpack/webpack-cli ### [`v4.1.0`](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@4.0.0...webpack-cli@4.1.0) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@4.0.0...webpack-cli@4.1.0) ### [`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**: Renovate will not automatically rebase this PR, because other commits have been found. :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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index eec8a849e2b..12af0233b51 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -66,6 +66,6 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" + "webpack-cli": "^4.0.0" } } From e4e17087d78ce507b2d63a97f7866b8779bdcbb4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Oct 2020 08:37:18 -0700 Subject: [PATCH 259/370] build: update to the latest build config (#401) * build(node_library): migrate to Trampoline V2 Source-Author: Takashi Matsuo Source-Date: Fri Oct 2 12:13:27 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 * build: only check --engine-strict for production deps Co-authored-by: Justin Beckwith Source-Author: Benjamin E. Coe Source-Date: Thu Oct 15 17:40:52 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5451633881133e5573cc271a18e73b18caca8b1b Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- packages/google-cloud-iot/synth.metadata | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 61191671778..8c7c597493f 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "cd7bf85083bade2f6522d5484fd7635b38344ef6" + "sha": "94605317f3a8b434da5847fa75e353038b8c3257" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], @@ -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 f8b6d5c0841d3723a209df64ea013adbb722ab7d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 16:48:30 +0200 Subject: [PATCH 260/370] chore(deps): update dependency webpack to v5 (#398) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 12af0233b51..9e1098172b8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -65,7 +65,7 @@ "sinon": "^9.0.1", "ts-loader": "^8.0.0", "typescript": "^3.8.3", - "webpack": "^4.41.2", + "webpack": "^5.0.0", "webpack-cli": "^4.0.0" } } From 5a19c8e39c7a668e36ca48876728d13233b2a3d3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 16:14:29 -0700 Subject: [PATCH 261/370] chore: clean up Node.js TOC for cloud-rad (#402) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/bea77be5-6371-49cb-b1fc-88500cc4fade/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/901ddd44e9ef7887ee681b9183bbdea99437fdcc Source-Link: https://github.com/googleapis/synthtool/commit/f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 8c7c597493f..f9ef21572ff 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "94605317f3a8b434da5847fa75e353038b8c3257" + "sha": "13f3793a22cf4e01066a773a48094da4cd874417" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From 7f17366912b98e2f479b69308042bc824168e4c0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 08:38:36 -0700 Subject: [PATCH 262/370] docs: updated code of conduct (includes update to actions) (#413) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/87546435-a6be-41b1-b439-16b7d6c5df65/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89c849ba5013e45e8fb688b138f33c2ec6083dc5 Source-Link: https://github.com/googleapis/synthtool/commit/a783321fd55f010709294455584a553f4b24b944 Source-Link: https://github.com/googleapis/synthtool/commit/b7413d38b763827c72c0360f0a3d286c84656eeb Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 --- packages/google-cloud-iot/CODE_OF_CONDUCT.md | 123 +++++++++++++------ packages/google-cloud-iot/synth.metadata | 4 +- 2 files changed, 89 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-iot/CODE_OF_CONDUCT.md b/packages/google-cloud-iot/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-cloud-iot/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-iot/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f9ef21572ff..fe4bd701692 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "13f3793a22cf4e01066a773a48094da4cd874417" + "sha": "0f05a18d4facda85735f7b7aafc04584b9234c81" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From 0ecba703cfa87779334db3d9e7469169e98f73f2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 15:58:48 -0800 Subject: [PATCH 263/370] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#414) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/325cd597-d8fe-40d6-aad1-01bd299fa976/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index fe4bd701692..6c9af89d132 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "0f05a18d4facda85735f7b7aafc04584b9234c81" + "sha": "c776e898bbca783045cc7cdf669d2d2e999ac76c" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From d231fcaaaec564a53a6e0b7f00166c4e24aa8dfc Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 17:08:08 -0800 Subject: [PATCH 264/370] fix: do not modify options object, use defaultScopes (#416) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/src/index.ts | 1 + .../src/v1/device_manager_client.ts | 282 +++++++++++------- packages/google-cloud-iot/synth.metadata | 16 +- .../system-test/fixtures/sample/src/index.ts | 9 +- .../google-cloud-iot/system-test/install.ts | 18 +- 6 files changed, 201 insertions(+), 127 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 9e1098172b8..486d027857d 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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": { "@microsoft/api-documenter": "^7.8.10", diff --git a/packages/google-cloud-iot/src/index.ts b/packages/google-cloud-iot/src/index.ts index 214766df541..9d70670fc3d 100644 --- a/packages/google-cloud-iot/src/index.ts +++ b/packages/google-cloud-iot/src/index.ts @@ -19,6 +19,7 @@ import * as v1 from './v1'; const DeviceManagerClient = v1.DeviceManagerClient; +type DeviceManagerClient = v1.DeviceManagerClient; export {v1, DeviceManagerClient}; export default {v1, DeviceManagerClient}; diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 4c6f9004682..0297dca3fc9 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -60,8 +60,10 @@ export class DeviceManagerClient { /** * Construct an instance of DeviceManagerClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -81,42 +83,33 @@ export class DeviceManagerClient { * 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 DeviceManagerClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.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 (!opts) { - opts = {servicePath, port}; + // 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 DeviceManagerClient 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 DeviceManagerClient).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -125,6 +118,11 @@ export class DeviceManagerClient { // 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) { @@ -282,6 +280,7 @@ export class DeviceManagerClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'cloudiot.googleapis.com'; @@ -290,6 +289,7 @@ export class DeviceManagerClient { /** * 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 'cloudiot.googleapis.com'; @@ -297,6 +297,7 @@ export class DeviceManagerClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -305,6 +306,7 @@ export class DeviceManagerClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -317,8 +319,7 @@ export class DeviceManagerClient { 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 @@ -380,7 +381,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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.createDeviceRegistry(request); */ createDeviceRegistry( request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, @@ -465,7 +470,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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.getDeviceRegistry(request); */ getDeviceRegistry( request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, @@ -559,7 +568,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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.updateDeviceRegistry(request); */ updateDeviceRegistry( request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, @@ -648,7 +661,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.deleteDeviceRegistry(request); */ deleteDeviceRegistry( request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, @@ -738,7 +755,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Device]{@link google.cloud.iot.v1.Device}. - * 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.createDevice(request); */ createDevice( request: protos.google.cloud.iot.v1.ICreateDeviceRequest, @@ -823,7 +844,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Device]{@link google.cloud.iot.v1.Device}. - * 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.getDevice(request); */ getDevice( request: protos.google.cloud.iot.v1.IGetDeviceRequest, @@ -911,7 +936,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Device]{@link google.cloud.iot.v1.Device}. - * 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.updateDevice(request); */ updateDevice( request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, @@ -993,7 +1022,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.deleteDevice(request); */ deleteDevice( request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, @@ -1089,7 +1122,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. - * 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.modifyCloudToDeviceConfig(request); */ modifyCloudToDeviceConfig( request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, @@ -1188,7 +1225,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. - * 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.listDeviceConfigVersions(request); */ listDeviceConfigVersions( request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, @@ -1283,7 +1324,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. - * 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.listDeviceStates(request); */ listDeviceStates( request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, @@ -1372,7 +1417,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * 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.setIamPolicy(request); */ setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, @@ -1458,7 +1507,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * 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.getIamPolicy(request); */ getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, @@ -1546,7 +1599,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * 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.testIamPermissions(request); */ testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, @@ -1648,7 +1705,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [SendCommandToDeviceResponse]{@link google.cloud.iot.v1.SendCommandToDeviceResponse}. - * 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.sendCommandToDevice(request); */ sendCommandToDevice( request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, @@ -1738,7 +1799,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. - * 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.bindDeviceToGateway(request); */ bindDeviceToGateway( request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, @@ -1832,7 +1897,11 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. - * 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.unbindDeviceFromGateway(request); */ unbindDeviceFromGateway( request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, @@ -1935,19 +2004,14 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 [ListDeviceRegistriesRequest]{@link google.cloud.iot.v1.ListDeviceRegistriesRequest} - * 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 - * [ListDeviceRegistriesResponse]{@link google.cloud.iot.v1.ListDeviceRegistriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listDeviceRegistriesAsync()` + * 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. */ listDeviceRegistries( request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, @@ -1995,18 +2059,7 @@ export class DeviceManagerClient { } /** - * Equivalent to {@link listDeviceRegistries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDeviceRegistries} 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 @@ -2025,6 +2078,13 @@ export class DeviceManagerClient { * 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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry} 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 `listDeviceRegistriesAsync()` + * 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. */ listDeviceRegistriesStream( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, @@ -2049,10 +2109,9 @@ export class DeviceManagerClient { } /** - * Equivalent to {@link listDeviceRegistries}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listDeviceRegistries`, 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 @@ -2070,7 +2129,18 @@ export class DeviceManagerClient { * @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 + * [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. 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.listDeviceRegistriesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listDeviceRegistriesAsync( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, @@ -2154,19 +2224,14 @@ export class DeviceManagerClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Device]{@link google.cloud.iot.v1.Device}. - * 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 [Device]{@link google.cloud.iot.v1.Device} 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 [ListDevicesRequest]{@link google.cloud.iot.v1.ListDevicesRequest} - * 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 - * [ListDevicesResponse]{@link google.cloud.iot.v1.ListDevicesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listDevicesAsync()` + * 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. */ listDevices( request: protos.google.cloud.iot.v1.IListDevicesRequest, @@ -2210,18 +2275,7 @@ export class DeviceManagerClient { } /** - * Equivalent to {@link listDevices}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDevices} 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 @@ -2252,6 +2306,13 @@ export class DeviceManagerClient { * 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 [Device]{@link google.cloud.iot.v1.Device} 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 `listDevicesAsync()` + * 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. */ listDevicesStream( request?: protos.google.cloud.iot.v1.IListDevicesRequest, @@ -2276,10 +2337,9 @@ export class DeviceManagerClient { } /** - * Equivalent to {@link listDevices}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listDevices`, 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 @@ -2309,7 +2369,18 @@ export class DeviceManagerClient { * @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 + * [Device]{@link google.cloud.iot.v1.Device}. 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.listDevicesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listDevicesAsync( request?: protos.google.cloud.iot.v1.IListDevicesRequest, @@ -2490,9 +2561,10 @@ export class DeviceManagerClient { } /** - * 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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 6c9af89d132..6355ebc4dc6 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "c776e898bbca783045cc7cdf669d2d2e999ac76c" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "remote": "git@github.com:googleapis/nodejs-iot.git", + "sha": "6e416f7f428f1d653f9364a051d468c607fe2d91" } }, { "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.1462975402", "protos/google/cloud/iot/v1/device_manager.proto", "protos/google/cloud/iot/v1/resources.proto", "protos/protos.d.ts", @@ -94,6 +87,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.1264602173", "src/index.ts", "src/v1/device_manager_client.ts", "src/v1/device_manager_client_config.json", diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts index de567211b7a..132427711c8 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,15 @@ import {DeviceManagerClient} from '@google-cloud/iot'; +// check that the client class type name can be used +function doStuffWithDeviceManagerClient(client: DeviceManagerClient) { + client.close(); +} + function main() { - new DeviceManagerClient(); + // check that the client instance can be created + const deviceManagerClient = new DeviceManagerClient(); + doStuffWithDeviceManagerClient(deviceManagerClient); } main(); diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/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 b24d23cd3b5a48b7b314f509f8aee19379999154 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 09:20:04 -0800 Subject: [PATCH 265/370] chore: release 2.1.2 (#404) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 8 ++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 986ff81f30b..ec0bb90ac73 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.1.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.1...v2.1.2) (2020-11-07) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#416](https://www.github.com/googleapis/nodejs-iot/issues/416)) ([00bf691](https://www.github.com/googleapis/nodejs-iot/commit/00bf691f327f596effc67679b1fb05f6614b57fe)) +* **deps:** update dependency gaxios to v4 ([#403](https://www.github.com/googleapis/nodejs-iot/issues/403)) ([0f05a18](https://www.github.com/googleapis/nodejs-iot/commit/0f05a18d4facda85735f7b7aafc04584b9234c81)) + ### [2.1.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.0...v2.1.1) (2020-07-15) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 486d027857d..bcf80ee3d53 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.1.1", + "version": "2.1.2", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 1f5686321c7..3728c33c28d 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.1.1", + "@google-cloud/iot": "^2.1.2", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From 462e1aa3dc3d7b84ca5a33f4fa53ba4b7be48671 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 12:28:13 -0800 Subject: [PATCH 266/370] fix(browser): check for fetch on window --- packages/google-cloud-iot/protos/protos.json | 316 ++++++++++++++++-- .../src/v1/device_manager_client.ts | 214 ++++++------ packages/google-cloud-iot/synth.metadata | 14 +- 3 files changed, 415 insertions(+), 129 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 91e94a8cd0b..337364e5a13 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -28,7 +28,18 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/registries", "(google.api.http).body": "device_registry", "(google.api.method_signature)": "parent,device_registry" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/registries", + "body": "device_registry" + } + }, + { + "(google.api.method_signature)": "parent,device_registry" + } + ] }, "GetDeviceRegistry": { "requestType": "GetDeviceRegistryRequest", @@ -36,7 +47,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/registries/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateDeviceRegistry": { "requestType": "UpdateDeviceRegistryRequest", @@ -45,7 +66,18 @@ "(google.api.http).patch": "/v1/{device_registry.name=projects/*/locations/*/registries/*}", "(google.api.http).body": "device_registry", "(google.api.method_signature)": "device_registry,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{device_registry.name=projects/*/locations/*/registries/*}", + "body": "device_registry" + } + }, + { + "(google.api.method_signature)": "device_registry,update_mask" + } + ] }, "DeleteDeviceRegistry": { "requestType": "DeleteDeviceRegistryRequest", @@ -53,7 +85,17 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/registries/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListDeviceRegistries": { "requestType": "ListDeviceRegistriesRequest", @@ -61,7 +103,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/registries", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/registries" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "CreateDevice": { "requestType": "CreateDeviceRequest", @@ -70,7 +122,18 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*/registries/*}/devices", "(google.api.http).body": "device", "(google.api.method_signature)": "parent,device" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/registries/*}/devices", + "body": "device" + } + }, + { + "(google.api.method_signature)": "parent,device" + } + ] }, "GetDevice": { "requestType": "GetDeviceRequest", @@ -79,7 +142,20 @@ "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateDevice": { "requestType": "UpdateDeviceRequest", @@ -90,7 +166,22 @@ "(google.api.http).additional_bindings.patch": "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}", "(google.api.http).additional_bindings.body": "device", "(google.api.method_signature)": "device,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}", + "body": "device", + "additional_bindings": { + "patch": "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}", + "body": "device" + } + } + }, + { + "(google.api.method_signature)": "device,update_mask" + } + ] }, "DeleteDevice": { "requestType": "DeleteDeviceRequest", @@ -98,7 +189,17 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/registries/*/devices/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListDevices": { "requestType": "ListDevicesRequest", @@ -107,7 +208,20 @@ "(google.api.http).get": "/v1/{parent=projects/*/locations/*/registries/*}/devices", "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/registries/*}/devices", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "ModifyCloudToDeviceConfig": { "requestType": "ModifyCloudToDeviceConfigRequest", @@ -118,7 +232,22 @@ "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "name,binary_data" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,binary_data" + } + ] }, "ListDeviceConfigVersions": { "requestType": "ListDeviceConfigVersionsRequest", @@ -127,7 +256,20 @@ "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions", "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListDeviceStates": { "requestType": "ListDeviceStatesRequest", @@ -136,7 +278,20 @@ "(google.api.http).get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states", "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "SetIamPolicy": { "requestType": "google.iam.v1.SetIamPolicyRequest", @@ -147,7 +302,22 @@ "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] }, "GetIamPolicy": { "requestType": "google.iam.v1.GetIamPolicyRequest", @@ -158,7 +328,22 @@ "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource" + } + ] }, "TestIamPermissions": { "requestType": "google.iam.v1.TestIamPermissionsRequest", @@ -169,7 +354,22 @@ "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,permissions" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] }, "SendCommandToDevice": { "requestType": "SendCommandToDeviceRequest", @@ -180,7 +380,25 @@ "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "name,binary_data,subfolder" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,binary_data" + }, + { + "(google.api.method_signature)": "name,binary_data,subfolder" + } + ] }, "BindDeviceToGateway": { "requestType": "BindDeviceToGatewayRequest", @@ -191,7 +409,22 @@ "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "parent,gateway_id,device_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent,gateway_id,device_id" + } + ] }, "UnbindDeviceFromGateway": { "requestType": "UnbindDeviceFromGatewayRequest", @@ -202,7 +435,22 @@ "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "parent,gateway_id,device_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent,gateway_id,device_id" + } + ] } } }, @@ -2138,7 +2386,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] }, "GetIamPolicy": { "requestType": "GetIamPolicyRequest", @@ -2146,7 +2402,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] }, "TestIamPermissions": { "requestType": "TestIamPermissionsRequest", @@ -2154,7 +2418,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] } } }, diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 0297dca3fc9..69cf3b048b1 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_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/v1/device_manager_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './device_manager_client_config.json'; const version = require('../../../package.json').version; @@ -83,9 +89,9 @@ export class DeviceManagerClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -98,7 +104,9 @@ export class DeviceManagerClient { 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. @@ -336,7 +344,7 @@ export class DeviceManagerClient { // ------------------- createDeviceRegistry( request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDeviceRegistry, @@ -346,7 +354,7 @@ export class DeviceManagerClient { >; createDeviceRegistry( request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDeviceRegistry, | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest @@ -390,7 +398,7 @@ export class DeviceManagerClient { createDeviceRegistry( request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDeviceRegistry, | protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest @@ -413,12 +421,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -433,7 +441,7 @@ export class DeviceManagerClient { } getDeviceRegistry( request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDeviceRegistry, @@ -443,7 +451,7 @@ export class DeviceManagerClient { >; getDeviceRegistry( request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDeviceRegistry, protos.google.cloud.iot.v1.IGetDeviceRegistryRequest | null | undefined, @@ -479,7 +487,7 @@ export class DeviceManagerClient { getDeviceRegistry( request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDeviceRegistry, | protos.google.cloud.iot.v1.IGetDeviceRegistryRequest @@ -500,12 +508,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -520,7 +528,7 @@ export class DeviceManagerClient { } updateDeviceRegistry( request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDeviceRegistry, @@ -530,7 +538,7 @@ export class DeviceManagerClient { >; updateDeviceRegistry( request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDeviceRegistry, | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest @@ -577,7 +585,7 @@ export class DeviceManagerClient { updateDeviceRegistry( request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDeviceRegistry, | protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest @@ -600,12 +608,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -620,7 +628,7 @@ export class DeviceManagerClient { } deleteDeviceRegistry( request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -630,7 +638,7 @@ export class DeviceManagerClient { >; deleteDeviceRegistry( request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest @@ -670,7 +678,7 @@ export class DeviceManagerClient { deleteDeviceRegistry( request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest @@ -693,12 +701,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -713,7 +721,7 @@ export class DeviceManagerClient { } createDevice( request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDevice, @@ -723,7 +731,7 @@ export class DeviceManagerClient { >; createDevice( request: protos.google.cloud.iot.v1.ICreateDeviceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDevice, protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, @@ -764,7 +772,7 @@ export class DeviceManagerClient { createDevice( request: protos.google.cloud.iot.v1.ICreateDeviceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDevice, protos.google.cloud.iot.v1.ICreateDeviceRequest | null | undefined, @@ -783,12 +791,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -803,7 +811,7 @@ export class DeviceManagerClient { } getDevice( request: protos.google.cloud.iot.v1.IGetDeviceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDevice, @@ -813,7 +821,7 @@ export class DeviceManagerClient { >; getDevice( request: protos.google.cloud.iot.v1.IGetDeviceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDevice, protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, @@ -853,7 +861,7 @@ export class DeviceManagerClient { getDevice( request: protos.google.cloud.iot.v1.IGetDeviceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDevice, protos.google.cloud.iot.v1.IGetDeviceRequest | null | undefined, @@ -872,12 +880,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -892,7 +900,7 @@ export class DeviceManagerClient { } updateDevice( request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDevice, @@ -902,7 +910,7 @@ export class DeviceManagerClient { >; updateDevice( request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDevice, protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, @@ -945,7 +953,7 @@ export class DeviceManagerClient { updateDevice( request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDevice, protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, @@ -964,12 +972,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -984,7 +992,7 @@ export class DeviceManagerClient { } deleteDevice( request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -994,7 +1002,7 @@ export class DeviceManagerClient { >; deleteDevice( request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, @@ -1031,7 +1039,7 @@ export class DeviceManagerClient { deleteDevice( request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.cloud.iot.v1.IDeleteDeviceRequest | null | undefined, @@ -1050,12 +1058,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1070,7 +1078,7 @@ export class DeviceManagerClient { } modifyCloudToDeviceConfig( request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDeviceConfig, @@ -1080,7 +1088,7 @@ export class DeviceManagerClient { >; modifyCloudToDeviceConfig( request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IDeviceConfig, | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest @@ -1131,7 +1139,7 @@ export class DeviceManagerClient { modifyCloudToDeviceConfig( request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IDeviceConfig, | protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest @@ -1154,12 +1162,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1178,7 +1186,7 @@ export class DeviceManagerClient { } listDeviceConfigVersions( request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, @@ -1188,7 +1196,7 @@ export class DeviceManagerClient { >; listDeviceConfigVersions( request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest @@ -1234,7 +1242,7 @@ export class DeviceManagerClient { listDeviceConfigVersions( request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IListDeviceConfigVersionsResponse, | protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest @@ -1257,12 +1265,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1281,7 +1289,7 @@ export class DeviceManagerClient { } listDeviceStates( request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IListDeviceStatesResponse, @@ -1291,7 +1299,7 @@ export class DeviceManagerClient { >; listDeviceStates( request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IListDeviceStatesResponse, protos.google.cloud.iot.v1.IListDeviceStatesRequest | null | undefined, @@ -1333,7 +1341,7 @@ export class DeviceManagerClient { listDeviceStates( request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IListDeviceStatesResponse, | protos.google.cloud.iot.v1.IListDeviceStatesRequest @@ -1354,12 +1362,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1374,7 +1382,7 @@ export class DeviceManagerClient { } setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -1384,7 +1392,7 @@ export class DeviceManagerClient { >; setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -1426,7 +1434,7 @@ export class DeviceManagerClient { setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -1445,12 +1453,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1465,7 +1473,7 @@ export class DeviceManagerClient { } getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -1475,7 +1483,7 @@ export class DeviceManagerClient { >; getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -1516,7 +1524,7 @@ export class DeviceManagerClient { getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -1535,12 +1543,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1555,7 +1563,7 @@ export class DeviceManagerClient { } testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.ITestIamPermissionsResponse, @@ -1565,7 +1573,7 @@ export class DeviceManagerClient { >; testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -1608,7 +1616,7 @@ export class DeviceManagerClient { testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -1627,12 +1635,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1647,7 +1655,7 @@ export class DeviceManagerClient { } sendCommandToDevice( request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, @@ -1657,7 +1665,7 @@ export class DeviceManagerClient { >; sendCommandToDevice( request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, @@ -1714,7 +1722,7 @@ export class DeviceManagerClient { sendCommandToDevice( request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, | protos.google.cloud.iot.v1.ISendCommandToDeviceRequest @@ -1735,12 +1743,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1755,7 +1763,7 @@ export class DeviceManagerClient { } bindDeviceToGateway( request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, @@ -1765,7 +1773,7 @@ export class DeviceManagerClient { >; bindDeviceToGateway( request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest | null | undefined, @@ -1808,7 +1816,7 @@ export class DeviceManagerClient { bindDeviceToGateway( request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IBindDeviceToGatewayResponse, | protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest @@ -1829,12 +1837,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1849,7 +1857,7 @@ export class DeviceManagerClient { } unbindDeviceFromGateway( request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, @@ -1859,7 +1867,7 @@ export class DeviceManagerClient { >; unbindDeviceFromGateway( request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest @@ -1906,7 +1914,7 @@ export class DeviceManagerClient { unbindDeviceFromGateway( request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayResponse, | protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest @@ -1929,12 +1937,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -1954,7 +1962,7 @@ export class DeviceManagerClient { listDeviceRegistries( request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDeviceRegistry[], @@ -1964,7 +1972,7 @@ export class DeviceManagerClient { >; listDeviceRegistries( request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse @@ -2016,7 +2024,7 @@ export class DeviceManagerClient { listDeviceRegistries( request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, | protos.google.cloud.iot.v1.IListDeviceRegistriesResponse @@ -2039,12 +2047,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -2088,7 +2096,7 @@ export class DeviceManagerClient { */ listDeviceRegistriesStream( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2144,7 +2152,7 @@ export class DeviceManagerClient { */ listDeviceRegistriesAsync( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2166,7 +2174,7 @@ export class DeviceManagerClient { } listDevices( request: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.iot.v1.IDevice[], @@ -2176,7 +2184,7 @@ export class DeviceManagerClient { >; listDevices( request: protos.google.cloud.iot.v1.IListDevicesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.iot.v1.IListDevicesRequest, protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, @@ -2236,7 +2244,7 @@ export class DeviceManagerClient { listDevices( request: protos.google.cloud.iot.v1.IListDevicesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.iot.v1.IListDevicesRequest, protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, @@ -2255,12 +2263,12 @@ export class DeviceManagerClient { ] > | 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 || {}; @@ -2316,7 +2324,7 @@ export class DeviceManagerClient { */ listDevicesStream( request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2384,7 +2392,7 @@ export class DeviceManagerClient { */ listDevicesAsync( request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 6355ebc4dc6..41154af5694 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "6e416f7f428f1d653f9364a051d468c607fe2d91" + "remote": "https://github.com/googleapis/nodejs-iot.git", + "sha": "c10e50e443b788d1e4a476a550484484f887f367" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", + "internalRef": "343202295" } }, { @@ -79,7 +87,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.1462975402", "protos/google/cloud/iot/v1/device_manager.proto", "protos/google/cloud/iot/v1/resources.proto", "protos/protos.d.ts", @@ -87,7 +94,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.1264602173", "src/index.ts", "src/v1/device_manager_client.ts", "src/v1/device_manager_client_config.json", From a652df6f68e6d1c3658747b75110a533af5e18fe Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:34:13 -0800 Subject: [PATCH 267/370] docs: spelling correction for "targetting" (#420) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4ae6b577-4a5f-4ba7-885b-7384aaed05b5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- packages/google-cloud-iot/README.md | 2 +- packages/google-cloud-iot/synth.metadata | 76 +----------------------- 2 files changed, 3 insertions(+), 75 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index c8a9d8d63af..4f75eacfdcc 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -98,7 +98,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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 41154af5694..25dc3d168a5 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "c10e50e443b788d1e4a476a550484484f887f367" + "sha": "84ca7b6f4d6a696713e02a1f9d4b3aebb30a5589" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -33,77 +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/cloud/iot/v1/device_manager.proto", - "protos/google/cloud/iot/v1/resources.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v1/device_manager_client.ts", - "src/v1/device_manager_client_config.json", - "src/v1/device_manager_proto_list.json", - "src/v1/index.ts", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_device_manager_v1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From 9adef3f4a774f386ffe83568385c5dfc83074e28 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:22 +0000 Subject: [PATCH 268/370] chore: release 2.1.3 (#419) :robot: I have created a release \*beep\* \*boop\* --- ### [2.1.3](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.2...v2.1.3) (2020-11-25) ### Bug Fixes * **browser:** check for fetch on window ([84ca7b6](https://www.github.com/googleapis/nodejs-iot/commit/84ca7b6f4d6a696713e02a1f9d4b3aebb30a5589)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index ec0bb90ac73..763f3cc38c9 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.1.3](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.2...v2.1.3) (2020-11-25) + + +### Bug Fixes + +* **browser:** check for fetch on window ([84ca7b6](https://www.github.com/googleapis/nodejs-iot/commit/84ca7b6f4d6a696713e02a1f9d4b3aebb30a5589)) + ### [2.1.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.1...v2.1.2) (2020-11-07) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index bcf80ee3d53..63cb1a7786d 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.1.2", + "version": "2.1.3", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 3728c33c28d..07755b9a6b5 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.1.2", + "@google-cloud/iot": "^2.1.3", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From be437ba3c59a5c7ab784e99d11d5555f1be409a8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:56:21 -0800 Subject: [PATCH 269/370] chore: generate GAPIC metadata JSON file (#421) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4e7abbc6-c648-4473-9499-aa96f63c63a8/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../src/v1/gapic_metadata.json | 221 ++++++++++++++++++ packages/google-cloud-iot/synth.metadata | 6 +- 2 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-iot/src/v1/gapic_metadata.json diff --git a/packages/google-cloud-iot/src/v1/gapic_metadata.json b/packages/google-cloud-iot/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..28ab3c5db9b --- /dev/null +++ b/packages/google-cloud-iot/src/v1/gapic_metadata.json @@ -0,0 +1,221 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.iot.v1", + "libraryPackage": "@google-cloud/iot", + "services": { + "DeviceManager": { + "clients": { + "grpc": { + "libraryClient": "DeviceManagerClient", + "rpcs": { + "CreateDeviceRegistry": { + "methods": [ + "createDeviceRegistry" + ] + }, + "GetDeviceRegistry": { + "methods": [ + "getDeviceRegistry" + ] + }, + "UpdateDeviceRegistry": { + "methods": [ + "updateDeviceRegistry" + ] + }, + "DeleteDeviceRegistry": { + "methods": [ + "deleteDeviceRegistry" + ] + }, + "CreateDevice": { + "methods": [ + "createDevice" + ] + }, + "GetDevice": { + "methods": [ + "getDevice" + ] + }, + "UpdateDevice": { + "methods": [ + "updateDevice" + ] + }, + "DeleteDevice": { + "methods": [ + "deleteDevice" + ] + }, + "ModifyCloudToDeviceConfig": { + "methods": [ + "modifyCloudToDeviceConfig" + ] + }, + "ListDeviceConfigVersions": { + "methods": [ + "listDeviceConfigVersions" + ] + }, + "ListDeviceStates": { + "methods": [ + "listDeviceStates" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "SendCommandToDevice": { + "methods": [ + "sendCommandToDevice" + ] + }, + "BindDeviceToGateway": { + "methods": [ + "bindDeviceToGateway" + ] + }, + "UnbindDeviceFromGateway": { + "methods": [ + "unbindDeviceFromGateway" + ] + }, + "ListDeviceRegistries": { + "methods": [ + "listDeviceRegistries", + "listDeviceRegistriesStream", + "listDeviceRegistriesAsync" + ] + }, + "ListDevices": { + "methods": [ + "listDevices", + "listDevicesStream", + "listDevicesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DeviceManagerClient", + "rpcs": { + "CreateDeviceRegistry": { + "methods": [ + "createDeviceRegistry" + ] + }, + "GetDeviceRegistry": { + "methods": [ + "getDeviceRegistry" + ] + }, + "UpdateDeviceRegistry": { + "methods": [ + "updateDeviceRegistry" + ] + }, + "DeleteDeviceRegistry": { + "methods": [ + "deleteDeviceRegistry" + ] + }, + "CreateDevice": { + "methods": [ + "createDevice" + ] + }, + "GetDevice": { + "methods": [ + "getDevice" + ] + }, + "UpdateDevice": { + "methods": [ + "updateDevice" + ] + }, + "DeleteDevice": { + "methods": [ + "deleteDevice" + ] + }, + "ModifyCloudToDeviceConfig": { + "methods": [ + "modifyCloudToDeviceConfig" + ] + }, + "ListDeviceConfigVersions": { + "methods": [ + "listDeviceConfigVersions" + ] + }, + "ListDeviceStates": { + "methods": [ + "listDeviceStates" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "SendCommandToDevice": { + "methods": [ + "sendCommandToDevice" + ] + }, + "BindDeviceToGateway": { + "methods": [ + "bindDeviceToGateway" + ] + }, + "UnbindDeviceFromGateway": { + "methods": [ + "unbindDeviceFromGateway" + ] + }, + "ListDeviceRegistries": { + "methods": [ + "listDeviceRegistries", + "listDeviceRegistriesStream", + "listDeviceRegistriesAsync" + ] + }, + "ListDevices": { + "methods": [ + "listDevices", + "listDevicesStream", + "listDevicesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 25dc3d168a5..8f488f5b8e9 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "84ca7b6f4d6a696713e02a1f9d4b3aebb30a5589" + "sha": "9b3e46869005647261814d196dd7abaeb609d40e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", - "internalRef": "343202295" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From fb66b769cb117f3cfe10ebb52fc1c526cf1bf78d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:44:07 -0800 Subject: [PATCH 270/370] docs: add instructions for authenticating for system tests (#424) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/910b6b4c-44a8-42e1-939c-9018f9008df4/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- packages/google-cloud-iot/CONTRIBUTING.md | 15 +++++++++++++-- packages/google-cloud-iot/README.md | 3 +-- packages/google-cloud-iot/synth.metadata | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/CONTRIBUTING.md b/packages/google-cloud-iot/CONTRIBUTING.md index f6c4cf010e3..96559873505 100644 --- a/packages/google-cloud-iot/CONTRIBUTING.md +++ b/packages/google-cloud-iot/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 Google Cloud Internet of Things (IoT) Core 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=cloudiot.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 4f75eacfdcc..e6ff0f84271 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -80,8 +80,7 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-iot/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-iot/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 8f488f5b8e9..47e218ed36d 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "9b3e46869005647261814d196dd7abaeb609d40e" + "sha": "3ff6812dddfaa01447344599db055c8a8f64c522" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 20ae506e32e92984f36c4ca2d44069ee48b5aa47 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Jan 2021 11:42:12 -0800 Subject: [PATCH 271/370] docs: update dates (#425) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/29069528-f186-4ec9-92b5-d225fd8530ec/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-iot/.jsdoc.js | 4 ++-- packages/google-cloud-iot/protos/protos.d.ts | 2 +- packages/google-cloud-iot/protos/protos.js | 2 +- packages/google-cloud-iot/src/v1/device_manager_client.ts | 2 +- packages/google-cloud-iot/src/v1/index.ts | 2 +- packages/google-cloud-iot/synth.metadata | 2 +- .../google-cloud-iot/system-test/fixtures/sample/src/index.js | 2 +- .../google-cloud-iot/system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-iot/system-test/install.ts | 2 +- packages/google-cloud-iot/test/gapic_device_manager_v1.ts | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index fc2efcbc8c7..245e44837a6 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.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/iot', diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 1d36922c143..b7f53bb9311 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 9773aecee0e..721c7edaf1d 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 69cf3b048b1..0cc30c1c095 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_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-iot/src/v1/index.ts b/packages/google-cloud-iot/src/v1/index.ts index bdf9d31851c..803202a8790 100644 --- a/packages/google-cloud-iot/src/v1/index.ts +++ b/packages/google-cloud-iot/src/v1/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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 47e218ed36d..a0331d852f6 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "3ff6812dddfaa01447344599db055c8a8f64c522" + "sha": "86326838ac2b1e1a4ac71af70abb5d0fc31c7d65" } }, { diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index a2565258670..30c4d6bd5b9 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-iot/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-iot/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts index 132427711c8..67aa27d2150 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-iot/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-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/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-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index ec29479b20d..9f680ad40c1 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.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 4cb4861175fcfe9b130abe3f5367cf9e404b4071 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:40:26 -0800 Subject: [PATCH 272/370] feat: adds style enumeration (#426) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/6097b27f-11d0-4351-8f36-1ff5504fc384/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-iot/protos/protos.d.ts | 12 +++ packages/google-cloud-iot/protos/protos.js | 78 +++++++++++++++++++- packages/google-cloud-iot/protos/protos.json | 13 +++- packages/google-cloud-iot/synth.metadata | 2 +- 4 files changed, 102 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index b7f53bb9311..d702f97abd4 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -4690,6 +4690,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -4719,6 +4722,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 @@ -4798,6 +4804,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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 721c7edaf1d..655634eab15 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -11064,6 +11064,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 */ /** @@ -11076,6 +11077,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) @@ -11130,6 +11132,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 @@ -11167,6 +11177,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; }; @@ -11221,6 +11237,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; @@ -11284,6 +11310,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; }; @@ -11328,6 +11366,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; }; @@ -11344,8 +11399,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 = ""; @@ -11368,6 +11425,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; }; @@ -11398,6 +11460,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-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 337364e5a13..bfc626cb7bd 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -1374,6 +1374,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -1383,6 +1388,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -1402,7 +1413,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-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index a0331d852f6..4deb683eb6e 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "86326838ac2b1e1a4ac71af70abb5d0fc31c7d65" + "sha": "92d3b5a739d9a0bd527ef538acff3085f2814c01" } }, { From d50f71080675da92d958878746ee591675d6c3cf 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:35 +0000 Subject: [PATCH 273/370] chore: release 2.2.0 (#427) :robot: I have created a release \*beep\* \*boop\* --- ## [2.2.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.3...v2.2.0) (2021-01-09) ### Features * adds style enumeration ([#426](https://www.github.com/googleapis/nodejs-iot/issues/426)) ([4daeff4](https://www.github.com/googleapis/nodejs-iot/commit/4daeff47d5cfc5fd826705f4da5b8dbed1784e44)) --- 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-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 763f3cc38c9..ea816f5efc7 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.3...v2.2.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#426](https://www.github.com/googleapis/nodejs-iot/issues/426)) ([4daeff4](https://www.github.com/googleapis/nodejs-iot/commit/4daeff47d5cfc5fd826705f4da5b8dbed1784e44)) + ### [2.1.3](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.2...v2.1.3) (2020-11-25) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 63cb1a7786d..22406d73dbb 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.1.3", + "version": "2.2.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 07755b9a6b5..9dc45ae2b32 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.1.3", + "@google-cloud/iot": "^2.2.0", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From cbd99c3f5969b129ef2a16c69f211c26acb15e63 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:42:23 -0800 Subject: [PATCH 274/370] refactor(nodejs): move build cop to flakybot (#431) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79c017af-4fff-4b22-8cb4-5c2208642be6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 4deb683eb6e..f1d0ba87add 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "92d3b5a739d9a0bd527ef538acff3085f2814c01" + "sha": "9b971ff5e38a5e7ab979981c05cda78c55e0ee00" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From 13ab258672f8d43b6365502732073db3fdefc7b7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 2 Feb 2021 17:54:19 -0800 Subject: [PATCH 275/370] chore: update CODEOWNERS config (#432) --- packages/google-cloud-iot/.repo-metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index 4a68138382f..bef093188e9 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -8,5 +8,6 @@ "repo": "googleapis/nodejs-iot", "distribution_name": "@google-cloud/iot", "api_id": "cloudiot.googleapis.com", - "requires_billing": true + "requires_billing": true, + "codeowner_team": "@googleapis/ml-apis" } From 343b8a914ba7edcd50d332a770c474d36ce6a0c0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 18:14:05 -0800 Subject: [PATCH 276/370] build: adds UNORDERED_LIST enum (#433) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2ae671ee-21a8-4bed-96cc-bdcf6b4638b5/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-iot/protos/protos.d.ts | 3 ++- packages/google-cloud-iot/protos/protos.js | 7 +++++++ packages/google-cloud-iot/protos/protos.json | 3 ++- packages/google-cloud-iot/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index d702f97abd4..a769d896660 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -4667,7 +4667,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 655634eab15..2a22d5502f2 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -11040,6 +11040,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); @@ -11049,6 +11050,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; })(); @@ -17216,6 +17218,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -17316,6 +17319,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index bfc626cb7bd..2808489cbfb 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -1329,7 +1329,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "resourceReference": { diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f1d0ba87add..3323d98892d 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "9b971ff5e38a5e7ab979981c05cda78c55e0ee00" + "sha": "6077d60e1c9d66deeb4bec78ec67d2d7518308db" } }, { From 235219dacd154b4faff95b02987c6f66cfa08951 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 08:46:16 -0800 Subject: [PATCH 277/370] chore: use repo metadata to populate nodejs CODEOWNERS (#435) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4df45cb9-66e5-4aca-9dbd-68127c02ae5d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/318e351e26ba65b2b3cfa3f61b3b64e3540c3525 --- packages/google-cloud-iot/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 3323d98892d..049febefbcf 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "6077d60e1c9d66deeb4bec78ec67d2d7518308db" + "sha": "e5d97def2c6feb4b99ca03a7250ce20fd9a6bf47" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" } } ], From 4aa1370905ab6623ddea1572180111c770af8618 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 14:03:01 -0800 Subject: [PATCH 278/370] docs: add fieldMask format clarification to avoid misunderstandings Committer: @gcseh PiperOrigin-RevId: 355397730 Source-Author: Google APIs Source-Date: Wed Feb 3 08:01:55 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 13b6ba5e35620d15a97ae0f8c38be0c0ff1c2d42 Source-Link: https://github.com/googleapis/googleapis/commit/13b6ba5e35620d15a97ae0f8c38be0c0ff1c2d42 Co-authored-by: Justin Beckwith --- .../protos/google/cloud/iot/v1/device_manager.proto | 9 +++++---- .../protos/google/cloud/iot/v1/resources.proto | 3 +-- .../google-cloud-iot/src/v1/device_manager_client.ts | 12 ++++++++---- packages/google-cloud-iot/synth.metadata | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto index 44d11afe650..dfd6c9b6af8 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.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"; @@ -392,7 +391,8 @@ message GetDeviceRequest { ]; // The fields of the `Device` resource to be returned in the response. If the - // field mask is unset or empty, all fields are returned. + // field mask is unset or empty, all fields are returned. Fields have to be + // provided in snake_case format, for example: `last_heartbeat_time`. google.protobuf.FieldMask field_mask = 2; } @@ -445,7 +445,8 @@ message ListDevicesRequest { // The fields of the `Device` resource to be returned in the response. The // fields `id` and `num_id` are always returned, along with any - // other fields specified. + // other fields specified in snake_case format, for example: + // `last_heartbeat_time`. google.protobuf.FieldMask field_mask = 4; // Options related to gateways. diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto index 2201d330265..a14fc027ef4 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/resources.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-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 0cc30c1c095..d8d24cfd8a8 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -847,7 +847,8 @@ export class DeviceManagerClient { * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. * @param {google.protobuf.FieldMask} request.fieldMask * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. * @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. @@ -2216,7 +2217,8 @@ export class DeviceManagerClient { * @param {google.protobuf.FieldMask} request.fieldMask * The fields of the `Device` resource to be returned in the response. The * fields `id` and `num_id` are always returned, along with any - * other fields specified. + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions * Options related to gateways. * @param {number} request.pageSize @@ -2298,7 +2300,8 @@ export class DeviceManagerClient { * @param {google.protobuf.FieldMask} request.fieldMask * The fields of the `Device` resource to be returned in the response. The * fields `id` and `num_id` are always returned, along with any - * other fields specified. + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions * Options related to gateways. * @param {number} request.pageSize @@ -2362,7 +2365,8 @@ export class DeviceManagerClient { * @param {google.protobuf.FieldMask} request.fieldMask * The fields of the `Device` resource to be returned in the response. The * fields `id` and `num_id` are always returned, along with any - * other fields specified. + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. * @param {google.cloud.iot.v1.GatewayListOptions} request.gatewayListOptions * Options related to gateways. * @param {number} request.pageSize diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index 049febefbcf..f0415077806 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "13b6ba5e35620d15a97ae0f8c38be0c0ff1c2d42", + "internalRef": "355397730" } }, { From c173c336859b39d15418a74da53633a8ce10b766 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Feb 2021 11:08:43 -0800 Subject: [PATCH 279/370] chore: release 2.2.1 (#437) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index ea816f5efc7..d1fe2c9159f 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.2.0...v2.2.1) (2021-02-05) + + +### Bug Fixes + +* add fieldMask for getDevice and listDevices ([#436](https://www.github.com/googleapis/nodejs-iot/issues/436)) ([a97ed10](https://www.github.com/googleapis/nodejs-iot/commit/a97ed10e8ecc75aeba1fcb89637ef1298801150e)) + ## [2.2.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.1.3...v2.2.0) (2021-01-09) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 22406d73dbb..32645713082 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.2.0", + "version": "2.2.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 9dc45ae2b32..eb66c34fa8a 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.2.0", + "@google-cloud/iot": "^2.2.1", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From 649cc4743f8da84320141ab0368bef9004717e7d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Feb 2021 10:10:00 -0800 Subject: [PATCH 280/370] chore: release 2.3.0 (#439) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index d1fe2c9159f..882367e5b42 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.2.1...v2.3.0) (2021-02-10) + + +### Features + +* add serverCertFile parameter ([#438](https://www.github.com/googleapis/nodejs-iot/issues/438)) ([e979160](https://www.github.com/googleapis/nodejs-iot/commit/e97916026e6d794b09143059203f8d3530311ffe)) + ### [2.2.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.2.0...v2.2.1) (2021-02-05) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 32645713082..78733b913dd 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.2.1", + "version": "2.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index eb66c34fa8a..9fd30d48feb 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.2.1", + "@google-cloud/iot": "^2.3.0", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From 0abe1a97ec1599c5311082fcf470efb785e3d9df Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:11 -0800 Subject: [PATCH 281/370] build: update gapic-generator-typescript to v1.2.10. (#441) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7d84eafd-4925-434f-9ffd-6407671972cb/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-iot/synth.metadata | 6 +++--- packages/google-cloud-iot/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata index f0415077806..9210c49dc8e 100644 --- a/packages/google-cloud-iot/synth.metadata +++ b/packages/google-cloud-iot/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "e5d97def2c6feb4b99ca03a7250ce20fd9a6bf47" + "sha": "b9aa743532c3371ff52a0572fa375c96488e433b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "13b6ba5e35620d15a97ae0f8c38be0c0ff1c2d42", - "internalRef": "355397730" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-iot/webpack.config.js b/packages/google-cloud-iot/webpack.config.js index 1f0f42dd4c1..ff027648874 100644 --- a/packages/google-cloud-iot/webpack.config.js +++ b/packages/google-cloud-iot/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 b5743a8f3fad806bd69cbe801103b8ce7e5af4cb Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 18 Mar 2021 14:43:40 -0700 Subject: [PATCH 282/370] chore: migrate to owl bot (#442) --- .../google-cloud-iot/.github/.OwlBot.yaml | 23 ++++++++++ packages/google-cloud-iot/.repo-metadata.json | 13 +++--- packages/google-cloud-iot/synth.metadata | 37 --------------- packages/google-cloud-iot/synth.py | 45 ------------------- 4 files changed, 30 insertions(+), 88 deletions(-) create mode 100644 packages/google-cloud-iot/.github/.OwlBot.yaml delete mode 100644 packages/google-cloud-iot/synth.metadata delete mode 100644 packages/google-cloud-iot/synth.py diff --git a/packages/google-cloud-iot/.github/.OwlBot.yaml b/packages/google-cloud-iot/.github/.OwlBot.yaml new file mode 100644 index 00000000000..7fb380f1d3f --- /dev/null +++ b/packages/google-cloud-iot/.github/.OwlBot.yaml @@ -0,0 +1,23 @@ +# 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/iot/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index bef093188e9..65fefa657f6 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "iot", - "name_pretty": "Google Cloud Internet of Things (IoT) Core", - "product_documentation": "https://cloud.google.com/iot", "client_documentation": "https://googleapis.dev/nodejs/iot/latest", + "api_id": "cloudiot.googleapis.com", + "codeowner_team": "@googleapis/ml-apis", + "distribution_name": "@google-cloud/iot", "release_level": "ga", "language": "nodejs", + "name_pretty": "Google Cloud Internet of Things (IoT) Core", "repo": "googleapis/nodejs-iot", - "distribution_name": "@google-cloud/iot", - "api_id": "cloudiot.googleapis.com", + "product_documentation": "https://cloud.google.com/iot", "requires_billing": true, - "codeowner_team": "@googleapis/ml-apis" + "name": "iot", + "default_version": "v1" } diff --git a/packages/google-cloud-iot/synth.metadata b/packages/google-cloud-iot/synth.metadata deleted file mode 100644 index 9210c49dc8e..00000000000 --- a/packages/google-cloud-iot/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-iot.git", - "sha": "b9aa743532c3371ff52a0572fa375c96488e433b" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "iot", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-iot/synth.py b/packages/google-cloud-iot/synth.py deleted file mode 100644 index e4b0b11fd94..00000000000 --- a/packages/google-cloud-iot/synth.py +++ /dev/null @@ -1,45 +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. - -"""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() -versions = ['v1'] - -for version in versions: - library = gapic.node_library('iot', version) - -# skip index, protos, package.json, and README.md -s.copy( - library, - excludes=['package.json', 'README.md'], -) - -# Copy common templated files -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=versions, default_version='v1') -s.copy(templates) - -node.postprocess_gapic_library() From b971000d3b5de769b7cd66572ee95e091988f4e8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 17:50:24 +0100 Subject: [PATCH 283/370] chore(deps): update dependency sinon to v10 (#448) [![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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 78733b913dd..38de0b45f5b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -62,7 +62,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 571b818b8ef5846789bb482dbf03c401f2ce315a Mon Sep 17 00:00:00 2001 From: Mike <45373284+munkhuushmgl@users.noreply.github.com> Date: Wed, 31 Mar 2021 10:19:05 -0700 Subject: [PATCH 284/370] Update .repo-metadata.json (#454) --- packages/google-cloud-iot/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index 65fefa657f6..445381a2c99 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -1,7 +1,7 @@ { "client_documentation": "https://googleapis.dev/nodejs/iot/latest", "api_id": "cloudiot.googleapis.com", - "codeowner_team": "@googleapis/ml-apis", + "codeowner_team": "@googleapis/api-iot", "distribution_name": "@google-cloud/iot", "release_level": "ga", "language": "nodejs", From 69deb3a5cbe2494189bef8a565a5b1b83b1a7425 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:10:28 +0200 Subject: [PATCH 285/370] chore(deps): update dependency @types/sinon to v10 (#460) [![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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 38de0b45f5b..ad56b54a032 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -52,7 +52,7 @@ "@microsoft/api-extractor": "^7.8.10", "@types/mocha": "^8.0.0", "@types/node": "^12.0.0", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "c8": "^7.2.1", "gts": "^2.0.0", "jsdoc": "^3.6.2", From df1648c315af816f098c710ba1a2f8196ae4690f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:58:05 +0200 Subject: [PATCH 286/370] chore(deps): update dependency ts-loader to v9 (#464) [![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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index ad56b54a032..3b483aa0639 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -63,7 +63,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 1c14215f8acddf6d2ab032465fb6fce36a796851 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:58:04 -0700 Subject: [PATCH 287/370] fix(deps): require google-gax v2.12.0 (#469) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 3b483aa0639..2e7eb45dae5 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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": { "@microsoft/api-documenter": "^7.8.10", From cb164e92eb11fbed0aed6aef9d027e45d562b87e 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:31 +0000 Subject: [PATCH 288/370] chore: new owl bot post processor docker image (#471) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- packages/google-cloud-iot/protos/protos.d.ts | 16 +- packages/google-cloud-iot/protos/protos.js | 32 +-- .../src/v1/device_manager_client.ts | 226 ++++++++---------- .../test/gapic_device_manager_v1.ts | 222 +++++++---------- 4 files changed, 217 insertions(+), 279 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index a769d896660..325cdc9cdf6 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -1546,13 +1546,13 @@ export namespace google { constructor(properties?: google.cloud.iot.v1.IGatewayListOptions); /** GatewayListOptions gatewayType. */ - public gatewayType: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType); + public gatewayType?: (google.cloud.iot.v1.GatewayType|keyof typeof google.cloud.iot.v1.GatewayType|null); /** GatewayListOptions associationsGatewayId. */ - public associationsGatewayId: string; + public associationsGatewayId?: (string|null); /** GatewayListOptions associationsDeviceId. */ - public associationsDeviceId: string; + public associationsDeviceId?: (string|null); /** GatewayListOptions filter. */ public filter?: ("gatewayType"|"associationsGatewayId"|"associationsDeviceId"); @@ -4464,19 +4464,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); diff --git a/packages/google-cloud-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 2a22d5502f2..80a3fb641a6 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -3247,27 +3247,27 @@ /** * GatewayListOptions gatewayType. - * @member {google.cloud.iot.v1.GatewayType} gatewayType + * @member {google.cloud.iot.v1.GatewayType|null|undefined} gatewayType * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayListOptions.prototype.gatewayType = 0; + GatewayListOptions.prototype.gatewayType = null; /** * GatewayListOptions associationsGatewayId. - * @member {string} associationsGatewayId + * @member {string|null|undefined} associationsGatewayId * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayListOptions.prototype.associationsGatewayId = ""; + GatewayListOptions.prototype.associationsGatewayId = null; /** * GatewayListOptions associationsDeviceId. - * @member {string} associationsDeviceId + * @member {string|null|undefined} associationsDeviceId * @memberof google.cloud.iot.v1.GatewayListOptions * @instance */ - GatewayListOptions.prototype.associationsDeviceId = ""; + GatewayListOptions.prototype.associationsDeviceId = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -10401,43 +10401,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. diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index d8d24cfd8a8..69e920e3620 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -261,13 +261,14 @@ export class DeviceManagerClient { ]; for (const methodName of deviceManagerStubMethods) { const callPromise = this.deviceManagerStub.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; } @@ -431,11 +432,10 @@ export class DeviceManagerClient { 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.createDeviceRegistry(request, options, callback); } @@ -518,11 +518,10 @@ export class DeviceManagerClient { 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.getDeviceRegistry(request, options, callback); } @@ -618,11 +617,10 @@ export class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'device_registry.name': request.deviceRegistry!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'device_registry.name': request.deviceRegistry!.name || '', + }); this.initialize(); return this.innerApiCalls.updateDeviceRegistry(request, options, callback); } @@ -711,11 +709,10 @@ export class DeviceManagerClient { 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.deleteDeviceRegistry(request, options, callback); } @@ -801,11 +798,10 @@ export class DeviceManagerClient { 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.createDevice(request, options, callback); } @@ -891,11 +887,10 @@ export class DeviceManagerClient { 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.getDevice(request, options, callback); } @@ -983,11 +978,10 @@ export class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'device.name': request.device!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'device.name': request.device!.name || '', + }); this.initialize(); return this.innerApiCalls.updateDevice(request, options, callback); } @@ -1069,11 +1063,10 @@ export class DeviceManagerClient { 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.deleteDevice(request, options, callback); } @@ -1173,11 +1166,10 @@ export class DeviceManagerClient { 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.modifyCloudToDeviceConfig( request, @@ -1276,11 +1268,10 @@ export class DeviceManagerClient { 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.listDeviceConfigVersions( request, @@ -1373,11 +1364,10 @@ export class DeviceManagerClient { 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.listDeviceStates(request, options, callback); } @@ -1464,11 +1454,10 @@ export class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - resource: request.resource || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); } @@ -1554,11 +1543,10 @@ export class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - resource: request.resource || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); } @@ -1646,11 +1634,10 @@ export class DeviceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - resource: request.resource || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); } @@ -1754,11 +1741,10 @@ export class DeviceManagerClient { 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.sendCommandToDevice(request, options, callback); } @@ -1848,11 +1834,10 @@ export class DeviceManagerClient { 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.bindDeviceToGateway(request, options, callback); } @@ -1948,11 +1933,10 @@ export class DeviceManagerClient { 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.unbindDeviceFromGateway( request, @@ -2058,11 +2042,10 @@ export class DeviceManagerClient { 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.listDeviceRegistries(request, options, callback); } @@ -2103,11 +2086,10 @@ export class DeviceManagerClient { 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.listDeviceRegistries.createStream( @@ -2159,17 +2141,16 @@ export class DeviceManagerClient { 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.listDeviceRegistries.asyncIterate( this.innerApiCalls['listDeviceRegistries'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2275,11 +2256,10 @@ export class DeviceManagerClient { 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.listDevices(request, options, callback); } @@ -2333,11 +2313,10 @@ export class DeviceManagerClient { 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.listDevices.createStream( @@ -2402,17 +2381,16 @@ export class DeviceManagerClient { 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.listDevices.asyncIterate( this.innerApiCalls['listDevices'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 9f680ad40c1..efc6cb06f48 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.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('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); - client.innerApiCalls.createDeviceRegistry = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createDeviceRegistry = + stubSimpleCall(expectedResponse); const [response] = await client.createDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -249,9 +247,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); - client.innerApiCalls.createDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createDeviceRegistry = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createDeviceRegistry( request, @@ -361,9 +358,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); - client.innerApiCalls.getDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getDeviceRegistry = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getDeviceRegistry( request, @@ -443,9 +439,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.updateDeviceRegistry = + stubSimpleCall(expectedResponse); const [response] = await client.updateDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -477,9 +472,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); - client.innerApiCalls.updateDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateDeviceRegistry = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateDeviceRegistry( request, @@ -559,9 +553,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deleteDeviceRegistry = + stubSimpleCall(expectedResponse); const [response] = await client.deleteDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -592,9 +585,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteDeviceRegistry = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteDeviceRegistry = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteDeviceRegistry( request, @@ -704,9 +696,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); - client.innerApiCalls.createDevice = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createDevice = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createDevice( request, @@ -816,9 +807,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); - client.innerApiCalls.getDevice = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getDevice = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getDevice( request, @@ -927,9 +917,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); - client.innerApiCalls.updateDevice = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateDevice = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateDevice( request, @@ -1040,9 +1029,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteDevice = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteDevice = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteDevice( request, @@ -1121,9 +1109,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceConfig() ); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.modifyCloudToDeviceConfig = + stubSimpleCall(expectedResponse); const [response] = await client.modifyCloudToDeviceConfig(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1154,9 +1141,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceConfig() ); - client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.modifyCloudToDeviceConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.modifyCloudToDeviceConfig( request, @@ -1238,9 +1224,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() ); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listDeviceConfigVersions = + stubSimpleCall(expectedResponse); const [response] = await client.listDeviceConfigVersions(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1271,9 +1256,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() ); - client.innerApiCalls.listDeviceConfigVersions = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listDeviceConfigVersions = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listDeviceConfigVersions( request, @@ -1386,9 +1370,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesResponse() ); - client.innerApiCalls.listDeviceStates = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listDeviceStates = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listDeviceStates( request, @@ -1498,9 +1481,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.iam.v1.Policy() ); - client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.setIamPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.setIamPolicy( request, @@ -1610,9 +1592,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.iam.v1.Policy() ); - client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getIamPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getIamPolicy( request, @@ -1691,9 +1672,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsResponse() ); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); const [response] = await client.testIamPermissions(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1724,9 +1704,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsResponse() ); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.testIamPermissions( request, @@ -1805,9 +1784,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() ); - client.innerApiCalls.sendCommandToDevice = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.sendCommandToDevice = + stubSimpleCall(expectedResponse); const [response] = await client.sendCommandToDevice(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1838,9 +1816,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() ); - client.innerApiCalls.sendCommandToDevice = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.sendCommandToDevice = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.sendCommandToDevice( request, @@ -1919,9 +1896,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() ); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.bindDeviceToGateway = + stubSimpleCall(expectedResponse); const [response] = await client.bindDeviceToGateway(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1952,9 +1928,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() ); - client.innerApiCalls.bindDeviceToGateway = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.bindDeviceToGateway = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.bindDeviceToGateway( request, @@ -2033,9 +2008,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() ); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.unbindDeviceFromGateway = + stubSimpleCall(expectedResponse); const [response] = await client.unbindDeviceFromGateway(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -2066,9 +2040,8 @@ describe('v1.DeviceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() ); - client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.unbindDeviceFromGateway = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.unbindDeviceFromGateway( request, @@ -2152,9 +2125,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), ]; - client.innerApiCalls.listDeviceRegistries = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listDeviceRegistries = + stubSimpleCall(expectedResponse); const [response] = await client.listDeviceRegistries(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -2187,9 +2159,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), ]; - client.innerApiCalls.listDeviceRegistries = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listDeviceRegistries = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listDeviceRegistries( request, @@ -2261,9 +2232,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), ]; - client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listDeviceRegistries.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listDeviceRegistriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; @@ -2288,10 +2258,9 @@ describe('v1.DeviceManagerClient', () => { .calledWith(client.innerApiCalls.listDeviceRegistries, request) ); assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDeviceRegistries.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2308,10 +2277,8 @@ describe('v1.DeviceManagerClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listDeviceRegistries.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listDeviceRegistriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.iot.v1.DeviceRegistry[] = []; @@ -2335,10 +2302,9 @@ describe('v1.DeviceManagerClient', () => { .calledWith(client.innerApiCalls.listDeviceRegistries, request) ); assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDeviceRegistries.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2359,9 +2325,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), ]; - client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listDeviceRegistries.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; const iterable = client.listDeviceRegistriesAsync(request); for await (const resource of iterable) { @@ -2369,15 +2334,15 @@ describe('v1.DeviceManagerClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2394,10 +2359,8 @@ describe('v1.DeviceManagerClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listDeviceRegistries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listDeviceRegistriesAsync(request); await assert.rejects(async () => { const responses: protos.google.cloud.iot.v1.IDeviceRegistry[] = []; @@ -2406,15 +2369,15 @@ describe('v1.DeviceManagerClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listDeviceRegistries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2477,9 +2440,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), ]; - client.innerApiCalls.listDevices = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listDevices = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listDevices( request, @@ -2551,9 +2513,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), ]; - client.descriptors.page.listDevices.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listDevices.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listDevicesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.iot.v1.Device[] = []; @@ -2641,9 +2602,8 @@ describe('v1.DeviceManagerClient', () => { generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), ]; - client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listDevices.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.iot.v1.IDevice[] = []; const iterable = client.listDevicesAsync(request); for await (const resource of iterable) { From 2b95a113424199befd2937d4a88762e24ebf3570 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:56:23 +0000 Subject: [PATCH 289/370] fix: use require() to load JSON protos (#472) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../src/v1/device_manager_client.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 69e920e3620..e06c6b52491 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -31,6 +31,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1/device_manager_client_config.json`. @@ -145,22 +146,7 @@ export class DeviceManagerClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. From d0c226b217765f2a6402d5db539deb618c3f655a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:07 +0000 Subject: [PATCH 290/370] chore: update gapic-generator-typescript to v1.3.2 (#473) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- packages/google-cloud-iot/src/v1/device_manager_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index e06c6b52491..e1edb6e9434 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; From 169b75472c2cdadf850e13270499825b801c3a02 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:37:46 -0700 Subject: [PATCH 291/370] chore: release 2.3.1 (#470) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 8 ++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 882367e5b42..5839dc7e7e8 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.3.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.0...v2.3.1) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#469](https://www.github.com/googleapis/nodejs-iot/issues/469)) ([fba8758](https://www.github.com/googleapis/nodejs-iot/commit/fba875813f41232a71338971c4c1766001dcefb5)) +* use require() to load JSON protos ([#472](https://www.github.com/googleapis/nodejs-iot/issues/472)) ([d963cf7](https://www.github.com/googleapis/nodejs-iot/commit/d963cf709052a7236a80cf1c0c9fbbaffd311aad)) + ## [2.3.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.2.1...v2.3.0) (2021-02-10) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2e7eb45dae5..1dcbb7a62a9 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.0", + "version": "2.3.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 9fd30d48feb..9bcccb3774d 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.0", + "@google-cloud/iot": "^2.3.1", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From 9fbe447b3b137f196a5930610bb51bc4efff9ab9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 May 2021 19:06:13 +0200 Subject: [PATCH 292/370] chore(deps): update dependency @types/node to v14 (#476) 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.0.0` -> `^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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1dcbb7a62a9..93ac0af3cd1 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -51,7 +51,7 @@ "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10", "@types/mocha": "^8.0.0", - "@types/node": "^12.0.0", + "@types/node": "^14.0.0", "@types/sinon": "^10.0.0", "c8": "^7.2.1", "gts": "^2.0.0", From e8e7dc55ca36de8c534acbdcfc47a21854255d1b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:56:18 +0200 Subject: [PATCH 293/370] chore(deps): update dependency sinon to v11 (#477) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 93ac0af3cd1..70d200ce4fe 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -62,7 +62,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 8651db418eb5505858d066e5d85e82678441defc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:29 +0000 Subject: [PATCH 294/370] fix: GoogleAdsError missing using generator version after 1.3.0 (#478) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- packages/google-cloud-iot/src/v1/device_manager_client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index e1edb6e9434..008a8d9eb50 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -140,6 +140,8 @@ export class DeviceManagerClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); From 366a1ea7c69a44dc90d3e7ce80186981eb2b9d47 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 13:23:19 -0700 Subject: [PATCH 295/370] chore: release 2.3.2 (#479) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 5839dc7e7e8..9814e007174 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.1...v2.3.2) (2021-06-07) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#478](https://www.github.com/googleapis/nodejs-iot/issues/478)) ([5c20030](https://www.github.com/googleapis/nodejs-iot/commit/5c20030e43fdd110b87aeeabed533f6c70a03e81)) + ### [2.3.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.0...v2.3.1) (2021-05-12) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 70d200ce4fe..e1907734cf3 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.1", + "version": "2.3.2", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 9bcccb3774d..90ed9d135cd 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.1", + "@google-cloud/iot": "^2.3.2", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From d1465b1cc7ce1f1e78536f9fd4aa4fec9a561f10 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 10 Jun 2021 23:50:09 +0200 Subject: [PATCH 296/370] chore(nodejs): remove api-extractor dependencies (#484) --- packages/google-cloud-iot/package.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index e1907734cf3..6d2e1207962 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -40,16 +40,12 @@ "compile-protos": "compileProtos src", "prepare": "npm run compile", "prelint": "cd samples; npm link ../; npm install", - "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" }, "devDependencies": { - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10", "@types/mocha": "^8.0.0", "@types/node": "^14.0.0", "@types/sinon": "^10.0.0", From e45ae95ba753f9ab45d4dd2831ea0a3ff6100e78 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:22:28 +0000 Subject: [PATCH 297/370] fix: make request optional in all cases (#487) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- .../src/v1/device_manager_client.ts | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 008a8d9eb50..a1a67a8ff33 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -331,7 +331,7 @@ export class DeviceManagerClient { // -- Service calls -- // ------------------- createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, options?: CallOptions ): Promise< [ @@ -384,7 +384,7 @@ export class DeviceManagerClient { * const [response] = await client.createDeviceRegistry(request); */ createDeviceRegistry( - request: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, optionsOrCallback?: | CallOptions | Callback< @@ -427,7 +427,7 @@ export class DeviceManagerClient { return this.innerApiCalls.createDeviceRegistry(request, options, callback); } getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, options?: CallOptions ): Promise< [ @@ -472,7 +472,7 @@ export class DeviceManagerClient { * const [response] = await client.getDeviceRegistry(request); */ getDeviceRegistry( - request: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, optionsOrCallback?: | CallOptions | Callback< @@ -513,7 +513,7 @@ export class DeviceManagerClient { return this.innerApiCalls.getDeviceRegistry(request, options, callback); } updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, options?: CallOptions ): Promise< [ @@ -569,7 +569,7 @@ export class DeviceManagerClient { * const [response] = await client.updateDeviceRegistry(request); */ updateDeviceRegistry( - request: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, optionsOrCallback?: | CallOptions | Callback< @@ -612,7 +612,7 @@ export class DeviceManagerClient { return this.innerApiCalls.updateDeviceRegistry(request, options, callback); } deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, options?: CallOptions ): Promise< [ @@ -661,7 +661,7 @@ export class DeviceManagerClient { * const [response] = await client.deleteDeviceRegistry(request); */ deleteDeviceRegistry( - request: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, + request?: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, optionsOrCallback?: | CallOptions | Callback< @@ -704,7 +704,7 @@ export class DeviceManagerClient { return this.innerApiCalls.deleteDeviceRegistry(request, options, callback); } createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + request?: protos.google.cloud.iot.v1.ICreateDeviceRequest, options?: CallOptions ): Promise< [ @@ -754,7 +754,7 @@ export class DeviceManagerClient { * const [response] = await client.createDevice(request); */ createDevice( - request: protos.google.cloud.iot.v1.ICreateDeviceRequest, + request?: protos.google.cloud.iot.v1.ICreateDeviceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -793,7 +793,7 @@ export class DeviceManagerClient { return this.innerApiCalls.createDevice(request, options, callback); } getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, + request?: protos.google.cloud.iot.v1.IGetDeviceRequest, options?: CallOptions ): Promise< [ @@ -843,7 +843,7 @@ export class DeviceManagerClient { * const [response] = await client.getDevice(request); */ getDevice( - request: protos.google.cloud.iot.v1.IGetDeviceRequest, + request?: protos.google.cloud.iot.v1.IGetDeviceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -882,7 +882,7 @@ export class DeviceManagerClient { return this.innerApiCalls.getDevice(request, options, callback); } updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + request?: protos.google.cloud.iot.v1.IUpdateDeviceRequest, options?: CallOptions ): Promise< [ @@ -934,7 +934,7 @@ export class DeviceManagerClient { * const [response] = await client.updateDevice(request); */ updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + request?: protos.google.cloud.iot.v1.IUpdateDeviceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -973,7 +973,7 @@ export class DeviceManagerClient { return this.innerApiCalls.updateDevice(request, options, callback); } deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + request?: protos.google.cloud.iot.v1.IDeleteDeviceRequest, options?: CallOptions ): Promise< [ @@ -1019,7 +1019,7 @@ export class DeviceManagerClient { * const [response] = await client.deleteDevice(request); */ deleteDevice( - request: protos.google.cloud.iot.v1.IDeleteDeviceRequest, + request?: protos.google.cloud.iot.v1.IDeleteDeviceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1058,7 +1058,7 @@ export class DeviceManagerClient { return this.innerApiCalls.deleteDevice(request, options, callback); } modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + request?: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, options?: CallOptions ): Promise< [ @@ -1118,7 +1118,7 @@ export class DeviceManagerClient { * const [response] = await client.modifyCloudToDeviceConfig(request); */ modifyCloudToDeviceConfig( - request: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, + request?: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1165,7 +1165,7 @@ export class DeviceManagerClient { ); } listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + request?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, options?: CallOptions ): Promise< [ @@ -1220,7 +1220,7 @@ export class DeviceManagerClient { * const [response] = await client.listDeviceConfigVersions(request); */ listDeviceConfigVersions( - request: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, + request?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1267,7 +1267,7 @@ export class DeviceManagerClient { ); } listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + request?: protos.google.cloud.iot.v1.IListDeviceStatesRequest, options?: CallOptions ): Promise< [ @@ -1318,7 +1318,7 @@ export class DeviceManagerClient { * const [response] = await client.listDeviceStates(request); */ listDeviceStates( - request: protos.google.cloud.iot.v1.IListDeviceStatesRequest, + request?: protos.google.cloud.iot.v1.IListDeviceStatesRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1359,7 +1359,7 @@ export class DeviceManagerClient { return this.innerApiCalls.listDeviceStates(request, options, callback); } setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, + request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions ): Promise< [ @@ -1410,7 +1410,7 @@ export class DeviceManagerClient { * const [response] = await client.setIamPolicy(request); */ setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, + request?: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1449,7 +1449,7 @@ export class DeviceManagerClient { return this.innerApiCalls.setIamPolicy(request, options, callback); } getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, + request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions ): Promise< [ @@ -1499,7 +1499,7 @@ export class DeviceManagerClient { * const [response] = await client.getIamPolicy(request); */ getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, + request?: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1538,7 +1538,7 @@ export class DeviceManagerClient { return this.innerApiCalls.getIamPolicy(request, options, callback); } testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, + request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions ): Promise< [ @@ -1590,7 +1590,7 @@ export class DeviceManagerClient { * const [response] = await client.testIamPermissions(request); */ testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, + request?: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1629,7 +1629,7 @@ export class DeviceManagerClient { return this.innerApiCalls.testIamPermissions(request, options, callback); } sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + request?: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, options?: CallOptions ): Promise< [ @@ -1695,7 +1695,7 @@ export class DeviceManagerClient { * const [response] = await client.sendCommandToDevice(request); */ sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + request?: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1736,7 +1736,7 @@ export class DeviceManagerClient { return this.innerApiCalls.sendCommandToDevice(request, options, callback); } bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + request?: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, options?: CallOptions ): Promise< [ @@ -1788,7 +1788,7 @@ export class DeviceManagerClient { * const [response] = await client.bindDeviceToGateway(request); */ bindDeviceToGateway( - request: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, + request?: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1829,7 +1829,7 @@ export class DeviceManagerClient { return this.innerApiCalls.bindDeviceToGateway(request, options, callback); } unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + request?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, options?: CallOptions ): Promise< [ @@ -1885,7 +1885,7 @@ export class DeviceManagerClient { * const [response] = await client.unbindDeviceFromGateway(request); */ unbindDeviceFromGateway( - request: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, + request?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1933,7 +1933,7 @@ export class DeviceManagerClient { } listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, options?: CallOptions ): Promise< [ @@ -1994,7 +1994,7 @@ export class DeviceManagerClient { * for more details and examples. */ listDeviceRegistries( - request: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, + request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2142,7 +2142,7 @@ export class DeviceManagerClient { ) as AsyncIterable; } listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, + request?: protos.google.cloud.iot.v1.IListDevicesRequest, options?: CallOptions ): Promise< [ @@ -2212,7 +2212,7 @@ export class DeviceManagerClient { * for more details and examples. */ listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, + request?: protos.google.cloud.iot.v1.IListDevicesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From 13bf5be32f13cc1c03008fa23e29df3f21d8e0e7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:52:22 +0000 Subject: [PATCH 298/370] chore: release 2.3.3 (#488) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.3](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.2...v2.3.3) (2021-06-22) ### Bug Fixes * make request optional in all cases ([#487](https://www.github.com/googleapis/nodejs-iot/issues/487)) ([72c258b](https://www.github.com/googleapis/nodejs-iot/commit/72c258b53e18add510c59f2756f9d8d628edefaa)) --- 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-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 9814e007174..8f168a4b3d5 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.3](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.2...v2.3.3) (2021-06-22) + + +### Bug Fixes + +* make request optional in all cases ([#487](https://www.github.com/googleapis/nodejs-iot/issues/487)) ([72c258b](https://www.github.com/googleapis/nodejs-iot/commit/72c258b53e18add510c59f2756f9d8d628edefaa)) + ### [2.3.2](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.1...v2.3.2) (2021-06-07) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 6d2e1207962..fa3f8946c7e 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.2", + "version": "2.3.3", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 90ed9d135cd..794d8d26702 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.2", + "@google-cloud/iot": "^2.3.3", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From d457ae0212a2fdf3f3f02cb8afbd81b78ff40b47 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 1 Jul 2021 11:39:12 -0400 Subject: [PATCH 299/370] fix(deps): require google-gax v2.17.0 (#493) Co-authored-by: Justin Beckwith --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index fa3f8946c7e..e932f59a620 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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 e6b5af82915ffc1a1ff4cff541970cd48b933351 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 15:52:25 +0000 Subject: [PATCH 300/370] chore: release 2.3.4 (#495) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.3...v2.3.4) (2021-07-01) ### Bug Fixes * **deps:** require google-gax v2.17.0 ([#493](https://www.github.com/googleapis/nodejs-iot/issues/493)) ([f61a834](https://www.github.com/googleapis/nodejs-iot/commit/f61a834d9d8e9564f73849821de351757589422a)) --- 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-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 8f168a4b3d5..59ffd4891f5 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.4](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.3...v2.3.4) (2021-07-01) + + +### Bug Fixes + +* **deps:** require google-gax v2.17.0 ([#493](https://www.github.com/googleapis/nodejs-iot/issues/493)) ([f61a834](https://www.github.com/googleapis/nodejs-iot/commit/f61a834d9d8e9564f73849821de351757589422a)) + ### [2.3.3](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.2...v2.3.3) (2021-06-22) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index e932f59a620..65043393215 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.3", + "version": "2.3.4", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 794d8d26702..1a23cab8d5c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.3", + "@google-cloud/iot": "^2.3.4", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From abfefa46846df3439eb658ad8ddec77680ea7d1e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:44:25 -0400 Subject: [PATCH 301/370] fix(deps): google-gax v2.17.1 (#496) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 65043393215..1b378412fa8 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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 cbb56edd49846fec6f1f6925da3f200f8d5e2787 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:08:23 +0000 Subject: [PATCH 302/370] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#499) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../google-cloud-iot/src/v1/device_manager_client.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index a1a67a8ff33..c81b5363f0e 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -48,6 +48,7 @@ const version = require('../../../package.json').version; export class DeviceManagerClient { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -59,6 +60,7 @@ export class DeviceManagerClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; deviceManagerStub?: Promise<{[name: string]: Function}>; @@ -102,6 +104,9 @@ export class DeviceManagerClient { const staticMembers = this.constructor as typeof DeviceManagerClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -192,6 +197,9 @@ export class DeviceManagerClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -220,7 +228,8 @@ export class DeviceManagerClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.iot.v1.DeviceManager, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 75688c0680c758a682d33a8187d188206d0572e3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:56:25 +0000 Subject: [PATCH 303/370] chore: release 2.3.5 (#497) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.5](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.4...v2.3.5) (2021-07-21) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#496](https://www.github.com/googleapis/nodejs-iot/issues/496)) ([dc278eb](https://www.github.com/googleapis/nodejs-iot/commit/dc278eb4d8ce23454a582fda121766fa0f47e619)) * Updating WORKSPACE files to use the newest version of the Typescript generator. ([#499](https://www.github.com/googleapis/nodejs-iot/issues/499)) ([0e5967f](https://www.github.com/googleapis/nodejs-iot/commit/0e5967f873ff7db59f400ac651f2b0590650e42f)) --- 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-iot/CHANGELOG.md | 8 ++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 59ffd4891f5..0fef3d3a457 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.3.5](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.4...v2.3.5) (2021-07-21) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#496](https://www.github.com/googleapis/nodejs-iot/issues/496)) ([dc278eb](https://www.github.com/googleapis/nodejs-iot/commit/dc278eb4d8ce23454a582fda121766fa0f47e619)) +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#499](https://www.github.com/googleapis/nodejs-iot/issues/499)) ([0e5967f](https://www.github.com/googleapis/nodejs-iot/commit/0e5967f873ff7db59f400ac651f2b0590650e42f)) + ### [2.3.4](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.3...v2.3.4) (2021-07-01) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 1b378412fa8..a616662223b 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.4", + "version": "2.3.5", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 1a23cab8d5c..8ecda11203c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.4", + "@google-cloud/iot": "^2.3.5", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From ac336d231bb534aaa93ef6e47440353e5ab26c7c Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:06:58 -0400 Subject: [PATCH 304/370] chore(nodejs): update client ref docs link in metadata (#505) --- packages/google-cloud-iot/.repo-metadata.json | 2 +- packages/google-cloud-iot/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index 445381a2c99..8883ca18c84 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -1,5 +1,5 @@ { - "client_documentation": "https://googleapis.dev/nodejs/iot/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/iot/latest", "api_id": "cloudiot.googleapis.com", "codeowner_team": "@googleapis/api-iot", "distribution_name": "@google-cloud/iot", diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index e6ff0f84271..da55dd41e8e 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -147,7 +147,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/iot/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest [product-docs]: https://cloud.google.com/iot [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 7e6cbeba417082e7b5357da6025be5cdfaa58845 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:42:19 -0400 Subject: [PATCH 305/370] fix(deps): google-gax v2.24.1 (#507) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index a616662223b..b48495188e7 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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 3073325ada4f63067ac99b1c248364fbd07dab05 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:04:23 +0000 Subject: [PATCH 306/370] chore: release 2.3.6 (#508) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.6](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.5...v2.3.6) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#507](https://www.github.com/googleapis/nodejs-iot/issues/507)) ([8fa3d71](https://www.github.com/googleapis/nodejs-iot/commit/8fa3d7180578cab4bc5b29d64a2f8a05a741cdff)) --- 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-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 0fef3d3a457..e51a4a6f4a9 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.6](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.5...v2.3.6) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#507](https://www.github.com/googleapis/nodejs-iot/issues/507)) ([8fa3d71](https://www.github.com/googleapis/nodejs-iot/commit/8fa3d7180578cab4bc5b29d64a2f8a05a741cdff)) + ### [2.3.5](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.4...v2.3.5) (2021-07-21) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index b48495188e7..b6bf1e482f7 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.5", + "version": "2.3.6", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 8ecda11203c..1519e134422 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.5", + "@google-cloud/iot": "^2.3.6", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From 943c8248ffb7e23f0a1f61050996cb57fad667f1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:32:19 +0000 Subject: [PATCH 307/370] feat: turns on self-signed JWT feature flag (#509) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- packages/google-cloud-iot/src/v1/device_manager_client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index c81b5363f0e..e370cde11ce 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -131,6 +131,12 @@ export class DeviceManagerClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; From a059cfa7df555b91635f0d1b246ab13373ef691c 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:42:25 +0000 Subject: [PATCH 308/370] chore: disable renovate dependency dashboard (#1194) (#511) --- packages/google-cloud-iot/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index da55dd41e8e..9dd765f6b54 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -138,8 +138,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 fe9ba6e5d170886544b2cef19c5516fb704cb89d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 3 Sep 2021 13:46:26 -0400 Subject: [PATCH 309/370] fix(build): migrate to main branch (#512) --- packages/google-cloud-iot/README.md | 12 ++++++------ packages/google-cloud-iot/samples/README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 9dd765f6b54..106b54efb7c 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/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/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) @@ -17,7 +17,7 @@ A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-iot/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-iot/blob/main/CHANGELOG.md). * [Google Cloud Internet of Things (IoT) Core Node.js Client API Reference][client-docs] * [Google Cloud Internet of Things (IoT) Core Documentation][product-docs] @@ -80,11 +80,11 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-iot/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-iot/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -133,7 +133,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-iot/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-iot/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`) @@ -145,7 +145,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest [product-docs]: https://cloud.google.com/iot diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index 30a621cb0a6..00ce1e112c2 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -33,7 +33,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-iot/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From ca814cf3b95553a36bcc81b6c3d0cd5e61310787 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:01:29 -0700 Subject: [PATCH 310/370] chore: release 2.4.0 (#510) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index e51a4a6f4a9..16610a346a2 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [2.4.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.6...v2.4.0) (2021-09-03) + + +### Features + +* turns on self-signed JWT feature flag ([#509](https://www.github.com/googleapis/nodejs-iot/issues/509)) ([09350a3](https://www.github.com/googleapis/nodejs-iot/commit/09350a3b33d418c94dc36d0ff3abd1e11958fc55)) + + +### Bug Fixes + +* **build:** migrate to main branch ([#512](https://www.github.com/googleapis/nodejs-iot/issues/512)) ([8528684](https://www.github.com/googleapis/nodejs-iot/commit/852868454982502c0a1ab0d2fa09f14bcfe5ff13)) + ### [2.3.6](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.5...v2.3.6) (2021-08-17) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index b6bf1e482f7..2c04f620b74 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.3.6", + "version": "2.4.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 1519e134422..365739ce036 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.3.6", + "@google-cloud/iot": "^2.4.0", "@google-cloud/pubsub": "^2.0.0" }, "devDependencies": { From 1751f846ee986f6be54746c70d9fdbbf953a1cf7 Mon Sep 17 00:00:00 2001 From: sobowale olamide adekunle Date: Fri, 17 Sep 2021 18:51:00 +0100 Subject: [PATCH 311/370] feat: Add sample codes for cloud-iot-token-service generateAccessToken API (#502) --- packages/google-cloud-iot/samples/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 365739ce036..c9528afc75c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -12,11 +12,12 @@ "repository": "googleapis/nodejs-iot", "private": true, "scripts": { - "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../" + "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { "@google-cloud/iot": "^2.4.0", - "@google-cloud/pubsub": "^2.0.0" + "@google-cloud/pubsub": "^2.0.0", + "@google-cloud/storage": "^2.0.0" }, "devDependencies": { "chai": "^4.2.0", From add0ec1dcc9da040ff4c0b05d5c87ad99679b5b4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 20:09:52 +0200 Subject: [PATCH 312/370] chore: release 2.5.0 (#514) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 16610a346a2..c48f0e74904 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.5.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.4.0...v2.5.0) (2021-09-17) + + +### Features + +* Add sample codes for cloud-iot-token-service generateAccessToken API ([#502](https://www.github.com/googleapis/nodejs-iot/issues/502)) ([21ef5c7](https://www.github.com/googleapis/nodejs-iot/commit/21ef5c7a264c01c12675e623e7c160b2e33c8072)) + ## [2.4.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.3.6...v2.4.0) (2021-09-03) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2c04f620b74..c3d7e2495be 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.4.0", + "version": "2.5.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index c9528afc75c..983fc8cd447 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.4.0", + "@google-cloud/iot": "^2.5.0", "@google-cloud/pubsub": "^2.0.0", "@google-cloud/storage": "^2.0.0" }, From c9ce744bd1296207c024684cbfb5287f1f3e6f8d Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 07:18:29 -0700 Subject: [PATCH 313/370] chore: relocate owl bot post processor (#516) chore: relocate owl bot post processor --- packages/google-cloud-iot/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/.github/.OwlBot.yaml b/packages/google-cloud-iot/.github/.OwlBot.yaml index 7fb380f1d3f..459370d5147 100644 --- a/packages/google-cloud-iot/.github/.OwlBot.yaml +++ b/packages/google-cloud-iot/.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: - /owl-bot-staging From 67386d4493cd95285c7142f0f33dc9a66d44fe25 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 27 Sep 2021 18:55:37 +0200 Subject: [PATCH 314/370] fix(deps): update dependency @google-cloud/storage to v5 (#515) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 983fc8cd447..48e70ac2ff4 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.5.0", "@google-cloud/pubsub": "^2.0.0", - "@google-cloud/storage": "^2.0.0" + "@google-cloud/storage": "^5.0.0" }, "devDependencies": { "chai": "^4.2.0", From 900bd36b1073b4bbfdf2991cb81727ba73825b47 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 17:10:21 +0000 Subject: [PATCH 315/370] chore: release 2.5.1 (#519) :robot: I have created a release \*beep\* \*boop\* --- ### [2.5.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.5.0...v2.5.1) (2021-09-27) ### Bug Fixes * **deps:** update dependency @google-cloud/storage to v5 ([#515](https://www.github.com/googleapis/nodejs-iot/issues/515)) ([ba34e57](https://www.github.com/googleapis/nodejs-iot/commit/ba34e57652a18ac839d6feb4e0ba5c3e60364f60)) --- 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-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index c48f0e74904..9a9ecf09786 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.5.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.5.0...v2.5.1) (2021-09-27) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/storage to v5 ([#515](https://www.github.com/googleapis/nodejs-iot/issues/515)) ([ba34e57](https://www.github.com/googleapis/nodejs-iot/commit/ba34e57652a18ac839d6feb4e0ba5c3e60364f60)) + ## [2.5.0](https://www.github.com/googleapis/nodejs-iot/compare/v2.4.0...v2.5.0) (2021-09-17) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index c3d7e2495be..385fd8718a5 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.5.0", + "version": "2.5.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 48e70ac2ff4..1a298eb39c9 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.5.0", + "@google-cloud/iot": "^2.5.1", "@google-cloud/pubsub": "^2.0.0", "@google-cloud/storage": "^5.0.0" }, From 8b4837ce5d6d7c2424815bf791115526919a417e 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:54 +0000 Subject: [PATCH 316/370] build(node): update deps used during postprocessing (#1243) (#523) --- packages/google-cloud-iot/protos/protos.d.ts | 3 ++- packages/google-cloud-iot/protos/protos.js | 7 +++++++ packages/google-cloud-iot/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 325cdc9cdf6..e4d98a4e756 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/protos/protos.d.ts @@ -4668,7 +4668,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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 80a3fb641a6..c0743129ea3 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -11041,6 +11041,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); @@ -11051,6 +11052,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; })(); @@ -17219,6 +17221,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -17323,6 +17326,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-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 2808489cbfb..9497779533c 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -1330,7 +1330,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -1973,6 +1974,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 2706f6ecd002208ccedadd95f0eb9022ca751956 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 09:29:50 -0700 Subject: [PATCH 317/370] docs(samples): add auto-generated samples for Node with api short name in region tag (#520) PiperOrigin-RevId: 399287285 Source-Link: https://github.com/googleapis/googleapis/commit/15759865d1c54e3d46429010f7e472fe6c3d3715 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b27fff623a5d8d586b703b5e4919856abe7c2eb3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjI3ZmZmNjIzYTVkOGQ1ODZiNzAzYjVlNDkxOTg1NmFiZTdjMmViMyJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- .../device_manager.bind_device_to_gateway.js | 66 ++++++++++++++ .../v1/device_manager.create_device.js | 61 +++++++++++++ .../device_manager.create_device_registry.js | 60 +++++++++++++ .../v1/device_manager.delete_device.js | 54 +++++++++++ .../device_manager.delete_device_registry.js | 53 +++++++++++ .../generated/v1/device_manager.get_device.js | 60 +++++++++++++ .../v1/device_manager.get_device_registry.js | 53 +++++++++++ .../v1/device_manager.get_iam_policy.js | 58 ++++++++++++ ...ice_manager.list_device_config_versions.js | 60 +++++++++++++ .../device_manager.list_device_registries.js | 68 ++++++++++++++ .../v1/device_manager.list_device_states.js | 60 +++++++++++++ .../v1/device_manager.list_devices.js | 89 +++++++++++++++++++ ...e_manager.modify_cloud_to_device_config.js | 67 ++++++++++++++ .../device_manager.send_command_to_device.js | 67 ++++++++++++++ .../v1/device_manager.set_iam_policy.js | 61 +++++++++++++ .../v1/device_manager.test_iam_permissions.js | 61 +++++++++++++ ...vice_manager.unbind_device_from_gateway.js | 66 ++++++++++++++ .../v1/device_manager.update_device.js | 63 +++++++++++++ .../device_manager.update_device_registry.js | 63 +++++++++++++ .../src/v1/device_manager_client.ts | 12 ++- 20 files changed, 1198 insertions(+), 4 deletions(-) create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js create mode 100644 packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js new file mode 100644 index 00000000000..ef68a2f2a43 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, gatewayId, deviceId) { + // [START cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + // const parent = 'abc123' + /** + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + */ + // const gatewayId = 'abc123' + /** + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + */ + // const deviceId = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function bindDeviceToGateway() { + // Construct request + const request = { + parent, + gatewayId, + deviceId, + }; + + // Run request + const response = await iotClient.bindDeviceToGateway(request); + console.log(response); + } + + bindDeviceToGateway(); + // [END cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js new file mode 100644 index 00000000000..a0cff18f921 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, device) { + // [START cloudiot_v1_generated_DeviceManager_CreateDevice_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + // const parent = 'abc123' + /** + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + */ + // const device = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function createDevice() { + // Construct request + const request = { + parent, + device, + }; + + // Run request + const response = await iotClient.createDevice(request); + console.log(response); + } + + createDevice(); + // [END cloudiot_v1_generated_DeviceManager_CreateDevice_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js new file mode 100644 index 00000000000..dc549ab5b02 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, deviceRegistry) { + // [START cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + */ + // const parent = 'abc123' + /** + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + */ + // const deviceRegistry = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function createDeviceRegistry() { + // Construct request + const request = { + parent, + deviceRegistry, + }; + + // Run request + const response = await iotClient.createDeviceRegistry(request); + console.log(response); + } + + createDeviceRegistry(); + // [END cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js new file mode 100644 index 00000000000..d3c2658cfc9 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudiot_v1_generated_DeviceManager_DeleteDevice_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const name = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function deleteDevice() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await iotClient.deleteDevice(request); + console.log(response); + } + + deleteDevice(); + // [END cloudiot_v1_generated_DeviceManager_DeleteDevice_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js new file mode 100644 index 00000000000..fc3fe930c37 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + // const name = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function deleteDeviceRegistry() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await iotClient.deleteDeviceRegistry(request); + console.log(response); + } + + deleteDeviceRegistry(); + // [END cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js new file mode 100644 index 00000000000..515f87814eb --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudiot_v1_generated_DeviceManager_GetDevice_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const name = 'abc123' + /** + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + */ + // const fieldMask = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function getDevice() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await iotClient.getDevice(request); + console.log(response); + } + + getDevice(); + // [END cloudiot_v1_generated_DeviceManager_GetDevice_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js new file mode 100644 index 00000000000..46bdf72d8dc --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + // const name = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function getDeviceRegistry() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await iotClient.getDeviceRegistry(request); + console.log(response); + } + + getDeviceRegistry(); + // [END cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js new file mode 100644 index 00000000000..7d6db9ed210 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(resource) { + // [START cloudiot_v1_generated_DeviceManager_GetIamPolicy_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + */ + // const options = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function getIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await iotClient.getIamPolicy(request); + console.log(response); + } + + getIamPolicy(); + // [END cloudiot_v1_generated_DeviceManager_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js new file mode 100644 index 00000000000..672446ef1e2 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const name = 'abc123' + /** + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + */ + // const numVersions = 1234 + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function listDeviceConfigVersions() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await iotClient.listDeviceConfigVersions(request); + console.log(response); + } + + listDeviceConfigVersions(); + // [END cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js new file mode 100644 index 00000000000..6a04762fe55 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js @@ -0,0 +1,68 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + */ + // const parent = 'abc123' + /** + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function listDeviceRegistries() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await iotClient.listDeviceRegistriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listDeviceRegistries(); + // [END cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js new file mode 100644 index 00000000000..20c05621ea4 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudiot_v1_generated_DeviceManager_ListDeviceStates_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const name = 'abc123' + /** + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + */ + // const numStates = 1234 + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function listDeviceStates() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await iotClient.listDeviceStates(request); + console.log(response); + } + + listDeviceStates(); + // [END cloudiot_v1_generated_DeviceManager_ListDeviceStates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js new file mode 100644 index 00000000000..f0ee8de5550 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js @@ -0,0 +1,89 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START cloudiot_v1_generated_DeviceManager_ListDevices_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + */ + // const parent = 'abc123' + /** + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + */ + // const deviceNumIds = 1234 + /** + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + */ + // const deviceIds = 'abc123' + /** + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. + */ + // const fieldMask = '' + /** + * Options related to gateways. + */ + // const gatewayListOptions = '' + /** + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function listDevices() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await iotClient.listDevicesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listDevices(); + // [END cloudiot_v1_generated_DeviceManager_ListDevices_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js new file mode 100644 index 00000000000..5c94c3f6701 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name, binaryData) { + // [START cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const name = 'abc123' + /** + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + */ + // const versionToUpdate = 1234 + /** + * Required. The configuration data for the device. + */ + // const binaryData = 'Buffer.from('string')' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function modifyCloudToDeviceConfig() { + // Construct request + const request = { + name, + binaryData, + }; + + // Run request + const response = await iotClient.modifyCloudToDeviceConfig(request); + console.log(response); + } + + modifyCloudToDeviceConfig(); + // [END cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js new file mode 100644 index 00000000000..be1e94bdedc --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name, binaryData) { + // [START cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const name = 'abc123' + /** + * Required. The command data to send to the device. + */ + // const binaryData = 'Buffer.from('string')' + /** + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + */ + // const subfolder = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function sendCommandToDevice() { + // Construct request + const request = { + name, + binaryData, + }; + + // Run request + const response = await iotClient.sendCommandToDevice(request); + console.log(response); + } + + sendCommandToDevice(); + // [END cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js new file mode 100644 index 00000000000..e6a075ba82a --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(resource, policy) { + // [START cloudiot_v1_generated_DeviceManager_SetIamPolicy_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function setIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await iotClient.setIamPolicy(request); + console.log(response); + } + + setIamPolicy(); + // [END cloudiot_v1_generated_DeviceManager_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js new file mode 100644 index 00000000000..5f5eb59cdf8 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(resource, permissions) { + // [START cloudiot_v1_generated_DeviceManager_TestIamPermissions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function testIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await iotClient.testIamPermissions(request); + console.log(response); + } + + testIamPermissions(); + // [END cloudiot_v1_generated_DeviceManager_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js new file mode 100644 index 00000000000..960f873c473 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, gatewayId, deviceId) { + // [START cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + // const parent = 'abc123' + /** + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + */ + // const gatewayId = 'abc123' + /** + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + */ + // const deviceId = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function unbindDeviceFromGateway() { + // Construct request + const request = { + parent, + gatewayId, + deviceId, + }; + + // Run request + const response = await iotClient.unbindDeviceFromGateway(request); + console.log(response); + } + + unbindDeviceFromGateway(); + // [END cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js new file mode 100644 index 00000000000..a9910d37a4d --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(device, updateMask) { + // [START cloudiot_v1_generated_DeviceManager_UpdateDevice_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + // const device = '' + /** + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + */ + // const updateMask = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function updateDevice() { + // Construct request + const request = { + device, + updateMask, + }; + + // Run request + const response = await iotClient.updateDevice(request); + console.log(response); + } + + updateDevice(); + // [END cloudiot_v1_generated_DeviceManager_UpdateDevice_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js new file mode 100644 index 00000000000..c521bf69340 --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(deviceRegistry, updateMask) { + // [START cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + // const deviceRegistry = '' + /** + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + */ + // const updateMask = '' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function updateDeviceRegistry() { + // Construct request + const request = { + deviceRegistry, + updateMask, + }; + + // Run request + const response = await iotClient.updateDeviceRegistry(request); + console.log(response); + } + + updateDeviceRegistry(); + // [END cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index e370cde11ce..2c0723f8007 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -2092,7 +2092,8 @@ export class DeviceManagerClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDeviceRegistries']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDeviceRegistries.createStream( this.innerApiCalls.listDeviceRegistries as gax.GaxCall, @@ -2148,7 +2149,8 @@ export class DeviceManagerClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDeviceRegistries']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDeviceRegistries.asyncIterate( this.innerApiCalls['listDeviceRegistries'] as GaxCall, @@ -2319,7 +2321,8 @@ export class DeviceManagerClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDevices']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDevices.createStream( this.innerApiCalls.listDevices as gax.GaxCall, @@ -2388,7 +2391,8 @@ export class DeviceManagerClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDevices']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDevices.asyncIterate( this.innerApiCalls['listDevices'] as GaxCall, From cefe9a1f94e00a5d148672028d1e8fea260d432f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 23:18:52 +0200 Subject: [PATCH 318/370] chore(deps): update dependency @types/node to v16 (#525) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 385fd8718a5..0663db87dc5 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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.2.1", "gts": "^2.0.0", From 1a067e81d6a8894f7e7ad22686155914a835744a Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 3 Nov 2021 11:56:15 -0400 Subject: [PATCH 319/370] chore(cloud-rad): delete api-extractor config (#526) --- packages/google-cloud-iot/api-extractor.json | 369 ------------------- 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-iot/api-extractor.json diff --git a/packages/google-cloud-iot/api-extractor.json b/packages/google-cloud-iot/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-iot/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 6339ecffdaf709349c3b4bfe785e7ff8bfcbde08 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:40:37 +0100 Subject: [PATCH 320/370] chore(deps): update dependency sinon to v12 (#527) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0663db87dc5..d23b2bf1b36 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -58,7 +58,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 dcf1e17496657c40b81beb9f777c8fef1e1f3c78 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 14:52:59 -0800 Subject: [PATCH 321/370] docs(samples): add example tags to generated samples (#528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google-cloud-iot/linkinator.config.json | 2 +- .../device_manager.bind_device_to_gateway.js | 4 +- .../v1/device_manager.create_device.js | 6 +- .../device_manager.create_device_registry.js | 6 +- .../v1/device_manager.delete_device.js | 4 +- .../device_manager.delete_device_registry.js | 4 +- .../generated/v1/device_manager.get_device.js | 6 +- .../v1/device_manager.get_device_registry.js | 4 +- .../v1/device_manager.get_iam_policy.js | 6 +- ...ice_manager.list_device_config_versions.js | 4 +- .../device_manager.list_device_registries.js | 4 +- .../v1/device_manager.list_device_states.js | 4 +- .../v1/device_manager.list_devices.js | 8 +- ...e_manager.modify_cloud_to_device_config.js | 4 +- .../device_manager.send_command_to_device.js | 4 +- .../v1/device_manager.set_iam_policy.js | 6 +- .../v1/device_manager.test_iam_permissions.js | 6 +- ...vice_manager.unbind_device_from_gateway.js | 4 +- .../v1/device_manager.update_device.js | 8 +- .../device_manager.update_device_registry.js | 8 +- .../src/v1/device_manager_client.ts | 982 +++++++++--------- 21 files changed, 538 insertions(+), 546 deletions(-) diff --git a/packages/google-cloud-iot/linkinator.config.json b/packages/google-cloud-iot/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-iot/linkinator.config.json +++ b/packages/google-cloud-iot/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js index ef68a2f2a43..0ee8f9da9de 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js @@ -42,7 +42,7 @@ function main(parent, gatewayId, deviceId) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function bindDeviceToGateway() { + async function callBindDeviceToGateway() { // Construct request const request = { parent, @@ -55,7 +55,7 @@ function main(parent, gatewayId, deviceId) { console.log(response); } - bindDeviceToGateway(); + callBindDeviceToGateway(); // [END cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js index a0cff18f921..686468a65c2 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js @@ -30,7 +30,7 @@ function main(parent, device) { * generates `name` from the device registry `id` and the * `parent` field. */ - // const device = '' + // const device = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -38,7 +38,7 @@ function main(parent, device) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function createDevice() { + async function callCreateDevice() { // Construct request const request = { parent, @@ -50,7 +50,7 @@ function main(parent, device) { console.log(response); } - createDevice(); + callCreateDevice(); // [END cloudiot_v1_generated_DeviceManager_CreateDevice_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js index dc549ab5b02..2e522cf7ad6 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js @@ -29,7 +29,7 @@ function main(parent, deviceRegistry) { * generate that field from the device registry `id` provided and the * `parent` field. */ - // const deviceRegistry = '' + // const deviceRegistry = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -37,7 +37,7 @@ function main(parent, deviceRegistry) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function createDeviceRegistry() { + async function callCreateDeviceRegistry() { // Construct request const request = { parent, @@ -49,7 +49,7 @@ function main(parent, deviceRegistry) { console.log(response); } - createDeviceRegistry(); + callCreateDeviceRegistry(); // [END cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js index d3c2658cfc9..509ec3f51d8 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function deleteDevice() { + async function callDeleteDevice() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteDevice(); + callDeleteDevice(); // [END cloudiot_v1_generated_DeviceManager_DeleteDevice_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js index fc3fe930c37..3fc2e6e16e1 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function deleteDeviceRegistry() { + async function callDeleteDeviceRegistry() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - deleteDeviceRegistry(); + callDeleteDeviceRegistry(); // [END cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js index 515f87814eb..8acc05e2386 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js @@ -30,7 +30,7 @@ function main(name) { * field mask is unset or empty, all fields are returned. Fields have to be * provided in snake_case format, for example: `last_heartbeat_time`. */ - // const fieldMask = '' + // const fieldMask = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -38,7 +38,7 @@ function main(name) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function getDevice() { + async function callGetDevice() { // Construct request const request = { name, @@ -49,7 +49,7 @@ function main(name) { console.log(response); } - getDevice(); + callGetDevice(); // [END cloudiot_v1_generated_DeviceManager_GetDevice_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js index 46bdf72d8dc..3e5b0045058 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function getDeviceRegistry() { + async function callGetDeviceRegistry() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getDeviceRegistry(); + callGetDeviceRegistry(); // [END cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js index 7d6db9ed210..28acbe27a9d 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js @@ -28,7 +28,7 @@ function main(resource) { * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. This field is only used by Cloud IAM. */ - // const options = '' + // const options = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -36,7 +36,7 @@ function main(resource) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function getIamPolicy() { + async function callGetIamPolicy() { // Construct request const request = { resource, @@ -47,7 +47,7 @@ function main(resource) { console.log(response); } - getIamPolicy(); + callGetIamPolicy(); // [END cloudiot_v1_generated_DeviceManager_GetIamPolicy_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js index 672446ef1e2..53f4ffb8446 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js @@ -38,7 +38,7 @@ function main(name) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function listDeviceConfigVersions() { + async function callListDeviceConfigVersions() { // Construct request const request = { name, @@ -49,7 +49,7 @@ function main(name) { console.log(response); } - listDeviceConfigVersions(); + callListDeviceConfigVersions(); // [END cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js index 6a04762fe55..1389e9f70c7 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js @@ -44,7 +44,7 @@ function main(parent) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function listDeviceRegistries() { + async function callListDeviceRegistries() { // Construct request const request = { parent, @@ -57,7 +57,7 @@ function main(parent) { } } - listDeviceRegistries(); + callListDeviceRegistries(); // [END cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js index 20c05621ea4..804586a0124 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js @@ -38,7 +38,7 @@ function main(name) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function listDeviceStates() { + async function callListDeviceStates() { // Construct request const request = { name, @@ -49,7 +49,7 @@ function main(name) { console.log(response); } - listDeviceStates(); + callListDeviceStates(); // [END cloudiot_v1_generated_DeviceManager_ListDeviceStates_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js index f0ee8de5550..ffbf2a72b14 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js @@ -40,11 +40,11 @@ function main(parent) { * other fields specified in snake_case format, for example: * `last_heartbeat_time`. */ - // const fieldMask = '' + // const fieldMask = {} /** * Options related to gateways. */ - // const gatewayListOptions = '' + // const gatewayListOptions = {} /** * The maximum number of devices to return in the response. If this value * is zero, the service will select a default size. A call may return fewer @@ -65,7 +65,7 @@ function main(parent) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function listDevices() { + async function callListDevices() { // Construct request const request = { parent, @@ -78,7 +78,7 @@ function main(parent) { } } - listDevices(); + callListDevices(); // [END cloudiot_v1_generated_DeviceManager_ListDevices_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js index 5c94c3f6701..1459f46ef96 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js @@ -44,7 +44,7 @@ function main(name, binaryData) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function modifyCloudToDeviceConfig() { + async function callModifyCloudToDeviceConfig() { // Construct request const request = { name, @@ -56,7 +56,7 @@ function main(name, binaryData) { console.log(response); } - modifyCloudToDeviceConfig(); + callModifyCloudToDeviceConfig(); // [END cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js index be1e94bdedc..46d5982212e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js @@ -44,7 +44,7 @@ function main(name, binaryData) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function sendCommandToDevice() { + async function callSendCommandToDevice() { // Construct request const request = { name, @@ -56,7 +56,7 @@ function main(name, binaryData) { console.log(response); } - sendCommandToDevice(); + callSendCommandToDevice(); // [END cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js index e6a075ba82a..60c3af9d74c 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js @@ -30,7 +30,7 @@ function main(resource, policy) { * valid policy but certain Cloud Platform services (such as Projects) * might reject them. */ - // const policy = '' + // const policy = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -38,7 +38,7 @@ function main(resource, policy) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function setIamPolicy() { + async function callSetIamPolicy() { // Construct request const request = { resource, @@ -50,7 +50,7 @@ function main(resource, policy) { console.log(response); } - setIamPolicy(); + callSetIamPolicy(); // [END cloudiot_v1_generated_DeviceManager_SetIamPolicy_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js index 5f5eb59cdf8..0280bbfb30c 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js @@ -28,7 +28,7 @@ function main(resource, permissions) { * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). */ // const permissions = 'abc123' @@ -38,7 +38,7 @@ function main(resource, permissions) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function testIamPermissions() { + async function callTestIamPermissions() { // Construct request const request = { resource, @@ -50,7 +50,7 @@ function main(resource, permissions) { console.log(response); } - testIamPermissions(); + callTestIamPermissions(); // [END cloudiot_v1_generated_DeviceManager_TestIamPermissions_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js index 960f873c473..8619782f38e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js @@ -42,7 +42,7 @@ function main(parent, gatewayId, deviceId) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function unbindDeviceFromGateway() { + async function callUnbindDeviceFromGateway() { // Construct request const request = { parent, @@ -55,7 +55,7 @@ function main(parent, gatewayId, deviceId) { console.log(response); } - unbindDeviceFromGateway(); + callUnbindDeviceFromGateway(); // [END cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js index a9910d37a4d..324c85f1f17 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js @@ -25,14 +25,14 @@ function main(device, updateMask) { * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. */ - // const device = '' + // const device = {} /** * Required. Only updates the `device` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. * Mutable top-level fields: `credentials`, `blocked`, and `metadata` */ - // const updateMask = '' + // const updateMask = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -40,7 +40,7 @@ function main(device, updateMask) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function updateDevice() { + async function callUpdateDevice() { // Construct request const request = { device, @@ -52,7 +52,7 @@ function main(device, updateMask) { console.log(response); } - updateDevice(); + callUpdateDevice(); // [END cloudiot_v1_generated_DeviceManager_UpdateDevice_async] } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js index c521bf69340..c2cb6314684 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js @@ -24,7 +24,7 @@ function main(deviceRegistry, updateMask) { * the `name` field must indicate the path of the resource. For example, * `projects/example-project/locations/us-central1/registries/my-registry`. */ - // const deviceRegistry = '' + // const deviceRegistry = {} /** * Required. Only updates the `device_registry` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that @@ -32,7 +32,7 @@ function main(deviceRegistry, updateMask) { * Mutable top-level fields: `event_notification_config`, `http_config`, * `mqtt_config`, and `state_notification_config`. */ - // const updateMask = '' + // const updateMask = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; @@ -40,7 +40,7 @@ function main(deviceRegistry, updateMask) { // Instantiates a client const iotClient = new DeviceManagerClient(); - async function updateDeviceRegistry() { + async function callUpdateDeviceRegistry() { // Construct request const request = { deviceRegistry, @@ -52,7 +52,7 @@ function main(deviceRegistry, updateMask) { console.log(response); } - updateDeviceRegistry(); + callUpdateDeviceRegistry(); // [END cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async] } diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 2c0723f8007..01b5b0ff407 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -345,6 +345,28 @@ export class DeviceManagerClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Creates a device registry that contains devices. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.create_device_registry.js + * region_tag:cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async + */ createDeviceRegistry( request?: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, options?: CallOptions @@ -376,28 +398,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Creates a device registry that contains devices. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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.createDeviceRegistry(request); - */ createDeviceRegistry( request?: protos.google.cloud.iot.v1.ICreateDeviceRegistryRequest, optionsOrCallback?: @@ -441,6 +441,24 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.createDeviceRegistry(request, options, callback); } + /** + * Gets a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.get_device_registry.js + * region_tag:cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async + */ getDeviceRegistry( request?: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, options?: CallOptions @@ -468,24 +486,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Gets a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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.getDeviceRegistry(request); - */ getDeviceRegistry( request?: protos.google.cloud.iot.v1.IGetDeviceRegistryRequest, optionsOrCallback?: @@ -527,6 +527,31 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.getDeviceRegistry(request, options, callback); } + /** + * Updates a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.update_device_registry.js + * region_tag:cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async + */ updateDeviceRegistry( request?: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, options?: CallOptions @@ -558,31 +583,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Updates a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.iot.v1.DeviceRegistry} request.deviceRegistry - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * @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 [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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.updateDeviceRegistry(request); - */ updateDeviceRegistry( request?: protos.google.cloud.iot.v1.IUpdateDeviceRegistryRequest, optionsOrCallback?: @@ -626,6 +626,24 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.updateDeviceRegistry(request, options, callback); } + /** + * Deletes a device registry configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.delete_device_registry.js + * region_tag:cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async + */ deleteDeviceRegistry( request?: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, options?: CallOptions @@ -657,24 +675,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Deletes a device registry configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteDeviceRegistry(request); - */ deleteDeviceRegistry( request?: protos.google.cloud.iot.v1.IDeleteDeviceRegistryRequest, optionsOrCallback?: @@ -718,6 +718,29 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.deleteDeviceRegistry(request, options, callback); } + /** + * Creates a device in a device registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {google.cloud.iot.v1.Device} request.device + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.create_device.js + * region_tag:cloudiot_v1_generated_DeviceManager_CreateDevice_async + */ createDevice( request?: protos.google.cloud.iot.v1.ICreateDeviceRequest, options?: CallOptions @@ -745,29 +768,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Creates a device in a device registry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {google.cloud.iot.v1.Device} request.device - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * 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.createDevice(request); - */ createDevice( request?: protos.google.cloud.iot.v1.ICreateDeviceRequest, optionsOrCallback?: @@ -807,6 +807,29 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.createDevice(request, options, callback); } + /** + * Gets details about a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {google.protobuf.FieldMask} request.fieldMask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + * @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 [Device]{@link google.cloud.iot.v1.Device}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.get_device.js + * region_tag:cloudiot_v1_generated_DeviceManager_GetDevice_async + */ getDevice( request?: protos.google.cloud.iot.v1.IGetDeviceRequest, options?: CallOptions @@ -834,29 +857,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Gets details about a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {google.protobuf.FieldMask} request.fieldMask - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. Fields have to be - * provided in snake_case format, for example: `last_heartbeat_time`. - * @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 [Device]{@link google.cloud.iot.v1.Device}. - * 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.getDevice(request); - */ getDevice( request?: protos.google.cloud.iot.v1.IGetDeviceRequest, optionsOrCallback?: @@ -896,33 +896,6 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.getDevice(request, options, callback); } - updateDevice( - request?: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, - {} | undefined - ] - >; - updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - updateDevice( - request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.IDevice, - protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Updates a device. * @@ -945,9 +918,36 @@ export class DeviceManagerClient { * 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.updateDevice(request); + * @example include:samples/generated/v1/device_manager.update_device.js + * region_tag:cloudiot_v1_generated_DeviceManager_UpdateDevice_async */ + updateDevice( + request?: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | undefined, + {} | undefined + ] + >; + updateDevice( + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + updateDevice( + request: protos.google.cloud.iot.v1.IUpdateDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.IDevice, + protos.google.cloud.iot.v1.IUpdateDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; updateDevice( request?: protos.google.cloud.iot.v1.IUpdateDeviceRequest, optionsOrCallback?: @@ -987,6 +987,25 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.updateDevice(request, options, callback); } + /** + * Deletes a device. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.delete_device.js + * region_tag:cloudiot_v1_generated_DeviceManager_DeleteDevice_async + */ deleteDevice( request?: protos.google.cloud.iot.v1.IDeleteDeviceRequest, options?: CallOptions @@ -1014,25 +1033,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Deletes a device. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteDevice(request); - */ deleteDevice( request?: protos.google.cloud.iot.v1.IDeleteDeviceRequest, optionsOrCallback?: @@ -1072,6 +1072,35 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.deleteDevice(request, options, callback); } + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.versionToUpdate + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @param {Buffer} request.binaryData + * Required. The configuration data for the device. + * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.modify_cloud_to_device_config.js + * region_tag:cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async + */ modifyCloudToDeviceConfig( request?: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, options?: CallOptions @@ -1103,35 +1132,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Modifies the configuration for the device, which is eventually sent from - * the Cloud IoT Core servers. Returns the modified configuration version and - * its metadata. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.versionToUpdate - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * @param {Buffer} request.binaryData - * Required. The configuration data for the device. - * @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 [DeviceConfig]{@link google.cloud.iot.v1.DeviceConfig}. - * 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.modifyCloudToDeviceConfig(request); - */ modifyCloudToDeviceConfig( request?: protos.google.cloud.iot.v1.IModifyCloudToDeviceConfigRequest, optionsOrCallback?: @@ -1179,6 +1179,30 @@ export class DeviceManagerClient { callback ); } + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numVersions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.list_device_config_versions.js + * region_tag:cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async + */ listDeviceConfigVersions( request?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, options?: CallOptions @@ -1210,30 +1234,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Lists the last few versions of the device configuration in descending - * order (i.e.: newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.numVersions - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * @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 [ListDeviceConfigVersionsResponse]{@link google.cloud.iot.v1.ListDeviceConfigVersionsResponse}. - * 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.listDeviceConfigVersions(request); - */ listDeviceConfigVersions( request?: protos.google.cloud.iot.v1.IListDeviceConfigVersionsRequest, optionsOrCallback?: @@ -1281,6 +1281,30 @@ export class DeviceManagerClient { callback ); } + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {number} request.numStates + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.list_device_states.js + * region_tag:cloudiot_v1_generated_DeviceManager_ListDeviceStates_async + */ listDeviceStates( request?: protos.google.cloud.iot.v1.IListDeviceStatesRequest, options?: CallOptions @@ -1308,30 +1332,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Lists the last few versions of the device state in descending order (i.e.: - * newest first). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param {number} request.numStates - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * @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 [ListDeviceStatesResponse]{@link google.cloud.iot.v1.ListDeviceStatesResponse}. - * 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.listDeviceStates(request); - */ listDeviceStates( request?: protos.google.cloud.iot.v1.IListDeviceStatesRequest, optionsOrCallback?: @@ -1373,6 +1373,30 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.listDeviceStates(request, options, callback); } + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @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 [Policy]{@link google.iam.v1.Policy}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.set_iam_policy.js + * region_tag:cloudiot_v1_generated_DeviceManager_SetIamPolicy_async + */ setIamPolicy( request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions @@ -1400,30 +1424,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Sets the access control policy on the specified resource. Replaces any - * existing policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @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 [Policy]{@link google.iam.v1.Policy}. - * 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.setIamPolicy(request); - */ setIamPolicy( request?: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: @@ -1463,6 +1463,29 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); } + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * @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 [Policy]{@link google.iam.v1.Policy}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.get_iam_policy.js + * region_tag:cloudiot_v1_generated_DeviceManager_GetIamPolicy_async + */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions @@ -1490,29 +1513,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Gets the access control policy for a resource. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * @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 [Policy]{@link google.iam.v1.Policy}. - * 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.getIamPolicy(request); - */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: @@ -1552,6 +1552,31 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); } + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.test_iam_permissions.js + * region_tag:cloudiot_v1_generated_DeviceManager_TestIamPermissions_async + */ testIamPermissions( request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions @@ -1579,31 +1604,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Returns permissions that a caller has on the specified resource. - * If the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * 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.testIamPermissions(request); - */ testIamPermissions( request?: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: @@ -1622,54 +1622,27 @@ export class DeviceManagerClient { [ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - resource: request.resource || '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - sendCommandToDevice( - request?: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, - {} | undefined - ] - >; - sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; - sendCommandToDevice( - request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, - callback: Callback< - protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, - protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, - {} | null | undefined - > - ): void; + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); + this.initialize(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } /** * Sends a command to the specified device. In order for a device to be able * to receive commands, it must: @@ -1706,9 +1679,36 @@ export class DeviceManagerClient { * 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.sendCommandToDevice(request); + * @example include:samples/generated/v1/device_manager.send_command_to_device.js + * region_tag:cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async */ + sendCommandToDevice( + request?: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | undefined, + {} | undefined + ] + >; + sendCommandToDevice( + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; + sendCommandToDevice( + request: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, + callback: Callback< + protos.google.cloud.iot.v1.ISendCommandToDeviceResponse, + protos.google.cloud.iot.v1.ISendCommandToDeviceRequest | null | undefined, + {} | null | undefined + > + ): void; sendCommandToDevice( request?: protos.google.cloud.iot.v1.ISendCommandToDeviceRequest, optionsOrCallback?: @@ -1750,6 +1750,31 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.sendCommandToDevice(request, options, callback); } + /** + * Associates the device with the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.bind_device_to_gateway.js + * region_tag:cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async + */ bindDeviceToGateway( request?: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, options?: CallOptions @@ -1777,31 +1802,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Associates the device with the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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 [BindDeviceToGatewayResponse]{@link google.cloud.iot.v1.BindDeviceToGatewayResponse}. - * 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.bindDeviceToGateway(request); - */ bindDeviceToGateway( request?: protos.google.cloud.iot.v1.IBindDeviceToGatewayRequest, optionsOrCallback?: @@ -1843,6 +1843,31 @@ export class DeviceManagerClient { this.initialize(); return this.innerApiCalls.bindDeviceToGateway(request, options, callback); } + /** + * Deletes the association between the device and the gateway. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param {string} request.gatewayId + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param {string} request.deviceId + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/device_manager.unbind_device_from_gateway.js + * region_tag:cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async + */ unbindDeviceFromGateway( request?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, options?: CallOptions @@ -1874,31 +1899,6 @@ export class DeviceManagerClient { {} | null | undefined > ): void; - /** - * Deletes the association between the device and the gateway. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param {string} request.gatewayId - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param {string} request.deviceId - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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 [UnbindDeviceFromGatewayResponse]{@link google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}. - * 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.unbindDeviceFromGateway(request); - */ unbindDeviceFromGateway( request?: protos.google.cloud.iot.v1.IUnbindDeviceFromGatewayRequest, optionsOrCallback?: @@ -1947,6 +1947,36 @@ export class DeviceManagerClient { ); } + /** + * Lists device registries. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @param {number} request.pageSize + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. + * 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 `listDeviceRegistriesAsync()` + * 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. + */ listDeviceRegistries( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, options?: CallOptions @@ -1978,36 +2008,6 @@ export class DeviceManagerClient { protos.google.cloud.iot.v1.IDeviceRegistry > ): void; - /** - * Lists device registries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @param {number} request.pageSize - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [DeviceRegistry]{@link google.cloud.iot.v1.DeviceRegistry}. - * 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 `listDeviceRegistriesAsync()` - * 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. - */ listDeviceRegistries( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, optionsOrCallback?: @@ -2130,11 +2130,8 @@ export class DeviceManagerClient { * 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.listDeviceRegistriesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/device_manager.list_device_registries.js + * region_tag:cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async */ listDeviceRegistriesAsync( request?: protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, @@ -2148,7 +2145,6 @@ export class DeviceManagerClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listDeviceRegistries']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -2158,33 +2154,6 @@ export class DeviceManagerClient { callSettings ) as AsyncIterable; } - listDevices( - request?: protos.google.cloud.iot.v1.IListDevicesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.iot.v1.IDevice[], - protos.google.cloud.iot.v1.IListDevicesRequest | null, - protos.google.cloud.iot.v1.IListDevicesResponse - ] - >; - listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, - protos.google.cloud.iot.v1.IDevice - > - ): void; - listDevices( - request: protos.google.cloud.iot.v1.IListDevicesRequest, - callback: PaginationCallback< - protos.google.cloud.iot.v1.IListDevicesRequest, - protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, - protos.google.cloud.iot.v1.IDevice - > - ): void; /** * List devices in a device registry. * @@ -2228,6 +2197,33 @@ export class DeviceManagerClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDevices( + request?: protos.google.cloud.iot.v1.IListDevicesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.iot.v1.IDevice[], + protos.google.cloud.iot.v1.IListDevicesRequest | null, + protos.google.cloud.iot.v1.IListDevicesResponse + ] + >; + listDevices( + request: protos.google.cloud.iot.v1.IListDevicesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + > + ): void; + listDevices( + request: protos.google.cloud.iot.v1.IListDevicesRequest, + callback: PaginationCallback< + protos.google.cloud.iot.v1.IListDevicesRequest, + protos.google.cloud.iot.v1.IListDevicesResponse | null | undefined, + protos.google.cloud.iot.v1.IDevice + > + ): void; listDevices( request?: protos.google.cloud.iot.v1.IListDevicesRequest, optionsOrCallback?: @@ -2372,11 +2368,8 @@ export class DeviceManagerClient { * 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.listDevicesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/device_manager.list_devices.js + * region_tag:cloudiot_v1_generated_DeviceManager_ListDevices_async */ listDevicesAsync( request?: protos.google.cloud.iot.v1.IListDevicesRequest, @@ -2390,7 +2383,6 @@ export class DeviceManagerClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listDevices']; const callSettings = defaultCallSettings.merge(options); this.initialize(); From 28d88a656310d64d51c7d35fc96652072bf77ae8 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:22 +0000 Subject: [PATCH 322/370] build: add generated samples to .eslintignore (#529) --- packages/google-cloud-iot/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-iot/.eslintignore b/packages/google-cloud-iot/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-iot/.eslintignore +++ b/packages/google-cloud-iot/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 99959570e9c51892bd8116645516f3653c14007b 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 19:52:34 +0000 Subject: [PATCH 323/370] docs(node): support "stable"/"preview" release level (#1312) (#532) --- packages/google-cloud-iot/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 106b54efb7c..0d20c7b9079 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -127,6 +127,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 8558ed370dafaae015fefc9e5ff02d9fc5910bfd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:16:12 +0000 Subject: [PATCH 324/370] docs(badges): tweak badge to use new preview/stable language (#1314) (#533) --- packages/google-cloud-iot/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 0d20c7b9079..6e68530d1a1 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -6,7 +6,6 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-iot/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-iot) From 10943feacc97158ab425f516ca048f39304aa961 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 5 Jan 2022 07:21:24 -0500 Subject: [PATCH 325/370] chore: add api_shortname and library_type to repo metadata (#531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update .repo-metadata.json * chore: update library_type in repo-metadata.json * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .repo-metadata.json * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- packages/google-cloud-iot/.repo-metadata.json | 6 ++++-- packages/google-cloud-iot/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index 8883ca18c84..a53e100f9c4 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -3,12 +3,14 @@ "api_id": "cloudiot.googleapis.com", "codeowner_team": "@googleapis/api-iot", "distribution_name": "@google-cloud/iot", - "release_level": "ga", + "release_level": "stable", "language": "nodejs", "name_pretty": "Google Cloud Internet of Things (IoT) Core", "repo": "googleapis/nodejs-iot", "product_documentation": "https://cloud.google.com/iot", "requires_billing": true, "name": "iot", - "default_version": "v1" + "default_version": "v1", + "api_shortname": "cloudiot", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 6e68530d1a1..1c9b436a2c2 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -4,7 +4,7 @@ # [Google Cloud Internet of Things (IoT) Core: Node.js Client](https://github.com/googleapis/nodejs-iot) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) @@ -116,10 +116,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. @@ -127,7 +127,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 838b574e72ecf9ad97a28b41fa9fe2a82a94509d 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:08:36 +0000 Subject: [PATCH 326/370] test(nodejs): remove 15 add 16 (#1322) (#535) --- packages/google-cloud-iot/protos/protos.d.ts | 2 +- packages/google-cloud-iot/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index e4d98a4e756..751221e1ca5 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index c0743129ea3..cc370934adb 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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 2fed45eeba4f1a73088b72b2dcce359d760d7790 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:56:35 +0000 Subject: [PATCH 327/370] chore: update v2.12.0 gapic-generator-typescript (#541) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- packages/google-cloud-iot/.jsdoc.js | 4 ++-- packages/google-cloud-iot/linkinator.config.json | 10 ++++++++-- .../v1/device_manager.bind_device_to_gateway.js | 1 + .../generated/v1/device_manager.create_device.js | 1 + .../v1/device_manager.create_device_registry.js | 1 + .../generated/v1/device_manager.delete_device.js | 1 + .../v1/device_manager.delete_device_registry.js | 1 + .../samples/generated/v1/device_manager.get_device.js | 1 + .../generated/v1/device_manager.get_device_registry.js | 1 + .../generated/v1/device_manager.get_iam_policy.js | 1 + .../v1/device_manager.list_device_config_versions.js | 1 + .../v1/device_manager.list_device_registries.js | 3 ++- .../generated/v1/device_manager.list_device_states.js | 1 + .../generated/v1/device_manager.list_devices.js | 3 ++- .../v1/device_manager.modify_cloud_to_device_config.js | 1 + .../v1/device_manager.send_command_to_device.js | 1 + .../generated/v1/device_manager.set_iam_policy.js | 1 + .../v1/device_manager.test_iam_permissions.js | 1 + .../v1/device_manager.unbind_device_from_gateway.js | 1 + .../generated/v1/device_manager.update_device.js | 1 + .../v1/device_manager.update_device_registry.js | 1 + .../google-cloud-iot/src/v1/device_manager_client.ts | 2 +- packages/google-cloud-iot/src/v1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-iot/system-test/install.ts | 2 +- .../google-cloud-iot/test/gapic_device_manager_v1.ts | 2 +- 27 files changed, 37 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/.jsdoc.js b/packages/google-cloud-iot/.jsdoc.js index 245e44837a6..99b19cfa65a 100644 --- a/packages/google-cloud-iot/.jsdoc.js +++ b/packages/google-cloud-iot/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/iot', diff --git a/packages/google-cloud-iot/linkinator.config.json b/packages/google-cloud-iot/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-iot/linkinator.config.json +++ b/packages/google-cloud-iot/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js index 0ee8f9da9de..479807e3625 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, gatewayId, deviceId) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js index 686468a65c2..39b846e02e6 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, device) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js index 2e522cf7ad6..d6a8de5ec15 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, deviceRegistry) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js index 509ec3f51d8..5d83af98475 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js index 3fc2e6e16e1..820bd17f45b 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js index 8acc05e2386..c62442039f0 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js index 3e5b0045058..572cc0e382d 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js index 28acbe27a9d..0eec70e43f5 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(resource) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js index 53f4ffb8446..e3613dc8e80 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js index 1389e9f70c7..28970081be0 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -53,7 +54,7 @@ function main(parent) { // Run request const iterable = await iotClient.listDeviceRegistriesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js index 804586a0124..8e89f43ae64 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js index ffbf2a72b14..b95b7b36c29 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -74,7 +75,7 @@ function main(parent) { // Run request const iterable = await iotClient.listDevicesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js index 1459f46ef96..5cf141fd0ac 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, binaryData) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js index 46d5982212e..62f69491ed8 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, binaryData) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js index 60c3af9d74c..25d08e257c9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(resource, policy) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js index 0280bbfb30c..8b1dd75be6e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(resource, permissions) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js index 8619782f38e..4e8836d0464 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, gatewayId, deviceId) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js index 324c85f1f17..566a0bf8b1f 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(device, updateMask) { diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js index c2cb6314684..5607456a7c6 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(deviceRegistry, updateMask) { diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 01b5b0ff407..e5ebfdd0f1f 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-iot/src/v1/index.ts b/packages/google-cloud-iot/src/v1/index.ts index 803202a8790..49977b4065f 100644 --- a/packages/google-cloud-iot/src/v1/index.ts +++ b/packages/google-cloud-iot/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js index 30c4d6bd5b9..42d2b98dc90 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.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. diff --git a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts index 67aa27d2150..7b3c0747089 100644 --- a/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-iot/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-iot/system-test/install.ts b/packages/google-cloud-iot/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-iot/system-test/install.ts +++ b/packages/google-cloud-iot/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index efc6cb06f48..d0afe988cd8 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 0570480defe9e8e14f9f58ba59b06c120c799851 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:08:52 +0000 Subject: [PATCH 328/370] docs(nodejs): version support policy edits (#1346) (#545) --- packages/google-cloud-iot/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 1c9b436a2c2..05fd841a3ee 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -95,21 +95,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/iot@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 9e6e37e63a5d8385cee1c3256d8fb39b11386513 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 5 Feb 2022 18:38:58 +0100 Subject: [PATCH 329/370] chore(deps): update dependency sinon to v13 (#543) 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.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index d23b2bf1b36..058d935791d 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -58,7 +58,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 031b5dd5ea354f065a0dcf6ed00d4c18576b5919 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Feb 2022 02:47:55 +0100 Subject: [PATCH 330/370] chore(deps): update dependency gts to v3 (#536) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 058d935791d..36ae1aeabfe 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -50,7 +50,7 @@ "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.2.1", - "gts": "^2.0.0", + "gts": "^3.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From 93f327ec2bc69014a02c221145818229ee88323d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:00:48 +0000 Subject: [PATCH 331/370] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#546) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../device_manager.bind_device_to_gateway.js | 9 +- .../v1/device_manager.create_device.js | 9 +- .../device_manager.create_device_registry.js | 9 +- .../v1/device_manager.delete_device.js | 9 +- .../device_manager.delete_device_registry.js | 9 +- .../generated/v1/device_manager.get_device.js | 9 +- .../v1/device_manager.get_device_registry.js | 9 +- .../v1/device_manager.get_iam_policy.js | 9 +- ...ice_manager.list_device_config_versions.js | 9 +- .../device_manager.list_device_registries.js | 9 +- .../v1/device_manager.list_device_states.js | 9 +- .../v1/device_manager.list_devices.js | 9 +- ...e_manager.modify_cloud_to_device_config.js | 9 +- .../device_manager.send_command_to_device.js | 9 +- .../v1/device_manager.set_iam_policy.js | 9 +- .../v1/device_manager.test_iam_permissions.js | 9 +- ...vice_manager.unbind_device_from_gateway.js | 9 +- .../v1/device_manager.update_device.js | 9 +- .../device_manager.update_device_registry.js | 9 +- .../snippet_metadata.google.cloud.iot.v1.json | 879 ++++++++++++++++++ .../src/v1/device_manager_client.ts | 5 +- .../test/gapic_device_manager_v1.ts | 302 +++++- 22 files changed, 1314 insertions(+), 43 deletions(-) create mode 100644 packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js index 479807e3625..e5d0348f48d 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js index 39b846e02e6..d38142b0f46 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js index d6a8de5ec15..6248800bb40 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js index 5d83af98475..ab1999e2b67 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js index 820bd17f45b..663be451d24 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js index c62442039f0..db5022fb8fe 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js index 572cc0e382d..7cbb7241bc3 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js index 0eec70e43f5..2bbdc4c57e9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js index e3613dc8e80..be6a024d4c9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js index 28970081be0..d7853e34aa2 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js index 8e89f43ae64..d9c8519d01d 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js index b95b7b36c29..7e33937aaa9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js index 5cf141fd0ac..9e415682954 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js index 62f69491ed8..df3997168a9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js index 25d08e257c9..69a8c763c3e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js index 8b1dd75be6e..81f299d385f 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js index 4e8836d0464..37fb81b5d88 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js index 566a0bf8b1f..f2c217889f9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js index 5607456a7c6..c3a34b16258 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json new file mode 100644 index 00000000000..74f68c7c97c --- /dev/null +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -0,0 +1,879 @@ +{ + "clientLibrary": { + "name": "nodejs-iot", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.iot.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async", + "title": "iot createDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Creates a device registry that contains devices.", + "canonical": true, + "file": "device_manager.create_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "device_registry", + "type": ".google.cloud.iot.v1.DeviceRegistry" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceRegistry", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "CreateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async", + "title": "iot getDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Gets a device registry configuration.", + "canonical": true, + "file": "device_manager.get_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceRegistry", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "GetDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async", + "title": "iot updateDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Updates a device registry configuration.", + "canonical": true, + "file": "device_manager.update_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "device_registry", + "type": ".google.cloud.iot.v1.DeviceRegistry" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceRegistry", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "UpdateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async", + "title": "iot deleteDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Deletes a device registry configuration.", + "canonical": true, + "file": "device_manager.delete_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "DeleteDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async", + "title": "iot listDeviceRegistries Sample", + "origin": "API_DEFINITION", + "description": " Lists device registries.", + "canonical": true, + "file": "device_manager.list_device_registries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeviceRegistries", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceRegistries", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.ListDeviceRegistriesResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDeviceRegistries", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceRegistries", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_CreateDevice_async", + "title": "iot createDevice Sample", + "origin": "API_DEFINITION", + "description": " Creates a device in a device registry.", + "canonical": true, + "file": "device_manager.create_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDevice", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "device", + "type": ".google.cloud.iot.v1.Device" + } + ], + "resultType": ".google.cloud.iot.v1.Device", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "CreateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_GetDevice_async", + "title": "iot getDevice Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a device.", + "canonical": true, + "file": "device_manager.get_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "field_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.iot.v1.Device", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "GetDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_UpdateDevice_async", + "title": "iot updateDevice Sample", + "origin": "API_DEFINITION", + "description": " Updates a device.", + "canonical": true, + "file": "device_manager.update_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDevice", + "async": true, + "parameters": [ + { + "name": "device", + "type": ".google.cloud.iot.v1.Device" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.iot.v1.Device", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "UpdateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_DeleteDevice_async", + "title": "iot deleteDevice Sample", + "origin": "API_DEFINITION", + "description": " Deletes a device.", + "canonical": true, + "file": "device_manager.delete_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "DeleteDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDevices_async", + "title": "iot listDevices Sample", + "origin": "API_DEFINITION", + "description": " List devices in a device registry.", + "canonical": true, + "file": "device_manager.list_devices.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDevices", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDevices", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "device_num_ids", + "type": "TYPE_UINT64[]" + }, + { + "name": "device_ids", + "type": "TYPE_STRING[]" + }, + { + "name": "field_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "gateway_list_options", + "type": ".google.cloud.iot.v1.GatewayListOptions" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.ListDevicesResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDevices", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDevices", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async", + "title": "iot modifyCloudToDeviceConfig Sample", + "origin": "API_DEFINITION", + "description": " Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.", + "canonical": true, + "file": "device_manager.modify_cloud_to_device_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ModifyCloudToDeviceConfig", + "fullName": "google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "version_to_update", + "type": "TYPE_INT64" + }, + { + "name": "binary_data", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceConfig", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ModifyCloudToDeviceConfig", + "fullName": "google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfig", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async", + "title": "iot listDeviceConfigVersions Sample", + "origin": "API_DEFINITION", + "description": " Lists the last few versions of the device configuration in descending order (i.e.: newest first).", + "canonical": true, + "file": "device_manager.list_device_config_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeviceConfigVersions", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "num_versions", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.iot.v1.ListDeviceConfigVersionsResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDeviceConfigVersions", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersions", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceStates_async", + "title": "iot listDeviceStates Sample", + "origin": "API_DEFINITION", + "description": " Lists the last few versions of the device state in descending order (i.e.: newest first).", + "canonical": true, + "file": "device_manager.list_device_states.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeviceStates", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceStates", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "num_states", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.iot.v1.ListDeviceStatesResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDeviceStates", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceStates", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_SetIamPolicy_async", + "title": "iot setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on the specified resource. Replaces any existing policy.", + "canonical": true, + "file": "device_manager.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.SetIamPolicy", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_GetIamPolicy_async", + "title": "iot getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "canonical": true, + "file": "device_manager.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.GetIamPolicy", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_TestIamPermissions_async", + "title": "iot testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.", + "canonical": true, + "file": "device_manager.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.iot.v1.DeviceManager.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.iot.v1.DeviceManager.TestIamPermissions", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async", + "title": "iot sendCommandToDevice Sample", + "origin": "API_DEFINITION", + "description": " Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the device.", + "canonical": true, + "file": "device_manager.send_command_to_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SendCommandToDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.SendCommandToDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "binary_data", + "type": "TYPE_BYTES" + }, + { + "name": "subfolder", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.SendCommandToDeviceResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "SendCommandToDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.SendCommandToDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async", + "title": "iot bindDeviceToGateway Sample", + "origin": "API_DEFINITION", + "description": " Associates the device with the gateway.", + "canonical": true, + "file": "device_manager.bind_device_to_gateway.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BindDeviceToGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.BindDeviceToGateway", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "gateway_id", + "type": "TYPE_STRING" + }, + { + "name": "device_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.BindDeviceToGatewayResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "BindDeviceToGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.BindDeviceToGateway", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + }, + { + "regionTag": "cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async", + "title": "iot unbindDeviceFromGateway Sample", + "origin": "API_DEFINITION", + "description": " Deletes the association between the device and the gateway.", + "canonical": true, + "file": "device_manager.unbind_device_from_gateway.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UnbindDeviceFromGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGateway", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "gateway_id", + "type": "TYPE_STRING" + }, + { + "name": "device_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.UnbindDeviceFromGatewayResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "UnbindDeviceFromGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGateway", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } + } + ] +} diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index e5ebfdd0f1f..c22f5c4a6a4 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -2555,9 +2555,8 @@ export class DeviceManagerClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.deviceManagerStub!.then(stub => { + if (this.deviceManagerStub && !this._terminated) { + return this.deviceManagerStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index d0afe988cd8..691b9edaf65 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -151,12 +151,27 @@ describe('v1.DeviceManagerClient', () => { assert(client.deviceManagerStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new devicemanagerModule.v1.DeviceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.deviceManagerStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManagerStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -303,6 +318,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createDeviceRegistry with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createDeviceRegistry(request), expectedError); + }); }); describe('getDeviceRegistry', () => { @@ -414,6 +445,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getDeviceRegistry with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDeviceRegistry(request), expectedError); + }); }); describe('updateDeviceRegistry', () => { @@ -529,6 +576,23 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateDeviceRegistry with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() + ); + request.deviceRegistry = {}; + request.deviceRegistry.name = ''; + const expectedHeaderRequestParams = 'device_registry.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateDeviceRegistry(request), expectedError); + }); }); describe('deleteDeviceRegistry', () => { @@ -641,6 +705,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteDeviceRegistry with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteDeviceRegistry(request), expectedError); + }); }); describe('createDevice', () => { @@ -752,6 +832,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createDevice with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.CreateDeviceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createDevice(request), expectedError); + }); }); describe('getDevice', () => { @@ -860,6 +956,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getDevice with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.GetDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDevice(request), expectedError); + }); }); describe('updateDevice', () => { @@ -974,6 +1086,23 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateDevice with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UpdateDeviceRequest() + ); + request.device = {}; + request.device.name = ''; + const expectedHeaderRequestParams = 'device.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateDevice(request), expectedError); + }); }); describe('deleteDevice', () => { @@ -1085,6 +1214,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteDevice with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.DeleteDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteDevice(request), expectedError); + }); }); describe('modifyCloudToDeviceConfig', () => { @@ -1200,6 +1345,25 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes modifyCloudToDeviceConfig with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.modifyCloudToDeviceConfig(request), + expectedError + ); + }); }); describe('listDeviceConfigVersions', () => { @@ -1315,6 +1479,25 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes listDeviceConfigVersions with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.listDeviceConfigVersions(request), + expectedError + ); + }); }); describe('listDeviceStates', () => { @@ -1426,6 +1609,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes listDeviceStates with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.ListDeviceStatesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listDeviceStates(request), expectedError); + }); }); describe('setIamPolicy', () => { @@ -1537,6 +1736,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); }); describe('getIamPolicy', () => { @@ -1648,6 +1863,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); }); describe('testIamPermissions', () => { @@ -1760,6 +1991,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); }); describe('sendCommandToDevice', () => { @@ -1872,6 +2119,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes sendCommandToDevice with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.sendCommandToDevice(request), expectedError); + }); }); describe('bindDeviceToGateway', () => { @@ -1984,6 +2247,22 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes bindDeviceToGateway with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.bindDeviceToGateway(request), expectedError); + }); }); describe('unbindDeviceFromGateway', () => { @@ -2099,6 +2378,25 @@ describe('v1.DeviceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes unbindDeviceFromGateway with closed client', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.unbindDeviceFromGateway(request), + expectedError + ); + }); }); describe('listDeviceRegistries', () => { From c288c7f30ed2e461c65c4bb6b1c1b0e82fba0c81 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:34:11 +0000 Subject: [PATCH 332/370] chore: update v2.14.2 gapic-generator-typescript (#550) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_device_manager_v1.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 691b9edaf65..d2d77742070 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -329,7 +329,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createDeviceRegistry(request), expectedError); @@ -456,7 +455,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDeviceRegistry(request), expectedError); @@ -588,7 +586,6 @@ describe('v1.DeviceManagerClient', () => { ); request.deviceRegistry = {}; request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateDeviceRegistry(request), expectedError); @@ -716,7 +713,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteDeviceRegistry(request), expectedError); @@ -843,7 +839,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.CreateDeviceRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createDevice(request), expectedError); @@ -967,7 +962,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.GetDeviceRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDevice(request), expectedError); @@ -1098,7 +1092,6 @@ describe('v1.DeviceManagerClient', () => { ); request.device = {}; request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateDevice(request), expectedError); @@ -1225,7 +1218,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteDevice(request), expectedError); @@ -1356,7 +1348,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1490,7 +1481,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1620,7 +1610,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.listDeviceStates(request), expectedError); @@ -1747,7 +1736,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.iam.v1.SetIamPolicyRequest() ); request.resource = ''; - const expectedHeaderRequestParams = 'resource='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.setIamPolicy(request), expectedError); @@ -1874,7 +1862,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.iam.v1.GetIamPolicyRequest() ); request.resource = ''; - const expectedHeaderRequestParams = 'resource='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getIamPolicy(request), expectedError); @@ -2002,7 +1989,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.iam.v1.TestIamPermissionsRequest() ); request.resource = ''; - const expectedHeaderRequestParams = 'resource='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.testIamPermissions(request), expectedError); @@ -2130,7 +2116,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.sendCommandToDevice(request), expectedError); @@ -2258,7 +2243,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.bindDeviceToGateway(request), expectedError); @@ -2389,7 +2373,6 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( From 785e89194445a494c86b6c1d0e4d315e4abcb340 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 17:34:20 +0000 Subject: [PATCH 333/370] feat: AuditConfig for IAM v1 (#552) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 439356405 Source-Link: https://github.com/googleapis/googleapis/commit/afa2ba156bd5c83ad8168030ab801a8ca84ac819 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3e40c17e1510c95fab58fc2143ccb61cceca5989 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2U0MGMxN2UxNTEwYzk1ZmFiNThmYzIxNDNjY2I2MWNjZWNhNTk4OSJ9 --- .../samples/generated/v1/device_manager.get_iam_policy.js | 2 +- .../samples/generated/v1/device_manager.set_iam_policy.js | 7 +++++++ .../v1/snippet_metadata.google.cloud.iot.v1.json | 6 +++++- packages/google-cloud-iot/src/v1/device_manager_client.ts | 8 +++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js index 2bbdc4c57e9..039b3941163 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js @@ -32,7 +32,7 @@ function main(resource) { // const resource = 'abc123' /** * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. + * `GetIamPolicy`. */ // const options = {} diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js index 69a8c763c3e..05ba74e3704 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js @@ -37,6 +37,13 @@ function main(resource, policy) { * might reject them. */ // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} // Imports the Iot library const {DeviceManagerClient} = require('@google-cloud/iot').v1; diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 74f68c7c97c..f70dc8b9871 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 66, "type": "FULL" } ], @@ -626,6 +626,10 @@ { "name": "policy", "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" } ], "resultType": ".google.iam.v1.Policy", diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index c22f5c4a6a4..b73c11644d8 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -1387,6 +1387,12 @@ export class DeviceManagerClient { * the policy is limited to a few 10s of KB. An empty policy is a * valid policy but certain Cloud Platform services (such as Projects) * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` * @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. @@ -1475,7 +1481,7 @@ export class DeviceManagerClient { * See the operation documentation for the appropriate value for this field. * @param {google.iam.v1.GetPolicyOptions} request.options * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. + * `GetIamPolicy`. * @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. From 115379367c432c0e6170c32426c1c4869d8d9817 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 02:32:11 +0000 Subject: [PATCH 334/370] build(node): update client library version in samples metadata (#1356) (#559) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 --- .../snippet_metadata.google.cloud.iot.v1.json | 1688 ++++++++--------- 1 file changed, 844 insertions(+), 844 deletions(-) diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index f70dc8b9871..62787f94f68 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,883 +1,883 @@ { - "clientLibrary": { - "name": "nodejs-iot", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.iot.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async", - "title": "iot createDeviceRegistry Sample", - "origin": "API_DEFINITION", - "description": " Creates a device registry that contains devices.", - "canonical": true, - "file": "device_manager.create_device_registry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.CreateDeviceRegistry", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "device_registry", - "type": ".google.cloud.iot.v1.DeviceRegistry" - } - ], - "resultType": ".google.cloud.iot.v1.DeviceRegistry", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" - }, - "method": { - "shortName": "CreateDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.CreateDeviceRegistry", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } + "clientLibrary": { + "name": "nodejs-iot", + "version": "2.5.1", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.iot.v1", + "version": "v1" + } + ] }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async", - "title": "iot getDeviceRegistry Sample", - "origin": "API_DEFINITION", - "description": " Gets a device registry configuration.", - "canonical": true, - "file": "device_manager.get_device_registry.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.GetDeviceRegistry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.iot.v1.DeviceRegistry", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async", + "title": "iot createDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Creates a device registry that contains devices.", + "canonical": true, + "file": "device_manager.create_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "device_registry", + "type": ".google.cloud.iot.v1.DeviceRegistry" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceRegistry", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "CreateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "GetDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.GetDeviceRegistry", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async", - "title": "iot updateDeviceRegistry Sample", - "origin": "API_DEFINITION", - "description": " Updates a device registry configuration.", - "canonical": true, - "file": "device_manager.update_device_registry.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistry", - "async": true, - "parameters": [ - { - "name": "device_registry", - "type": ".google.cloud.iot.v1.DeviceRegistry" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.iot.v1.DeviceRegistry", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async", + "title": "iot getDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Gets a device registry configuration.", + "canonical": true, + "file": "device_manager.get_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceRegistry", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "GetDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "UpdateDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistry", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async", - "title": "iot deleteDeviceRegistry Sample", - "origin": "API_DEFINITION", - "description": " Deletes a device registry configuration.", - "canonical": true, - "file": "device_manager.delete_device_registry.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async", + "title": "iot updateDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Updates a device registry configuration.", + "canonical": true, + "file": "device_manager.update_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "device_registry", + "type": ".google.cloud.iot.v1.DeviceRegistry" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceRegistry", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "UpdateDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "DeleteDeviceRegistry", - "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistry", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async", - "title": "iot listDeviceRegistries Sample", - "origin": "API_DEFINITION", - "description": " Lists device registries.", - "canonical": true, - "file": "device_manager.list_device_registries.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeviceRegistries", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceRegistries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.iot.v1.ListDeviceRegistriesResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async", + "title": "iot deleteDeviceRegistry Sample", + "origin": "API_DEFINITION", + "description": " Deletes a device registry configuration.", + "canonical": true, + "file": "device_manager.delete_device_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "DeleteDeviceRegistry", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDeviceRegistry", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "ListDeviceRegistries", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceRegistries", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_CreateDevice_async", - "title": "iot createDevice Sample", - "origin": "API_DEFINITION", - "description": " Creates a device in a device registry.", - "canonical": true, - "file": "device_manager.create_device.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.CreateDevice", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "device", - "type": ".google.cloud.iot.v1.Device" - } - ], - "resultType": ".google.cloud.iot.v1.Device", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async", + "title": "iot listDeviceRegistries Sample", + "origin": "API_DEFINITION", + "description": " Lists device registries.", + "canonical": true, + "file": "device_manager.list_device_registries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeviceRegistries", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceRegistries", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.ListDeviceRegistriesResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDeviceRegistries", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceRegistries", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "CreateDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.CreateDevice", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_GetDevice_async", - "title": "iot getDevice Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a device.", - "canonical": true, - "file": "device_manager.get_device.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.GetDevice", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "field_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.iot.v1.Device", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_CreateDevice_async", + "title": "iot createDevice Sample", + "origin": "API_DEFINITION", + "description": " Creates a device in a device registry.", + "canonical": true, + "file": "device_manager.create_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDevice", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "device", + "type": ".google.cloud.iot.v1.Device" + } + ], + "resultType": ".google.cloud.iot.v1.Device", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "CreateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.CreateDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "GetDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.GetDevice", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_UpdateDevice_async", - "title": "iot updateDevice Sample", - "origin": "API_DEFINITION", - "description": " Updates a device.", - "canonical": true, - "file": "device_manager.update_device.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDevice", - "async": true, - "parameters": [ - { - "name": "device", - "type": ".google.cloud.iot.v1.Device" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.iot.v1.Device", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_GetDevice_async", + "title": "iot getDevice Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a device.", + "canonical": true, + "file": "device_manager.get_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "field_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.iot.v1.Device", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "GetDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.GetDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "UpdateDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDevice", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_DeleteDevice_async", - "title": "iot deleteDevice Sample", - "origin": "API_DEFINITION", - "description": " Deletes a device.", - "canonical": true, - "file": "device_manager.delete_device.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDevice", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_UpdateDevice_async", + "title": "iot updateDevice Sample", + "origin": "API_DEFINITION", + "description": " Updates a device.", + "canonical": true, + "file": "device_manager.update_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDevice", + "async": true, + "parameters": [ + { + "name": "device", + "type": ".google.cloud.iot.v1.Device" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.iot.v1.Device", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "UpdateDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.UpdateDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "DeleteDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDevice", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_ListDevices_async", - "title": "iot listDevices Sample", - "origin": "API_DEFINITION", - "description": " List devices in a device registry.", - "canonical": true, - "file": "device_manager.list_devices.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDevices", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDevices", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "device_num_ids", - "type": "TYPE_UINT64[]" - }, - { - "name": "device_ids", - "type": "TYPE_STRING[]" - }, - { - "name": "field_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "gateway_list_options", - "type": ".google.cloud.iot.v1.GatewayListOptions" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.iot.v1.ListDevicesResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_DeleteDevice_async", + "title": "iot deleteDevice Sample", + "origin": "API_DEFINITION", + "description": " Deletes a device.", + "canonical": true, + "file": "device_manager.delete_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "DeleteDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.DeleteDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "ListDevices", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDevices", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async", - "title": "iot modifyCloudToDeviceConfig Sample", - "origin": "API_DEFINITION", - "description": " Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.", - "canonical": true, - "file": "device_manager.modify_cloud_to_device_config.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ModifyCloudToDeviceConfig", - "fullName": "google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "version_to_update", - "type": "TYPE_INT64" - }, - { - "name": "binary_data", - "type": "TYPE_BYTES" - } - ], - "resultType": ".google.cloud.iot.v1.DeviceConfig", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDevices_async", + "title": "iot listDevices Sample", + "origin": "API_DEFINITION", + "description": " List devices in a device registry.", + "canonical": true, + "file": "device_manager.list_devices.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDevices", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDevices", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "device_num_ids", + "type": "TYPE_UINT64[]" + }, + { + "name": "device_ids", + "type": "TYPE_STRING[]" + }, + { + "name": "field_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "gateway_list_options", + "type": ".google.cloud.iot.v1.GatewayListOptions" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.ListDevicesResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDevices", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDevices", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "ModifyCloudToDeviceConfig", - "fullName": "google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfig", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async", - "title": "iot listDeviceConfigVersions Sample", - "origin": "API_DEFINITION", - "description": " Lists the last few versions of the device configuration in descending order (i.e.: newest first).", - "canonical": true, - "file": "device_manager.list_device_config_versions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeviceConfigVersions", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersions", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "num_versions", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.iot.v1.ListDeviceConfigVersionsResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async", + "title": "iot modifyCloudToDeviceConfig Sample", + "origin": "API_DEFINITION", + "description": " Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.", + "canonical": true, + "file": "device_manager.modify_cloud_to_device_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ModifyCloudToDeviceConfig", + "fullName": "google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "version_to_update", + "type": "TYPE_INT64" + }, + { + "name": "binary_data", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.iot.v1.DeviceConfig", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ModifyCloudToDeviceConfig", + "fullName": "google.cloud.iot.v1.DeviceManager.ModifyCloudToDeviceConfig", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "ListDeviceConfigVersions", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersions", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceStates_async", - "title": "iot listDeviceStates Sample", - "origin": "API_DEFINITION", - "description": " Lists the last few versions of the device state in descending order (i.e.: newest first).", - "canonical": true, - "file": "device_manager.list_device_states.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeviceStates", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceStates", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "num_states", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.iot.v1.ListDeviceStatesResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async", + "title": "iot listDeviceConfigVersions Sample", + "origin": "API_DEFINITION", + "description": " Lists the last few versions of the device configuration in descending order (i.e.: newest first).", + "canonical": true, + "file": "device_manager.list_device_config_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeviceConfigVersions", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "num_versions", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.iot.v1.ListDeviceConfigVersionsResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDeviceConfigVersions", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceConfigVersions", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "ListDeviceStates", - "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceStates", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_SetIamPolicy_async", - "title": "iot setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on the specified resource. Replaces any existing policy.", - "canonical": true, - "file": "device_manager.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.iot.v1.DeviceManager.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_ListDeviceStates_async", + "title": "iot listDeviceStates Sample", + "origin": "API_DEFINITION", + "description": " Lists the last few versions of the device state in descending order (i.e.: newest first).", + "canonical": true, + "file": "device_manager.list_device_states.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeviceStates", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceStates", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "num_states", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.iot.v1.ListDeviceStatesResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "ListDeviceStates", + "fullName": "google.cloud.iot.v1.DeviceManager.ListDeviceStates", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.iot.v1.DeviceManager.SetIamPolicy", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_GetIamPolicy_async", - "title": "iot getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "canonical": true, - "file": "device_manager.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.iot.v1.DeviceManager.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_SetIamPolicy_async", + "title": "iot setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on the specified resource. Replaces any existing policy.", + "canonical": true, + "file": "device_manager.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.SetIamPolicy", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.iot.v1.DeviceManager.GetIamPolicy", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_TestIamPermissions_async", - "title": "iot testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.", - "canonical": true, - "file": "device_manager.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.iot.v1.DeviceManager.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_GetIamPolicy_async", + "title": "iot getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "canonical": true, + "file": "device_manager.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.iot.v1.DeviceManager.GetIamPolicy", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.iot.v1.DeviceManager.TestIamPermissions", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async", - "title": "iot sendCommandToDevice Sample", - "origin": "API_DEFINITION", - "description": " Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the device.", - "canonical": true, - "file": "device_manager.send_command_to_device.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SendCommandToDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.SendCommandToDevice", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "binary_data", - "type": "TYPE_BYTES" - }, - { - "name": "subfolder", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.iot.v1.SendCommandToDeviceResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_TestIamPermissions_async", + "title": "iot testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.", + "canonical": true, + "file": "device_manager.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.iot.v1.DeviceManager.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.iot.v1.DeviceManager.TestIamPermissions", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "SendCommandToDevice", - "fullName": "google.cloud.iot.v1.DeviceManager.SendCommandToDevice", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async", - "title": "iot bindDeviceToGateway Sample", - "origin": "API_DEFINITION", - "description": " Associates the device with the gateway.", - "canonical": true, - "file": "device_manager.bind_device_to_gateway.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BindDeviceToGateway", - "fullName": "google.cloud.iot.v1.DeviceManager.BindDeviceToGateway", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "gateway_id", - "type": "TYPE_STRING" - }, - { - "name": "device_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.iot.v1.BindDeviceToGatewayResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async", + "title": "iot sendCommandToDevice Sample", + "origin": "API_DEFINITION", + "description": " Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the device.", + "canonical": true, + "file": "device_manager.send_command_to_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SendCommandToDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.SendCommandToDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "binary_data", + "type": "TYPE_BYTES" + }, + { + "name": "subfolder", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.SendCommandToDeviceResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "SendCommandToDevice", + "fullName": "google.cloud.iot.v1.DeviceManager.SendCommandToDevice", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "BindDeviceToGateway", - "fullName": "google.cloud.iot.v1.DeviceManager.BindDeviceToGateway", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } - } - } - }, - { - "regionTag": "cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async", - "title": "iot unbindDeviceFromGateway Sample", - "origin": "API_DEFINITION", - "description": " Deletes the association between the device and the gateway.", - "canonical": true, - "file": "device_manager.unbind_device_from_gateway.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UnbindDeviceFromGateway", - "fullName": "google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGateway", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "gateway_id", - "type": "TYPE_STRING" - }, - { - "name": "device_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.iot.v1.UnbindDeviceFromGatewayResponse", - "client": { - "shortName": "DeviceManagerClient", - "fullName": "google.cloud.iot.v1.DeviceManagerClient" + "regionTag": "cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async", + "title": "iot bindDeviceToGateway Sample", + "origin": "API_DEFINITION", + "description": " Associates the device with the gateway.", + "canonical": true, + "file": "device_manager.bind_device_to_gateway.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BindDeviceToGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.BindDeviceToGateway", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "gateway_id", + "type": "TYPE_STRING" + }, + { + "name": "device_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.BindDeviceToGatewayResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "BindDeviceToGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.BindDeviceToGateway", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } }, - "method": { - "shortName": "UnbindDeviceFromGateway", - "fullName": "google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGateway", - "service": { - "shortName": "DeviceManager", - "fullName": "google.cloud.iot.v1.DeviceManager" - } + { + "regionTag": "cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async", + "title": "iot unbindDeviceFromGateway Sample", + "origin": "API_DEFINITION", + "description": " Deletes the association between the device and the gateway.", + "canonical": true, + "file": "device_manager.unbind_device_from_gateway.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UnbindDeviceFromGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGateway", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "gateway_id", + "type": "TYPE_STRING" + }, + { + "name": "device_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.iot.v1.UnbindDeviceFromGatewayResponse", + "client": { + "shortName": "DeviceManagerClient", + "fullName": "google.cloud.iot.v1.DeviceManagerClient" + }, + "method": { + "shortName": "UnbindDeviceFromGateway", + "fullName": "google.cloud.iot.v1.DeviceManager.UnbindDeviceFromGateway", + "service": { + "shortName": "DeviceManager", + "fullName": "google.cloud.iot.v1.DeviceManager" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From a3fd1083ef2765be5d888ccda95a0a2c3505c883 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 02:28:24 +0200 Subject: [PATCH 335/370] chore(deps): update dependency @types/mocha to v9 (#561) 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/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 36ae1aeabfe..f287f9db102 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -46,7 +46,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.2.1", From 15c14b89e72da451f1a2233b2f9f663a8d6c1a29 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:34:25 +0200 Subject: [PATCH 336/370] chore(deps): update dependency sinon to v14 (#564) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f287f9db102..afac4c867f6 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -58,7 +58,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 e1236ec98452d723624fd4a9359599a5512ecafe Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 19 May 2022 17:21:55 -0700 Subject: [PATCH 337/370] build!: update library to use Node 12 (#566) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-cloud-iot/package.json | 10 +++++----- packages/google-cloud-iot/samples/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index afac4c867f6..5ef3d7cdc7e 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "repository": "googleapis/nodejs-iot", "main": "build/src/index.js", @@ -43,24 +43,24 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.2.1", - "gts": "^3.0.0", + "gts": "^3.1.0", "jsdoc": "^3.6.2", "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-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 1a298eb39c9..082cbf43151 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -7,7 +7,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "repository": "googleapis/nodejs-iot", "private": true, From b878591ace6e5ffda7d12560fd0d301776a61e79 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 16:54:23 +0200 Subject: [PATCH 338/370] chore(deps): update dependency jsdoc-fresh to v2 (#571) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 5ef3d7cdc7e..e187a7f1a08 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -52,7 +52,7 @@ "c8": "^7.2.1", "gts": "^3.1.0", "jsdoc": "^3.6.2", - "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 4ea986192936d68b83e1a8c05e9defbc2272dfa3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:22:56 +0200 Subject: [PATCH 339/370] chore(deps): update dependency jsdoc-region-tag to v2 (#572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index e187a7f1a08..4130bd8efdb 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -53,7 +53,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.2", "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 506bac11542ffdeb752b97322dc3f1471cd50ea1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Jun 2022 21:17:17 +0200 Subject: [PATCH 340/370] fix(deps): update dependency @google-cloud/pubsub to v3 (#569) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 082cbf43151..c5a73b470e4 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/iot": "^2.5.1", - "@google-cloud/pubsub": "^2.0.0", + "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^5.0.0" }, "devDependencies": { From c5b94b424bb1f94be08da382c2eba788da9af6eb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Jun 2022 21:33:25 +0200 Subject: [PATCH 341/370] fix(deps): update dependency @google-cloud/storage to v6 (#568) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index c5a73b470e4..5f493ed4fc1 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/iot": "^2.5.1", "@google-cloud/pubsub": "^3.0.0", - "@google-cloud/storage": "^5.0.0" + "@google-cloud/storage": "^6.0.0" }, "devDependencies": { "chai": "^4.2.0", From 010a32c23b9b6380d1f111ce791d46c10b31fd9f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:08:34 +0000 Subject: [PATCH 342/370] chore(main): release 3.0.0 (#567) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [3.0.0](https://github.com/googleapis/nodejs-iot/compare/v2.5.1...v3.0.0) (2022-06-20) ### ⚠ BREAKING CHANGES * update library to use Node 12 (#566) ### Features * AuditConfig for IAM v1 ([#552](https://github.com/googleapis/nodejs-iot/issues/552)) ([1b1a3d2](https://github.com/googleapis/nodejs-iot/commit/1b1a3d226374bb7e9df3444d7384ae6e4d4ece4d)) ### Bug Fixes * **deps:** update dependency @google-cloud/pubsub to v3 ([#569](https://github.com/googleapis/nodejs-iot/issues/569)) ([77a2005](https://github.com/googleapis/nodejs-iot/commit/77a2005a44866ef0261791da592878fca1d067bd)) * **deps:** update dependency @google-cloud/storage to v6 ([#568](https://github.com/googleapis/nodejs-iot/issues/568)) ([b15efb4](https://github.com/googleapis/nodejs-iot/commit/b15efb4f8319eab0e1e01dbd38f163b7fa844d39)) ### Build System * update library to use Node 12 ([#566](https://github.com/googleapis/nodejs-iot/issues/566)) ([1efe654](https://github.com/googleapis/nodejs-iot/commit/1efe6549ae7d0a84bd4388dd4cf89f924a118db4)) --- 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-iot/CHANGELOG.md | 22 +++++++++++++++++++ packages/google-cloud-iot/package.json | 2 +- .../snippet_metadata.google.cloud.iot.v1.json | 2 +- .../google-cloud-iot/samples/package.json | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 9a9ecf09786..c681747007c 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [3.0.0](https://github.com/googleapis/nodejs-iot/compare/v2.5.1...v3.0.0) (2022-06-20) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#566) + +### Features + +* AuditConfig for IAM v1 ([#552](https://github.com/googleapis/nodejs-iot/issues/552)) ([1b1a3d2](https://github.com/googleapis/nodejs-iot/commit/1b1a3d226374bb7e9df3444d7384ae6e4d4ece4d)) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/pubsub to v3 ([#569](https://github.com/googleapis/nodejs-iot/issues/569)) ([77a2005](https://github.com/googleapis/nodejs-iot/commit/77a2005a44866ef0261791da592878fca1d067bd)) +* **deps:** update dependency @google-cloud/storage to v6 ([#568](https://github.com/googleapis/nodejs-iot/issues/568)) ([b15efb4](https://github.com/googleapis/nodejs-iot/commit/b15efb4f8319eab0e1e01dbd38f163b7fa844d39)) + + +### Build System + +* update library to use Node 12 ([#566](https://github.com/googleapis/nodejs-iot/issues/566)) ([1efe654](https://github.com/googleapis/nodejs-iot/commit/1efe6549ae7d0a84bd4388dd4cf89f924a118db4)) + ### [2.5.1](https://www.github.com/googleapis/nodejs-iot/compare/v2.5.0...v2.5.1) (2021-09-27) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 4130bd8efdb..3136aa3f4c2 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "2.5.1", + "version": "3.0.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 62787f94f68..8a210bb8d7f 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "2.5.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 5f493ed4fc1..ad0b1cbb926 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^2.5.1", + "@google-cloud/iot": "^3.0.0", "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^6.0.0" }, From cbc211989c3d4eb08deb4940967f331068e3272b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 5 Jul 2022 11:14:44 -0400 Subject: [PATCH 343/370] feat: support regapic LRO PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 458552034 Source-Link: https://github.com/googleapis/googleapis/commit/ae65014049c6eb195741d7efbd0b10bee3f83d4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/b09ede435cce110446d4ab9f62a081b571d37e3f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjA5ZWRlNDM1Y2NlMTEwNDQ2ZDRhYjlmNjJhMDgxYjU3MWQzN2UzZiJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Alexander Fenster --- .../google-cloud-iot/src/v1/device_manager_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index b73c11644d8..948db8bca6e 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -70,7 +70,7 @@ export class DeviceManagerClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -93,11 +93,10 @@ export class DeviceManagerClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 03bf44243ab0fd4ef557662ad9ef789866919ac9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 5 Jul 2022 11:36:10 -0400 Subject: [PATCH 344/370] chore(main): release 3.1.0 (#575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 3.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-iot/CHANGELOG.md | 7 +++++++ packages/google-cloud-iot/package.json | 2 +- .../generated/v1/snippet_metadata.google.cloud.iot.v1.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index c681747007c..397836fadaf 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.0](https://github.com/googleapis/nodejs-iot/compare/v3.0.0...v3.1.0) (2022-07-05) + + +### Features + +* support regapic LRO ([b02cd4d](https://github.com/googleapis/nodejs-iot/commit/b02cd4d8f954fa1c34ef77055eb5c0b628095482)) + ## [3.0.0](https://github.com/googleapis/nodejs-iot/compare/v2.5.1...v3.0.0) (2022-06-20) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 3136aa3f4c2..a3bd3047db7 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "3.0.0", + "version": "3.1.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 8a210bb8d7f..13c5a252b48 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index ad0b1cbb926..04512cbd4e5 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^3.0.0", + "@google-cloud/iot": "^3.1.0", "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^6.0.0" }, From eb042408f4e7e46f40887946372aef2e095f93d3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 8 Jul 2022 23:06:14 +0200 Subject: [PATCH 345/370] chore(deps): update dependency linkinator to v4 (#577) 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-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index a3bd3047db7..65361f122fa 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -54,7 +54,7 @@ "jsdoc": "^3.6.2", "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 9746c199827f09ee45c519ee3713661432204277 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:34:27 -0700 Subject: [PATCH 346/370] chore: remove unused proto imports (#579) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: remove unused proto imports PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../protos/google/cloud/iot/v1/device_manager.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto index dfd6c9b6af8..b28140ce7b5 100644 --- a/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto +++ b/packages/google-cloud-iot/protos/google/cloud/iot/v1/device_manager.proto @@ -25,7 +25,6 @@ import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/rpc/status.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot"; From 1429191765e2c3f36126a1f5fd00d92a17b71210 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:04:16 +0000 Subject: [PATCH 347/370] fix: better support for fallback mode (#580) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../device_manager.bind_device_to_gateway.js | 3 + .../v1/device_manager.create_device.js | 3 + .../device_manager.create_device_registry.js | 3 + .../v1/device_manager.delete_device.js | 3 + .../device_manager.delete_device_registry.js | 3 + .../generated/v1/device_manager.get_device.js | 3 + .../v1/device_manager.get_device_registry.js | 3 + .../v1/device_manager.get_iam_policy.js | 3 + ...ice_manager.list_device_config_versions.js | 3 + .../device_manager.list_device_registries.js | 3 + .../v1/device_manager.list_device_states.js | 3 + .../v1/device_manager.list_devices.js | 3 + ...e_manager.modify_cloud_to_device_config.js | 3 + .../device_manager.send_command_to_device.js | 3 + .../v1/device_manager.set_iam_policy.js | 3 + .../v1/device_manager.test_iam_permissions.js | 3 + ...vice_manager.unbind_device_from_gateway.js | 3 + .../v1/device_manager.update_device.js | 3 + .../device_manager.update_device_registry.js | 3 + .../snippet_metadata.google.cloud.iot.v1.json | 38 ++--- .../src/v1/device_manager_client.ts | 12 +- .../test/gapic_device_manager_v1.ts | 158 +++++++++--------- 22 files changed, 163 insertions(+), 102 deletions(-) diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js index e5d0348f48d..8c901cc01a9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js @@ -23,6 +23,9 @@ function main(parent, gatewayId, deviceId) { // [START cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js index d38142b0f46..ee99565e08a 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js @@ -23,6 +23,9 @@ function main(parent, device) { // [START cloudiot_v1_generated_DeviceManager_CreateDevice_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js index 6248800bb40..7ea4129928b 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js @@ -23,6 +23,9 @@ function main(parent, deviceRegistry) { // [START cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js index ab1999e2b67..e981a8a7a01 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudiot_v1_generated_DeviceManager_DeleteDevice_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js index 663be451d24..37f5d2ad2ea 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js index db5022fb8fe..97bdebc68ab 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudiot_v1_generated_DeviceManager_GetDevice_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js index 7cbb7241bc3..2ec184f4858 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js index 039b3941163..05f5ad9f0ec 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js @@ -23,6 +23,9 @@ function main(resource) { // [START cloudiot_v1_generated_DeviceManager_GetIamPolicy_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js index be6a024d4c9..2b4d1e0189e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js index d7853e34aa2..344f409e391 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js index d9c8519d01d..a6323204556 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudiot_v1_generated_DeviceManager_ListDeviceStates_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js index 7e33937aaa9..f8751e6cea2 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudiot_v1_generated_DeviceManager_ListDevices_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js index 9e415682954..8a6968b0f4e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js @@ -23,6 +23,9 @@ function main(name, binaryData) { // [START cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js index df3997168a9..ba46cd8da18 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js @@ -23,6 +23,9 @@ function main(name, binaryData) { // [START cloudiot_v1_generated_DeviceManager_SendCommandToDevice_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js index 05ba74e3704..87f44955f5e 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js @@ -23,6 +23,9 @@ function main(resource, policy) { // [START cloudiot_v1_generated_DeviceManager_SetIamPolicy_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js index 81f299d385f..d13cb26b7d4 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js @@ -23,6 +23,9 @@ function main(resource, permissions) { // [START cloudiot_v1_generated_DeviceManager_TestIamPermissions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js index 37fb81b5d88..5341f2f0681 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js @@ -23,6 +23,9 @@ function main(parent, gatewayId, deviceId) { // [START cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js index f2c217889f9..62a144d11c9 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js @@ -23,6 +23,9 @@ function main(device, updateMask) { // [START cloudiot_v1_generated_DeviceManager_UpdateDevice_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js index c3a34b16258..06843ef1dd2 100644 --- a/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js +++ b/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js @@ -23,6 +23,9 @@ function main(deviceRegistry, updateMask) { // [START cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 13c5a252b48..f3a41c0f895 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -106,7 +106,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -150,7 +150,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -190,7 +190,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -282,7 +282,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -326,7 +326,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -370,7 +370,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -410,7 +410,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 90, "type": "FULL" } ], @@ -474,7 +474,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -522,7 +522,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -566,7 +566,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -658,7 +658,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -702,7 +702,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -794,7 +794,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -842,7 +842,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 948db8bca6e..3b85af18e64 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -28,7 +28,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -279,7 +278,8 @@ export class DeviceManagerClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -2101,7 +2101,7 @@ export class DeviceManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDeviceRegistries.createStream( - this.innerApiCalls.listDeviceRegistries as gax.GaxCall, + this.innerApiCalls.listDeviceRegistries as GaxCall, request, callSettings ); @@ -2155,7 +2155,7 @@ export class DeviceManagerClient { this.initialize(); return this.descriptors.page.listDeviceRegistries.asyncIterate( this.innerApiCalls['listDeviceRegistries'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2326,7 +2326,7 @@ export class DeviceManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDevices.createStream( - this.innerApiCalls.listDevices as gax.GaxCall, + this.innerApiCalls.listDevices as GaxCall, request, callSettings ); @@ -2393,7 +2393,7 @@ export class DeviceManagerClient { this.initialize(); return this.descriptors.page.listDevices.asyncIterate( this.innerApiCalls['listDevices'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index d2d77742070..de9ed0370c2 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -113,99 +113,103 @@ function stubAsyncIterationCall( } describe('v1.DeviceManagerClient', () => { - it('has servicePath', () => { - const servicePath = devicemanagerModule.v1.DeviceManagerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = devicemanagerModule.v1.DeviceManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + devicemanagerModule.v1.DeviceManagerClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + devicemanagerModule.v1.DeviceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - fallback: true, + it('has port', () => { + const port = devicemanagerModule.v1.DeviceManagerClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient(); + assert(client); }); - assert.strictEqual(client.deviceManagerStub, undefined); - await client.initialize(); - assert(client.deviceManagerStub); - }); - it('has close method for the initialized client', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.deviceManagerStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManagerStub, undefined); + await client.initialize(); + assert(client.deviceManagerStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.deviceManagerStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.deviceManagerStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManagerStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new devicemanagerModule.v1.DeviceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanagerModule.v1.DeviceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createDeviceRegistry', () => { From 7e43c6e0b3f5883567e947ae1a105a6046fe2eb6 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 07:34:15 +0000 Subject: [PATCH 348/370] fix: change import long to require (#581) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- packages/google-cloud-iot/protos/protos.d.ts | 1033 +++- packages/google-cloud-iot/protos/protos.js | 5202 +++++++++++++----- packages/google-cloud-iot/protos/protos.json | 75 +- 3 files changed, 4765 insertions(+), 1545 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index 751221e1ca5..e1b97d5f7f5 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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 { @@ -316,133 +316,133 @@ export namespace google { namespace DeviceManager { /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|createDeviceRegistry}. * @param error Error, if any * @param [response] DeviceRegistry */ type CreateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|getDeviceRegistry}. * @param error Error, if any * @param [response] DeviceRegistry */ type GetDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|updateDeviceRegistry}. * @param error Error, if any * @param [response] DeviceRegistry */ type UpdateDeviceRegistryCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceRegistry) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|deleteDeviceRegistry}. * @param error Error, if any * @param [response] Empty */ type DeleteDeviceRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDeviceRegistries}. * @param error Error, if any * @param [response] ListDeviceRegistriesResponse */ type ListDeviceRegistriesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceRegistriesResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|createDevice}. * @param error Error, if any * @param [response] Device */ type CreateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|getDevice}. * @param error Error, if any * @param [response] Device */ type GetDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|updateDevice}. * @param error Error, if any * @param [response] Device */ type UpdateDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.Device) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|deleteDevice}. * @param error Error, if any * @param [response] Empty */ type DeleteDeviceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDevices}. * @param error Error, if any * @param [response] ListDevicesResponse */ type ListDevicesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDevicesResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|modifyCloudToDeviceConfig}. * @param error Error, if any * @param [response] DeviceConfig */ type ModifyCloudToDeviceConfigCallback = (error: (Error|null), response?: google.cloud.iot.v1.DeviceConfig) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDeviceConfigVersions}. * @param error Error, if any * @param [response] ListDeviceConfigVersionsResponse */ type ListDeviceConfigVersionsCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceConfigVersionsResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDeviceStates}. * @param error Error, if any * @param [response] ListDeviceStatesResponse */ type ListDeviceStatesCallback = (error: (Error|null), response?: google.cloud.iot.v1.ListDeviceStatesResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|setIamPolicy}. * @param error Error, if any * @param [response] Policy */ type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|getIamPolicy}. * @param error Error, if any * @param [response] Policy */ type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|testIamPermissions}. * @param error Error, if any * @param [response] TestIamPermissionsResponse */ type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|sendCommandToDevice}. * @param error Error, if any * @param [response] SendCommandToDeviceResponse */ type SendCommandToDeviceCallback = (error: (Error|null), response?: google.cloud.iot.v1.SendCommandToDeviceResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|bindDeviceToGateway}. * @param error Error, if any * @param [response] BindDeviceToGatewayResponse */ type BindDeviceToGatewayCallback = (error: (Error|null), response?: google.cloud.iot.v1.BindDeviceToGatewayResponse) => void; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|unbindDeviceFromGateway}. * @param error Error, if any * @param [response] UnbindDeviceFromGatewayResponse */ @@ -543,6 +543,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDeviceRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetDeviceRegistryRequest. */ @@ -633,6 +640,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDeviceRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteDeviceRegistryRequest. */ @@ -723,6 +737,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDeviceRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateDeviceRegistryRequest. */ @@ -819,6 +840,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeviceRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeviceRegistriesRequest. */ @@ -921,6 +949,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeviceRegistriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeviceRegistriesResponse. */ @@ -1017,6 +1052,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeviceRegistriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateDeviceRequest. */ @@ -1113,6 +1155,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDeviceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetDeviceRequest. */ @@ -1209,6 +1258,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDeviceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateDeviceRequest. */ @@ -1305,6 +1361,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeviceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteDeviceRequest. */ @@ -1395,6 +1458,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDeviceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDevicesRequest. */ @@ -1521,6 +1591,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDevicesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GatewayListOptions. */ @@ -1626,6 +1703,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GatewayListOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDevicesResponse. */ @@ -1722,6 +1806,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDevicesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ModifyCloudToDeviceConfigRequest. */ @@ -1824,6 +1915,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ModifyCloudToDeviceConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeviceConfigVersionsRequest. */ @@ -1920,6 +2018,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeviceConfigVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeviceConfigVersionsResponse. */ @@ -2010,6 +2115,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeviceConfigVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeviceStatesRequest. */ @@ -2106,6 +2218,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeviceStatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeviceStatesResponse. */ @@ -2196,6 +2315,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeviceStatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SendCommandToDeviceRequest. */ @@ -2298,6 +2424,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SendCommandToDeviceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SendCommandToDeviceResponse. */ @@ -2382,6 +2515,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SendCommandToDeviceResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BindDeviceToGatewayRequest. */ @@ -2484,6 +2624,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindDeviceToGatewayRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BindDeviceToGatewayResponse. */ @@ -2568,6 +2715,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindDeviceToGatewayResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UnbindDeviceFromGatewayRequest. */ @@ -2670,6 +2824,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnbindDeviceFromGatewayRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UnbindDeviceFromGatewayResponse. */ @@ -2754,6 +2915,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnbindDeviceFromGatewayResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Device. */ @@ -2940,6 +3108,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Device + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GatewayConfig. */ @@ -3048,6 +3223,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GatewayConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeviceRegistry. */ @@ -3180,6 +3362,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceRegistry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MqttConfig. */ @@ -3270,6 +3459,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MqttConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** MqttState enum. */ @@ -3367,6 +3563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** HttpState enum. */ @@ -3494,6 +3697,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventNotificationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StateNotificationConfig. */ @@ -3584,6 +3794,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StateNotificationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RegistryCredential. */ @@ -3677,6 +3894,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegistryCredential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a X509CertificateDetails. */ @@ -3797,6 +4021,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for X509CertificateDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PublicKeyCertificate. */ @@ -3899,6 +4130,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicKeyCertificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** PublicKeyCertificateFormat enum. */ @@ -4004,6 +4242,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceCredential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PublicKeyCredential. */ @@ -4100,6 +4345,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicKeyCredential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** PublicKeyFormat enum. */ @@ -4217,6 +4469,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeviceState. */ @@ -4313,6 +4572,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -4415,6 +4681,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. */ @@ -4562,6 +4835,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. */ @@ -4658,6 +4938,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -4796,6 +5083,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 { @@ -4908,6 +5202,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; } } @@ -5002,6 +5303,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. */ @@ -5042,6 +5350,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -5089,6 +5400,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 @@ -5158,6 +5472,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. */ @@ -5302,6 +5623,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 { @@ -5406,6 +5734,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. */ @@ -5502,6 +5837,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; } } @@ -5593,6 +5935,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. */ @@ -5743,6 +6092,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 { @@ -5871,6 +6227,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. */ @@ -5985,6 +6348,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 { @@ -6083,6 +6453,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; } } @@ -6186,6 +6563,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. */ @@ -6288,6 +6672,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. */ @@ -6408,6 +6799,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. */ @@ -6621,6 +7019,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 { @@ -6748,6 +7153,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. */ @@ -6765,6 +7177,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -6802,6 +7217,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -6880,6 +7298,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 { @@ -6987,6 +7412,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. */ @@ -7089,6 +7521,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. */ @@ -7185,6 +7624,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. */ @@ -7287,6 +7733,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. */ @@ -7395,6 +7848,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 { @@ -7531,6 +7991,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 { @@ -7629,6 +8096,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; } } @@ -7720,6 +8194,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 { @@ -7836,6 +8317,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; } } @@ -7927,6 +8415,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 { @@ -7945,6 +8440,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. */ @@ -7968,6 +8466,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 @@ -8037,6 +8538,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 + } } } @@ -8134,6 +8652,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Any. */ @@ -8230,180 +8755,201 @@ 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 an Empty. */ - interface IEmpty { + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Empty. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Empty instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified 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.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified 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.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @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.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @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.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies an Empty message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * 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 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** + * 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; + } - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new FieldMask. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * 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 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.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, 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 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.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @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.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @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.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a FieldMask message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from an 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.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Empty to JSON. * @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; } } @@ -8510,6 +9056,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; } } @@ -8585,21 +9138,21 @@ export namespace google { namespace IAMPolicy { /** - * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. * @param error Error, if any * @param [response] Policy */ type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. * @param error Error, if any * @param [response] Policy */ type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. * @param error Error, if any * @param [response] TestIamPermissionsResponse */ @@ -8614,6 +9167,9 @@ export namespace google { /** SetIamPolicyRequest policy */ policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } /** Represents a SetIamPolicyRequest. */ @@ -8631,6 +9187,9 @@ export namespace google { /** SetIamPolicyRequest policy. */ public policy?: (google.iam.v1.IPolicy|null); + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + /** * Creates a new SetIamPolicyRequest instance using the specified properties. * @param [properties] Properties to set @@ -8700,6 +9259,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetIamPolicyRequest. */ @@ -8796,6 +9362,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TestIamPermissionsRequest. */ @@ -8892,6 +9465,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TestIamPermissionsResponse. */ @@ -8982,6 +9562,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetPolicyOptions. */ @@ -9072,6 +9659,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Policy. */ @@ -9083,6 +9677,9 @@ export namespace google { /** Policy bindings */ bindings?: (google.iam.v1.IBinding[]|null); + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + /** Policy etag */ etag?: (Uint8Array|string|null); } @@ -9102,6 +9699,9 @@ export namespace google { /** Policy bindings. */ public bindings: google.iam.v1.IBinding[]; + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + /** Policy etag. */ public etag: (Uint8Array|string); @@ -9174,6 +9774,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Binding. */ @@ -9276,6 +9883,230 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } } /** Properties of a PolicyDelta. */ @@ -9372,6 +10203,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BindingDelta. */ @@ -9480,6 +10318,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BindingDelta { @@ -9598,6 +10443,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AuditConfigDelta { @@ -9721,6 +10573,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index cc370934adb..0019055656d 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|createDeviceRegistry}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef CreateDeviceRegistryCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|getDeviceRegistry}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef GetDeviceRegistryCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|updateDeviceRegistry}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef UpdateDeviceRegistryCallback * @type {function} @@ -198,7 +198,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDeviceRegistry}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|deleteDeviceRegistry}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef DeleteDeviceRegistryCallback * @type {function} @@ -231,7 +231,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceRegistries}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDeviceRegistries}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef ListDeviceRegistriesCallback * @type {function} @@ -264,7 +264,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#createDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|createDevice}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef CreateDeviceCallback * @type {function} @@ -297,7 +297,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|getDevice}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef GetDeviceCallback * @type {function} @@ -330,7 +330,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#updateDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|updateDevice}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef UpdateDeviceCallback * @type {function} @@ -363,7 +363,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#deleteDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|deleteDevice}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef DeleteDeviceCallback * @type {function} @@ -396,7 +396,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDevices}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDevices}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef ListDevicesCallback * @type {function} @@ -429,7 +429,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#modifyCloudToDeviceConfig}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|modifyCloudToDeviceConfig}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef ModifyCloudToDeviceConfigCallback * @type {function} @@ -462,7 +462,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceConfigVersions}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDeviceConfigVersions}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef ListDeviceConfigVersionsCallback * @type {function} @@ -495,7 +495,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#listDeviceStates}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|listDeviceStates}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef ListDeviceStatesCallback * @type {function} @@ -528,7 +528,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#setIamPolicy}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|setIamPolicy}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef SetIamPolicyCallback * @type {function} @@ -561,7 +561,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#getIamPolicy}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|getIamPolicy}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef GetIamPolicyCallback * @type {function} @@ -594,7 +594,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#testIamPermissions}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|testIamPermissions}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef TestIamPermissionsCallback * @type {function} @@ -627,7 +627,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#sendCommandToDevice}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|sendCommandToDevice}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef SendCommandToDeviceCallback * @type {function} @@ -660,7 +660,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#bindDeviceToGateway}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|bindDeviceToGateway}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef BindDeviceToGatewayCallback * @type {function} @@ -693,7 +693,7 @@ */ /** - * Callback as used by {@link google.cloud.iot.v1.DeviceManager#unbindDeviceFromGateway}. + * Callback as used by {@link google.cloud.iot.v1.DeviceManager|unbindDeviceFromGateway}. * @memberof google.cloud.iot.v1.DeviceManager * @typedef UnbindDeviceFromGatewayCallback * @type {function} @@ -831,12 +831,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -940,6 +942,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateDeviceRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.CreateDeviceRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDeviceRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.CreateDeviceRegistryRequest"; + }; + return CreateDeviceRegistryRequest; })(); @@ -1035,9 +1052,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; @@ -1127,6 +1145,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetDeviceRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.GetDeviceRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeviceRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.GetDeviceRegistryRequest"; + }; + return GetDeviceRegistryRequest; })(); @@ -1222,9 +1255,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; @@ -1314,6 +1348,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteDeviceRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.DeleteDeviceRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDeviceRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.DeleteDeviceRegistryRequest"; + }; + return DeleteDeviceRegistryRequest; })(); @@ -1420,12 +1469,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.deviceRegistry = $root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1534,6 +1585,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateDeviceRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.UpdateDeviceRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeviceRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.UpdateDeviceRegistryRequest"; + }; + return UpdateDeviceRegistryRequest; })(); @@ -1651,15 +1717,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1766,6 +1835,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeviceRegistriesRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDeviceRegistriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceRegistriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDeviceRegistriesRequest"; + }; + return ListDeviceRegistriesRequest; })(); @@ -1874,14 +1958,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.deviceRegistries && message.deviceRegistries.length)) - message.deviceRegistries = []; - message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.deviceRegistries && message.deviceRegistries.length)) + message.deviceRegistries = []; + message.deviceRegistries.push($root.google.cloud.iot.v1.DeviceRegistry.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1997,6 +2083,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeviceRegistriesResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDeviceRegistriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceRegistriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDeviceRegistriesResponse"; + }; + return ListDeviceRegistriesResponse; })(); @@ -2103,12 +2204,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2212,6 +2315,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateDeviceRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.CreateDeviceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDeviceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.CreateDeviceRequest"; + }; + return CreateDeviceRequest; })(); @@ -2318,12 +2436,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2427,6 +2547,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetDeviceRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.GetDeviceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeviceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.GetDeviceRequest"; + }; + return GetDeviceRequest; })(); @@ -2533,12 +2668,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 2: { + message.device = $root.google.cloud.iot.v1.Device.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2647,6 +2784,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateDeviceRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.UpdateDeviceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeviceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.UpdateDeviceRequest"; + }; + return UpdateDeviceRequest; })(); @@ -2742,9 +2894,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; @@ -2834,6 +2987,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteDeviceRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.DeleteDeviceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDeviceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.DeleteDeviceRequest"; + }; + return DeleteDeviceRequest; })(); @@ -3002,36 +3170,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - if (!(message.deviceNumIds && message.deviceNumIds.length)) - message.deviceNumIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.deviceNumIds && message.deviceNumIds.length)) + message.deviceNumIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.deviceNumIds.push(reader.uint64()); + } else message.deviceNumIds.push(reader.uint64()); - } else - message.deviceNumIds.push(reader.uint64()); - break; - case 3: - if (!(message.deviceIds && message.deviceIds.length)) - message.deviceIds = []; - message.deviceIds.push(reader.string()); - break; - case 4: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 6: - message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); - break; - case 100: - message.pageSize = reader.int32(); - break; - case 101: - message.pageToken = reader.string(); - break; + break; + } + case 3: { + if (!(message.deviceIds && message.deviceIds.length)) + message.deviceIds = []; + message.deviceIds.push(reader.string()); + break; + } + case 4: { + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 6: { + message.gatewayListOptions = $root.google.cloud.iot.v1.GatewayListOptions.decode(reader, reader.uint32()); + break; + } + case 100: { + message.pageSize = reader.int32(); + break; + } + case 101: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3216,6 +3391,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDevicesRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDevicesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDevicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDevicesRequest"; + }; + return ListDevicesRequest; })(); @@ -3347,15 +3537,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gatewayType = reader.int32(); - break; - case 2: - message.associationsGatewayId = reader.string(); - break; - case 3: - message.associationsDeviceId = reader.string(); - break; + case 1: { + message.gatewayType = reader.int32(); + break; + } + case 2: { + message.associationsGatewayId = reader.string(); + break; + } + case 3: { + message.associationsDeviceId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3495,6 +3688,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GatewayListOptions + * @function getTypeUrl + * @memberof google.cloud.iot.v1.GatewayListOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GatewayListOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.GatewayListOptions"; + }; + return GatewayListOptions; })(); @@ -3603,14 +3811,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.devices && message.devices.length)) - message.devices = []; - message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.devices && message.devices.length)) + message.devices = []; + message.devices.push($root.google.cloud.iot.v1.Device.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3726,6 +3936,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDevicesResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDevicesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDevicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDevicesResponse"; + }; + return ListDevicesResponse; })(); @@ -3843,15 +4068,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.versionToUpdate = reader.int64(); - break; - case 3: - message.binaryData = reader.bytes(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.versionToUpdate = reader.int64(); + break; + } + case 3: { + message.binaryData = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -3925,7 +4153,7 @@ if (object.binaryData != null) if (typeof object.binaryData === "string") $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) + else if (object.binaryData.length >= 0) message.binaryData = object.binaryData; return message; }; @@ -3981,6 +4209,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ModifyCloudToDeviceConfigRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModifyCloudToDeviceConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest"; + }; + return ModifyCloudToDeviceConfigRequest; })(); @@ -4087,12 +4330,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.numVersions = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.numVersions = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4191,6 +4436,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeviceConfigVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceConfigVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDeviceConfigVersionsRequest"; + }; + return ListDeviceConfigVersionsRequest; })(); @@ -4288,11 +4548,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.deviceConfigs && message.deviceConfigs.length)) - message.deviceConfigs = []; - message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.deviceConfigs && message.deviceConfigs.length)) + message.deviceConfigs = []; + message.deviceConfigs.push($root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4399,6 +4660,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeviceConfigVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDeviceConfigVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceConfigVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDeviceConfigVersionsResponse"; + }; + return ListDeviceConfigVersionsResponse; })(); @@ -4505,12 +4781,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.numStates = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.numStates = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4609,6 +4887,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeviceStatesRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDeviceStatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceStatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDeviceStatesRequest"; + }; + return ListDeviceStatesRequest; })(); @@ -4706,11 +4999,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.deviceStates && message.deviceStates.length)) - message.deviceStates = []; - message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.deviceStates && message.deviceStates.length)) + message.deviceStates = []; + message.deviceStates.push($root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4817,6 +5111,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeviceStatesResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.ListDeviceStatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceStatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.ListDeviceStatesResponse"; + }; + return ListDeviceStatesResponse; })(); @@ -4934,15 +5243,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.binaryData = reader.bytes(); - break; - case 3: - message.subfolder = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.binaryData = reader.bytes(); + break; + } + case 3: { + message.subfolder = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5007,7 +5319,7 @@ if (object.binaryData != null) if (typeof object.binaryData === "string") $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) + else if (object.binaryData.length >= 0) message.binaryData = object.binaryData; if (object.subfolder != null) message.subfolder = String(object.subfolder); @@ -5058,7 +5370,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SendCommandToDeviceRequest; + /** + * Gets the default type url for SendCommandToDeviceRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.SendCommandToDeviceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SendCommandToDeviceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.SendCommandToDeviceRequest"; + }; + + return SendCommandToDeviceRequest; })(); v1.SendCommandToDeviceResponse = (function() { @@ -5218,6 +5545,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SendCommandToDeviceResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.SendCommandToDeviceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SendCommandToDeviceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.SendCommandToDeviceResponse"; + }; + return SendCommandToDeviceResponse; })(); @@ -5335,15 +5677,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.gatewayId = reader.string(); - break; - case 3: - message.deviceId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.gatewayId = reader.string(); + break; + } + case 3: { + message.deviceId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5450,6 +5795,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BindDeviceToGatewayRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.BindDeviceToGatewayRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindDeviceToGatewayRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.BindDeviceToGatewayRequest"; + }; + return BindDeviceToGatewayRequest; })(); @@ -5610,6 +5970,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BindDeviceToGatewayResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.BindDeviceToGatewayResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindDeviceToGatewayResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.BindDeviceToGatewayResponse"; + }; + return BindDeviceToGatewayResponse; })(); @@ -5727,15 +6102,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.gatewayId = reader.string(); - break; - case 3: - message.deviceId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.gatewayId = reader.string(); + break; + } + case 3: { + message.deviceId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5842,6 +6220,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UnbindDeviceFromGatewayRequest + * @function getTypeUrl + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnbindDeviceFromGatewayRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.UnbindDeviceFromGatewayRequest"; + }; + return UnbindDeviceFromGatewayRequest; })(); @@ -6002,6 +6395,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UnbindDeviceFromGatewayResponse + * @function getTypeUrl + * @memberof google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnbindDeviceFromGatewayResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.UnbindDeviceFromGatewayResponse"; + }; + return UnbindDeviceFromGatewayResponse; })(); @@ -6277,78 +6685,95 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.numId = reader.uint64(); - break; - case 12: - if (!(message.credentials && message.credentials.length)) - message.credentials = []; - message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); - break; - case 7: - message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 20: - message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 18: - message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 19: - message.blocked = reader.bool(); - break; - case 10: - message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 13: - message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); - break; - case 16: - message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); - break; - case 21: - message.logLevel = reader.int32(); - break; - case 17: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.numId = reader.uint64(); + break; + } + case 12: { + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.DeviceCredential.decode(reader, reader.uint32())); + break; + } + case 7: { + message.lastHeartbeatTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + message.lastStateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.lastConfigAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + message.lastConfigSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 19: { + message.blocked = reader.bool(); + break; + } + case 10: { + message.lastErrorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.lastErrorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 13: { + message.config = $root.google.cloud.iot.v1.DeviceConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.state = $root.google.cloud.iot.v1.DeviceState.decode(reader, reader.uint32()); + break; + } + case 21: { + message.logLevel = reader.int32(); + break; + } + case 17: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + } + case 24: { + message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); + break; } - message.metadata[key] = value; - break; - case 24: - message.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -6692,6 +7117,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Device + * @function getTypeUrl + * @memberof google.cloud.iot.v1.Device + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Device.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.Device"; + }; + return Device; })(); @@ -6820,18 +7260,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gatewayType = reader.int32(); - break; - case 2: - message.gatewayAuthMethod = reader.int32(); - break; - case 3: - message.lastAccessedGatewayId = reader.string(); - break; - case 4: - message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.gatewayType = reader.int32(); + break; + } + case 2: { + message.gatewayAuthMethod = reader.int32(); + break; + } + case 3: { + message.lastAccessedGatewayId = reader.string(); + break; + } + case 4: { + message.lastAccessedGatewayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6992,6 +7436,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GatewayConfig + * @function getTypeUrl + * @memberof google.cloud.iot.v1.GatewayConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GatewayConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.GatewayConfig"; + }; + return GatewayConfig; })(); @@ -7168,34 +7627,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 10: - if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) - message.eventNotificationConfigs = []; - message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); - break; - case 7: - message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); - break; - case 4: - message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); - break; - case 9: - message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); - break; - case 11: - message.logLevel = reader.int32(); - break; - case 8: - if (!(message.credentials && message.credentials.length)) - message.credentials = []; - message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 10: { + if (!(message.eventNotificationConfigs && message.eventNotificationConfigs.length)) + message.eventNotificationConfigs = []; + message.eventNotificationConfigs.push($root.google.cloud.iot.v1.EventNotificationConfig.decode(reader, reader.uint32())); + break; + } + case 7: { + message.stateNotificationConfig = $root.google.cloud.iot.v1.StateNotificationConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mqttConfig = $root.google.cloud.iot.v1.MqttConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.logLevel = reader.int32(); + break; + } + case 8: { + if (!(message.credentials && message.credentials.length)) + message.credentials = []; + message.credentials.push($root.google.cloud.iot.v1.RegistryCredential.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7421,6 +7888,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceRegistry + * @function getTypeUrl + * @memberof google.cloud.iot.v1.DeviceRegistry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceRegistry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.DeviceRegistry"; + }; + return DeviceRegistry; })(); @@ -7516,9 +7998,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mqttEnabledState = reader.int32(); - break; + case 1: { + message.mqttEnabledState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7626,6 +8109,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MqttConfig + * @function getTypeUrl + * @memberof google.cloud.iot.v1.MqttConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MqttConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.MqttConfig"; + }; + return MqttConfig; })(); @@ -7737,9 +8235,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.httpEnabledState = reader.int32(); - break; + case 1: { + message.httpEnabledState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7847,6 +8346,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpConfig + * @function getTypeUrl + * @memberof google.cloud.iot.v1.HttpConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.HttpConfig"; + }; + return HttpConfig; })(); @@ -8023,12 +8537,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.subfolderMatches = reader.string(); - break; - case 1: - message.pubsubTopicName = reader.string(); - break; + case 2: { + message.subfolderMatches = reader.string(); + break; + } + case 1: { + message.pubsubTopicName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8127,6 +8643,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EventNotificationConfig + * @function getTypeUrl + * @memberof google.cloud.iot.v1.EventNotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventNotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.EventNotificationConfig"; + }; + return EventNotificationConfig; })(); @@ -8222,9 +8753,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pubsubTopicName = reader.string(); - break; + case 1: { + message.pubsubTopicName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8314,6 +8846,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StateNotificationConfig + * @function getTypeUrl + * @memberof google.cloud.iot.v1.StateNotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StateNotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.StateNotificationConfig"; + }; + return StateNotificationConfig; })(); @@ -8423,9 +8970,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); - break; + case 1: { + message.publicKeyCertificate = $root.google.cloud.iot.v1.PublicKeyCertificate.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8525,6 +9073,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RegistryCredential + * @function getTypeUrl + * @memberof google.cloud.iot.v1.RegistryCredential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegistryCredential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.RegistryCredential"; + }; + return RegistryCredential; })(); @@ -8675,24 +9238,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.issuer = reader.string(); - break; - case 2: - message.subject = reader.string(); - break; - case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.signatureAlgorithm = reader.string(); - break; - case 6: - message.publicKeyType = reader.string(); - break; + case 1: { + message.issuer = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.expiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.signatureAlgorithm = reader.string(); + break; + } + case 6: { + message.publicKeyType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8833,6 +9402,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for X509CertificateDetails + * @function getTypeUrl + * @memberof google.cloud.iot.v1.X509CertificateDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + X509CertificateDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.X509CertificateDetails"; + }; + return X509CertificateDetails; })(); @@ -8950,15 +9534,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; - case 2: - message.certificate = reader.string(); - break; - case 3: - message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); - break; + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.certificate = reader.string(); + break; + } + case 3: { + message.x509Details = $root.google.cloud.iot.v1.X509CertificateDetails.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9083,6 +9670,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PublicKeyCertificate + * @function getTypeUrl + * @memberof google.cloud.iot.v1.PublicKeyCertificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicKeyCertificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.PublicKeyCertificate"; + }; + return PublicKeyCertificate; })(); @@ -9217,12 +9819,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); - break; - case 6: - message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 2: { + message.publicKey = $root.google.cloud.iot.v1.PublicKeyCredential.decode(reader, reader.uint32()); + break; + } + case 6: { + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9336,11 +9940,26 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceCredential; - })(); - - v1.PublicKeyCredential = (function() { - + /** + * Gets the default type url for DeviceCredential + * @function getTypeUrl + * @memberof google.cloud.iot.v1.DeviceCredential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceCredential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.DeviceCredential"; + }; + + return DeviceCredential; + })(); + + v1.PublicKeyCredential = (function() { + /** * Properties of a PublicKeyCredential. * @memberof google.cloud.iot.v1 @@ -9442,12 +10061,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; - case 2: - message.key = reader.string(); - break; + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9574,6 +10195,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PublicKeyCredential + * @function getTypeUrl + * @memberof google.cloud.iot.v1.PublicKeyCredential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicKeyCredential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.PublicKeyCredential"; + }; + return PublicKeyCredential; })(); @@ -9722,18 +10358,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.int64(); - break; - case 2: - message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.binaryData = reader.bytes(); - break; + case 1: { + message.version = reader.int64(); + break; + } + case 2: { + message.cloudUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.deviceAckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.binaryData = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -9822,7 +10462,7 @@ if (object.binaryData != null) if (typeof object.binaryData === "string") $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) + else if (object.binaryData.length >= 0) message.binaryData = object.binaryData; return message; }; @@ -9881,6 +10521,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceConfig + * @function getTypeUrl + * @memberof google.cloud.iot.v1.DeviceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.DeviceConfig"; + }; + return DeviceConfig; })(); @@ -9987,12 +10642,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.binaryData = reader.bytes(); - break; + case 1: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.binaryData = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -10059,7 +10716,7 @@ if (object.binaryData != null) if (typeof object.binaryData === "string") $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length) + else if (object.binaryData.length >= 0) message.binaryData = object.binaryData; return message; }; @@ -10105,6 +10762,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceState + * @function getTypeUrl + * @memberof google.cloud.iot.v1.DeviceState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iot.v1.DeviceState"; + }; + return DeviceState; })(); @@ -10231,14 +10903,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; @@ -10354,6 +11028,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; })(); @@ -10564,38 +11253,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; @@ -10817,6 +11516,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; })(); @@ -10923,12 +11637,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; @@ -11027,6 +11743,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; })(); @@ -11221,36 +11952,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; @@ -11448,6 +12186,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 @@ -11584,12 +12337,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; @@ -11688,6 +12443,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; })(); @@ -11797,11 +12567,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; @@ -11908,6 +12679,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; })(); @@ -11929,6 +12715,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 */ /** @@ -12049,6 +12836,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 @@ -12104,6 +12899,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; }; @@ -12138,68 +12935,84 @@ 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; - default: - reader.skipType(tag & 7); + 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; } } @@ -12309,6 +13122,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; }; @@ -12401,6 +13217,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -12432,6 +13250,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -12478,6 +13297,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; }; @@ -12492,6 +13313,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; })(); @@ -12702,52 +13538,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; @@ -13048,6 +13894,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() { /** @@ -13162,15 +14023,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; @@ -13282,6 +14146,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; })(); @@ -13388,12 +14267,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; @@ -13492,6 +14373,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; })(); @@ -13592,11 +14488,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; @@ -13703,6 +14600,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; })(); @@ -13908,39 +14820,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; @@ -14227,6 +15150,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 @@ -14395,12 +15333,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; @@ -14504,6 +15444,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; })(); @@ -14649,27 +15604,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; @@ -14845,6 +15805,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() { /** @@ -14948,12 +15923,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; @@ -15052,6 +16029,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; })(); @@ -15172,15 +16164,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; @@ -15292,6 +16287,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; })(); @@ -15411,17 +16421,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; @@ -15551,6 +16564,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; })(); @@ -15701,24 +16729,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; @@ -15854,6 +16888,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; })(); @@ -16184,76 +17233,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; @@ -16566,6 +17637,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 @@ -16734,26 +17820,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; @@ -16907,6 +17999,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; })(); @@ -16920,6 +18027,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 @@ -16976,6 +18084,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -17052,6 +18168,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(); @@ -17097,42 +18215,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; @@ -17192,6 +18323,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"; @@ -17277,6 +18411,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) @@ -17364,6 +18500,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")) @@ -17378,6 +18515,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) @@ -17404,6 +18543,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 @@ -17533,11 +18687,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; @@ -17644,6 +18799,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; })(); @@ -17763,17 +18933,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; @@ -17898,6 +19071,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; })(); @@ -18006,14 +19194,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; @@ -18129,6 +19319,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; })(); @@ -18259,20 +19464,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; @@ -18405,6 +19614,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; })(); @@ -18548,25 +19772,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; @@ -18743,6 +19972,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 @@ -18922,29 +20166,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; @@ -19057,7 +20308,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); @@ -19138,6 +20389,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() { /** @@ -19239,12 +20505,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; @@ -19345,6 +20613,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; })(); @@ -19445,11 +20728,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; @@ -19556,6 +20840,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() { /** @@ -19704,37 +21003,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; @@ -19895,6 +21199,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; })(); @@ -19995,11 +21314,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; @@ -20106,6 +21426,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() { /** @@ -20116,6 +21451,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 */ /** @@ -20166,6 +21502,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 @@ -20202,6 +21546,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; }; @@ -20236,25 +21582,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; @@ -20306,6 +21660,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; }; @@ -20334,6 +21697,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; }; @@ -20356,6 +21733,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -20368,6 +21746,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; }; @@ -20382,6 +21762,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; })(); @@ -20491,12 +21902,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; @@ -20609,6 +22022,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; })(); @@ -20715,12 +22143,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; @@ -20782,7 +22212,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; }; @@ -20828,26 +22258,43 @@ 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; })(); - protobuf.Empty = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an Empty. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface IEmpty + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Empty. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Empty(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) @@ -20855,174 +22302,12 @@ } /** - * 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 + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @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; + FieldMask.prototype.paths = $util.emptyArray; /** * Creates a new FieldMask instance using the specified properties. @@ -21085,11 +22370,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; @@ -21191,42 +22477,41 @@ 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; })(); - return protobuf; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { + protobuf.Empty = (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 + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty */ /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Status(properties) { - this.details = []; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21234,67 +22519,258 @@ } /** - * 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. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.rpc.Status + * @memberof google.protobuf.Empty * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Status.create = function create(properties) { - return new Status(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.rpc.Status + * @memberof google.protobuf.Empty * @static - * @param {google.rpc.IStatus} message Status 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 */ - Status.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.rpc.Status + * @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); + }; + + /** + * 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; + })(); + + 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 && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status * @static * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to @@ -21322,17 +22798,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; @@ -21457,6 +22936,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; })(); @@ -21514,7 +23008,7 @@ }; /** - * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. * @memberof google.iam.v1.IAMPolicy * @typedef SetIamPolicyCallback * @type {function} @@ -21547,7 +23041,7 @@ */ /** - * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. * @memberof google.iam.v1.IAMPolicy * @typedef GetIamPolicyCallback * @type {function} @@ -21580,7 +23074,7 @@ */ /** - * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. * @memberof google.iam.v1.IAMPolicy * @typedef TestIamPermissionsCallback * @type {function} @@ -21623,6 +23117,7 @@ * @interface ISetIamPolicyRequest * @property {string|null} [resource] SetIamPolicyRequest resource * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask */ /** @@ -21656,6 +23151,14 @@ */ SetIamPolicyRequest.prototype.policy = null; + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + /** * Creates a new SetIamPolicyRequest instance using the specified properties. * @function create @@ -21684,6 +23187,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -21718,12 +23223,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.resource = reader.string(); - break; - case 2: - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21767,6 +23278,11 @@ if (error) return "policy." + error; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; @@ -21789,6 +23305,11 @@ throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; @@ -21808,11 +23329,14 @@ if (options.defaults) { object.resource = ""; object.policy = null; + object.updateMask = null; } if (message.resource != null && message.hasOwnProperty("resource")) object.resource = message.resource; if (message.policy != null && message.hasOwnProperty("policy")) object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -21827,10 +23351,25 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetIamPolicyRequest; - })(); - - v1.GetIamPolicyRequest = (function() { + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { /** * Properties of a GetIamPolicyRequest. @@ -21933,12 +23472,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.resource = reader.string(); - break; - case 2: - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22042,6 +23583,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; + return GetIamPolicyRequest; })(); @@ -22150,14 +23706,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.resource = reader.string(); - break; - case 2: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22268,6 +23826,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; + return TestIamPermissionsRequest; })(); @@ -22365,11 +23938,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22471,6 +24045,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; + return TestIamPermissionsResponse; })(); @@ -22566,9 +24155,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.requestedPolicyVersion = reader.int32(); - break; + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -22658,6 +24248,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; + return GetPolicyOptions; })(); @@ -22669,6 +24274,7 @@ * @interface IPolicy * @property {number|null} [version] Policy version * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs * @property {Uint8Array|null} [etag] Policy etag */ @@ -22682,6 +24288,7 @@ */ function Policy(properties) { this.bindings = []; + this.auditConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22704,6 +24311,14 @@ */ Policy.prototype.bindings = $util.emptyArray; + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + /** * Policy etag. * @member {Uint8Array} etag @@ -22743,6 +24358,9 @@ if (message.bindings != null && message.bindings.length) for (var i = 0; i < message.bindings.length; ++i) $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -22777,17 +24395,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.int32(); - break; - case 4: - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - case 3: - message.etag = reader.bytes(); - break; + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -22835,6 +24462,15 @@ return "bindings." + error; } } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } if (message.etag != null && message.hasOwnProperty("etag")) if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) return "etag: buffer expected"; @@ -22865,10 +24501,20 @@ message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); } } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } if (object.etag != null) if (typeof object.etag === "string") $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length) + else if (object.etag.length >= 0) message.etag = object.etag; return message; }; @@ -22886,8 +24532,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.bindings = []; + object.auditConfigs = []; + } if (options.defaults) { object.version = 0; if (options.bytes === String) @@ -22907,44 +24555,583 @@ for (var j = 0; j < message.bindings.length; ++j) object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(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]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string 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) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.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"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } return object; }; /** - * Converts this Policy to JSON. + * Converts this AuditConfig to JSON. * @function toJSON - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.AuditConfig * @instance * @returns {Object.} JSON object */ - Policy.prototype.toJSON = function toJSON() { + AuditConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Policy; + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; })(); - v1.Binding = (function() { + v1.AuditLogConfig = (function() { /** - * Properties of a Binding. + * Properties of an AuditLogConfig. * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers */ /** - * Constructs a new Binding. + * Constructs a new AuditLogConfig. * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set */ - function Binding(properties) { - this.members = []; + function AuditLogConfig(properties) { + this.exemptedMembers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22952,105 +25139,94 @@ } /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig * @instance */ - Binding.prototype.members = $util.emptyArray; + AuditLogConfig.prototype.logType = 0; /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig * @instance */ - Binding.prototype.condition = null; + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; /** - * Creates a new Binding instance using the specified properties. + * Creates a new AuditLogConfig instance using the specified properties. * @function create - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance */ - Binding.create = function create(properties) { - return new Binding(properties); + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); }; /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. * @function encode - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Binding.encode = function encode(message, writer) { + AuditLogConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); return writer; }; /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Binding message from the specified reader or buffer. + * Decodes an AuditLogConfig message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Binding.decode = function decode(reader, length) { + AuditLogConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.role = reader.string(); - break; - case 2: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - case 3: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -23060,122 +25236,164 @@ }; /** - * Decodes a Binding message from the specified reader or buffer, length delimited. + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Binding.decodeDelimited = function decodeDelimited(reader) { + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Binding message. + * Verifies an AuditLogConfig message. * @function verify - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Binding.verify = function verify(message) { + AuditLogConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string 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) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; } return null; }; /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); } return message; }; /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @static - * @param {google.iam.v1.Binding} message Binding + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Binding.toObject = function toObject(message, options) { + AuditLogConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); return object; }; /** - * Converts this Binding to JSON. + * Converts this AuditLogConfig to JSON. * @function toJSON - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.AuditLogConfig * @instance * @returns {Object.} JSON object */ - Binding.prototype.toJSON = function toJSON() { + AuditLogConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Binding; + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; })(); v1.PolicyDelta = (function() { @@ -23285,16 +25503,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -23427,6 +25647,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + return PolicyDelta; })(); @@ -23555,18 +25790,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.action = reader.int32(); - break; - case 2: - message.role = reader.string(); - break; - case 3: - message.member = reader.string(); - break; - case 4: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23704,6 +25943,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + /** * Action enum. * @name google.iam.v1.BindingDelta.Action @@ -23848,18 +26102,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.action = reader.int32(); - break; - case 2: - message.service = reader.string(); - break; - case 3: - message.exemptedMember = reader.string(); - break; - case 4: - message.logType = reader.string(); - break; + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23992,6 +26250,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + /** * Action enum. * @name google.iam.v1.AuditConfigDelta.Action @@ -24151,18 +26424,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.expression = reader.string(); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.location = reader.string(); - break; + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24277,6 +26554,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + return Expr; })(); diff --git a/packages/google-cloud-iot/protos/protos.json b/packages/google-cloud-iot/protos/protos.json index 9497779533c..0f026f5320c 100644 --- a/packages/google-cloud-iot/protos/protos.json +++ b/packages/google-cloud-iot/protos/protos.json @@ -1495,6 +1495,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2023,6 +2027,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -2315,6 +2326,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } @@ -2344,9 +2368,6 @@ } } }, - "Empty": { - "fields": {} - }, "FieldMask": { "fields": { "paths": { @@ -2355,6 +2376,9 @@ "id": 1 } } + }, + "Empty": { + "fields": {} } } }, @@ -2471,6 +2495,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 } } }, @@ -2538,6 +2566,11 @@ "type": "Binding", "id": 4 }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, "etag": { "type": "bytes", "id": 3 @@ -2561,6 +2594,42 @@ } } }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, "PolicyDelta": { "fields": { "bindingDeltas": { From 912c188553e3d6a9392626bc32efdd3990abfa9d 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:11 +0000 Subject: [PATCH 349/370] fix: do not import the whole google-gax from proto JS (#1553) (#583) 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-iot/package.json | 2 +- packages/google-cloud-iot/protos/protos.d.ts | 2 +- packages/google-cloud-iot/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 65361f122fa..35c7cd3125f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index e1b97d5f7f5..c444bd50904 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 0019055656d..36447f3090b 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/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 387150a411ad8dadf5127f143eb0848ba88b621b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:52:36 +0000 Subject: [PATCH 350/370] fix: allow passing gax instance to client constructor (#584) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/device_manager_client.ts | 73 +++++++++++-------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 3b85af18e64..447a6772c83 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './device_manager_client_config.json'; - const version = require('../../../package.json').version; /** @@ -96,8 +94,18 @@ export class DeviceManagerClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DeviceManagerClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof DeviceManagerClient; const servicePath = @@ -117,8 +125,13 @@ export class DeviceManagerClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -203,7 +216,7 @@ export class DeviceManagerClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -434,7 +447,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -520,7 +533,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -619,7 +632,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'device_registry.name': request.deviceRegistry!.name || '', }); this.initialize(); @@ -711,7 +724,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -800,7 +813,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -889,7 +902,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -980,7 +993,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'device.name': request.device!.name || '', }); this.initialize(); @@ -1065,7 +1078,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1168,7 +1181,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1270,7 +1283,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1366,7 +1379,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1462,7 +1475,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ resource: request.resource || '', }); this.initialize(); @@ -1551,7 +1564,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ resource: request.resource || '', }); this.initialize(); @@ -1642,7 +1655,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ resource: request.resource || '', }); this.initialize(); @@ -1749,7 +1762,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1842,7 +1855,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1941,7 +1954,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2050,7 +2063,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2094,7 +2107,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDeviceRegistries']; @@ -2147,7 +2160,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDeviceRegistries']; @@ -2262,7 +2275,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2319,7 +2332,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDevices']; @@ -2385,7 +2398,7 @@ export class DeviceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDevices']; From 15cfd951dbda91501c5197675721610cb38f278b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 04:03:05 +0200 Subject: [PATCH 351/370] chore(deps): update dependency uuid to v9 (#585) --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 04512cbd4e5..a9e10723b4c 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -25,7 +25,7 @@ "jsonwebtoken": "^8.5.0", "mocha": "^8.1.1", "mqtt": "^4.0.0", - "uuid": "^8.0.0", + "uuid": "^9.0.0", "yargs": "^16.0.0" } } From 9d84c9ed09b8cc7573102988df133f3aadaa2f3b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:42:18 +0000 Subject: [PATCH 352/370] fix: preserve default values in x-goog-request-params header (#586) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/device_manager_client.ts | 46 +- .../test/gapic_device_manager_v1.ts | 1811 +++++++++-------- 2 files changed, 955 insertions(+), 902 deletions(-) diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index 447a6772c83..9e9065c5e0b 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -448,7 +448,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createDeviceRegistry(request, options, callback); @@ -534,7 +534,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getDeviceRegistry(request, options, callback); @@ -633,7 +633,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'device_registry.name': request.deviceRegistry!.name || '', + 'device_registry.name': request.deviceRegistry!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateDeviceRegistry(request, options, callback); @@ -725,7 +725,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteDeviceRegistry(request, options, callback); @@ -814,7 +814,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createDevice(request, options, callback); @@ -903,7 +903,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getDevice(request, options, callback); @@ -994,7 +994,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'device.name': request.device!.name || '', + 'device.name': request.device!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateDevice(request, options, callback); @@ -1079,7 +1079,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteDevice(request, options, callback); @@ -1182,7 +1182,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.modifyCloudToDeviceConfig( @@ -1284,7 +1284,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.listDeviceConfigVersions( @@ -1380,7 +1380,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.listDeviceStates(request, options, callback); @@ -1476,7 +1476,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - resource: request.resource || '', + resource: request.resource ?? '', }); this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); @@ -1565,7 +1565,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - resource: request.resource || '', + resource: request.resource ?? '', }); this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); @@ -1656,7 +1656,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - resource: request.resource || '', + resource: request.resource ?? '', }); this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); @@ -1763,7 +1763,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.sendCommandToDevice(request, options, callback); @@ -1856,7 +1856,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.bindDeviceToGateway(request, options, callback); @@ -1955,7 +1955,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.unbindDeviceFromGateway( @@ -2064,7 +2064,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listDeviceRegistries(request, options, callback); @@ -2108,7 +2108,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDeviceRegistries']; const callSettings = defaultCallSettings.merge(options); @@ -2161,7 +2161,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDeviceRegistries']; const callSettings = defaultCallSettings.merge(options); @@ -2276,7 +2276,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listDevices(request, options, callback); @@ -2333,7 +2333,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDevices']; const callSettings = defaultCallSettings.merge(options); @@ -2399,7 +2399,7 @@ export class DeviceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDevices']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index de9ed0370c2..4caa9e4c152 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -222,15 +237,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); @@ -238,11 +249,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDeviceRegistry without error using callback', async () => { @@ -254,15 +268,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); @@ -285,11 +295,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDeviceRegistry with error', async () => { @@ -301,26 +314,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createDeviceRegistry = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createDeviceRegistry(request), expectedError); - assert( - (client.innerApiCalls.createDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDeviceRegistry with closed client', async () => { @@ -332,7 +344,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createDeviceRegistry(request), expectedError); @@ -349,26 +364,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); client.innerApiCalls.getDeviceRegistry = stubSimpleCall(expectedResponse); const [response] = await client.getDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDeviceRegistry without error using callback', async () => { @@ -380,15 +394,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); @@ -411,11 +421,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDeviceRegistry with error', async () => { @@ -427,26 +440,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getDeviceRegistry = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getDeviceRegistry(request), expectedError); - assert( - (client.innerApiCalls.getDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDeviceRegistry with closed client', async () => { @@ -458,7 +470,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDeviceRegistry(request), expectedError); @@ -475,16 +490,13 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deviceRegistry ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ + 'deviceRegistry', + 'name', + ]); + request.deviceRegistry.name = defaultValue1; + const expectedHeaderRequestParams = `device_registry.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); @@ -492,11 +504,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.updateDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDeviceRegistry without error using callback', async () => { @@ -508,16 +523,13 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deviceRegistry ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ + 'deviceRegistry', + 'name', + ]); + request.deviceRegistry.name = defaultValue1; + const expectedHeaderRequestParams = `device_registry.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceRegistry() ); @@ -540,11 +552,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDeviceRegistry with error', async () => { @@ -556,27 +571,27 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; - const expectedHeaderRequestParams = 'device_registry.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deviceRegistry ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ + 'deviceRegistry', + 'name', + ]); + request.deviceRegistry.name = defaultValue1; + const expectedHeaderRequestParams = `device_registry.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateDeviceRegistry = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateDeviceRegistry(request), expectedError); - assert( - (client.innerApiCalls.updateDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDeviceRegistry with closed client', async () => { @@ -588,8 +603,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); - request.deviceRegistry = {}; - request.deviceRegistry.name = ''; + request.deviceRegistry ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ + 'deviceRegistry', + 'name', + ]); + request.deviceRegistry.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateDeviceRegistry(request), expectedError); @@ -606,15 +625,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -622,11 +637,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteDeviceRegistry(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDeviceRegistry without error using callback', async () => { @@ -638,15 +656,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -669,11 +683,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDeviceRegistry with error', async () => { @@ -685,26 +702,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteDeviceRegistry = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteDeviceRegistry(request), expectedError); - assert( - (client.innerApiCalls.deleteDeviceRegistry as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeviceRegistry as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeviceRegistry as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDeviceRegistry with closed client', async () => { @@ -716,7 +732,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteDeviceRegistry(request), expectedError); @@ -733,26 +752,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); client.innerApiCalls.createDevice = stubSimpleCall(expectedResponse); const [response] = await client.createDevice(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDevice without error using callback', async () => { @@ -764,15 +782,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); @@ -795,11 +809,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDevice with error', async () => { @@ -811,26 +828,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createDevice = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createDevice(request), expectedError); - assert( - (client.innerApiCalls.createDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDevice with closed client', async () => { @@ -842,7 +858,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createDevice(request), expectedError); @@ -859,26 +878,23 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); client.innerApiCalls.getDevice = stubSimpleCall(expectedResponse); const [response] = await client.getDevice(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDevice without error using callback', async () => { @@ -890,15 +906,9 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); @@ -921,11 +931,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDevice with error', async () => { @@ -937,23 +950,20 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getDevice = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getDevice(request), expectedError); - assert( - (client.innerApiCalls.getDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDevice with closed client', async () => { @@ -965,7 +975,8 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDevice(request), expectedError); @@ -982,27 +993,27 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.device ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ + 'device', + 'name', + ]); + request.device.name = defaultValue1; + const expectedHeaderRequestParams = `device.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); client.innerApiCalls.updateDevice = stubSimpleCall(expectedResponse); const [response] = await client.updateDevice(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDevice without error using callback', async () => { @@ -1014,16 +1025,13 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.device ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ + 'device', + 'name', + ]); + request.device.name = defaultValue1; + const expectedHeaderRequestParams = `device.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.Device() ); @@ -1046,11 +1054,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDevice with error', async () => { @@ -1062,27 +1073,27 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); - request.device = {}; - request.device.name = ''; - const expectedHeaderRequestParams = 'device.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.device ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ + 'device', + 'name', + ]); + request.device.name = defaultValue1; + const expectedHeaderRequestParams = `device.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateDevice = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateDevice(request), expectedError); - assert( - (client.innerApiCalls.updateDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDevice with closed client', async () => { @@ -1094,8 +1105,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); - request.device = {}; - request.device.name = ''; + request.device ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ + 'device', + 'name', + ]); + request.device.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateDevice(request), expectedError); @@ -1112,26 +1127,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteDevice = stubSimpleCall(expectedResponse); const [response] = await client.deleteDevice(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDevice without error using callback', async () => { @@ -1143,15 +1157,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1174,11 +1184,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDevice with error', async () => { @@ -1190,26 +1203,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteDevice = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteDevice(request), expectedError); - assert( - (client.innerApiCalls.deleteDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDevice with closed client', async () => { @@ -1221,7 +1233,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteDevice(request), expectedError); @@ -1238,15 +1253,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ModifyCloudToDeviceConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceConfig() ); @@ -1254,11 +1266,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.modifyCloudToDeviceConfig(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes modifyCloudToDeviceConfig without error using callback', async () => { @@ -1270,15 +1285,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ModifyCloudToDeviceConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.DeviceConfig() ); @@ -1301,11 +1313,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes modifyCloudToDeviceConfig with error', async () => { @@ -1317,15 +1332,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ModifyCloudToDeviceConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.modifyCloudToDeviceConfig = stubSimpleCall( undefined, @@ -1335,11 +1347,14 @@ describe('v1.DeviceManagerClient', () => { client.modifyCloudToDeviceConfig(request), expectedError ); - assert( - (client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyCloudToDeviceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes modifyCloudToDeviceConfig with closed client', async () => { @@ -1351,7 +1366,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'ModifyCloudToDeviceConfigRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1371,15 +1390,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListDeviceConfigVersionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() ); @@ -1387,11 +1403,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listDeviceConfigVersions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceConfigVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceConfigVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceConfigVersions without error using callback', async () => { @@ -1403,15 +1422,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListDeviceConfigVersionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsResponse() ); @@ -1434,11 +1450,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceConfigVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceConfigVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceConfigVersions with error', async () => { @@ -1450,15 +1469,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListDeviceConfigVersionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listDeviceConfigVersions = stubSimpleCall( undefined, @@ -1468,11 +1484,14 @@ describe('v1.DeviceManagerClient', () => { client.listDeviceConfigVersions(request), expectedError ); - assert( - (client.innerApiCalls.listDeviceConfigVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceConfigVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceConfigVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceConfigVersions with closed client', async () => { @@ -1484,7 +1503,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'ListDeviceConfigVersionsRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1504,26 +1527,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesResponse() ); client.innerApiCalls.listDeviceStates = stubSimpleCall(expectedResponse); const [response] = await client.listDeviceStates(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceStates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceStates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceStates without error using callback', async () => { @@ -1535,15 +1557,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesResponse() ); @@ -1566,11 +1584,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceStates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceStates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceStates with error', async () => { @@ -1582,26 +1603,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listDeviceStates = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listDeviceStates(request), expectedError); - assert( - (client.innerApiCalls.listDeviceStates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceStates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceStates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceStates with closed client', async () => { @@ -1613,7 +1633,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.listDeviceStates(request), expectedError); @@ -1630,26 +1653,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.iam.v1.Policy() ); client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); const [response] = await client.setIamPolicy(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes setIamPolicy without error using callback', async () => { @@ -1661,15 +1683,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.iam.v1.Policy() ); @@ -1692,11 +1710,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes setIamPolicy with error', async () => { @@ -1708,26 +1729,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.setIamPolicy = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.setIamPolicy(request), expectedError); - assert( - (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes setIamPolicy with closed client', async () => { @@ -1739,7 +1759,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - request.resource = ''; + const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.setIamPolicy(request), expectedError); @@ -1756,26 +1779,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.iam.v1.Policy() ); client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); const [response] = await client.getIamPolicy(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getIamPolicy without error using callback', async () => { @@ -1787,15 +1809,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.iam.v1.Policy() ); @@ -1818,11 +1836,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getIamPolicy with error', async () => { @@ -1834,26 +1855,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getIamPolicy = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getIamPolicy(request), expectedError); - assert( - (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getIamPolicy with closed client', async () => { @@ -1865,7 +1885,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - request.resource = ''; + const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ + 'resource', + ]); + request.resource = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getIamPolicy(request), expectedError); @@ -1882,15 +1905,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsResponse() ); @@ -1898,11 +1917,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.testIamPermissions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes testIamPermissions without error using callback', async () => { @@ -1914,15 +1936,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsResponse() ); @@ -1945,11 +1963,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes testIamPermissions with error', async () => { @@ -1961,26 +1982,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ + 'resource', + ]); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.testIamPermissions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.testIamPermissions(request), expectedError); - assert( - (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes testIamPermissions with closed client', async () => { @@ -1992,7 +2012,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - request.resource = ''; + const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ + 'resource', + ]); + request.resource = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.testIamPermissions(request), expectedError); @@ -2009,15 +2032,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() ); @@ -2025,11 +2044,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.sendCommandToDevice(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.sendCommandToDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.sendCommandToDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes sendCommandToDevice without error using callback', async () => { @@ -2041,15 +2063,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceResponse() ); @@ -2072,11 +2090,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.sendCommandToDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.sendCommandToDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes sendCommandToDevice with error', async () => { @@ -2088,26 +2109,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.sendCommandToDevice = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.sendCommandToDevice(request), expectedError); - assert( - (client.innerApiCalls.sendCommandToDevice as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.sendCommandToDevice as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.sendCommandToDevice as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes sendCommandToDevice with closed client', async () => { @@ -2119,7 +2139,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.sendCommandToDevice(request), expectedError); @@ -2136,15 +2159,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() ); @@ -2152,11 +2171,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.bindDeviceToGateway(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.bindDeviceToGateway as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bindDeviceToGateway as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes bindDeviceToGateway without error using callback', async () => { @@ -2168,15 +2190,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayResponse() ); @@ -2199,11 +2217,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.bindDeviceToGateway as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bindDeviceToGateway as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes bindDeviceToGateway with error', async () => { @@ -2215,26 +2236,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.bindDeviceToGateway = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.bindDeviceToGateway(request), expectedError); - assert( - (client.innerApiCalls.bindDeviceToGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.bindDeviceToGateway as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bindDeviceToGateway as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes bindDeviceToGateway with closed client', async () => { @@ -2246,7 +2266,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.bindDeviceToGateway(request), expectedError); @@ -2263,15 +2286,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UnbindDeviceFromGatewayRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() ); @@ -2279,11 +2299,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.unbindDeviceFromGateway(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.unbindDeviceFromGateway as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.unbindDeviceFromGateway as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes unbindDeviceFromGateway without error using callback', async () => { @@ -2295,15 +2318,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UnbindDeviceFromGatewayRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse() ); @@ -2326,11 +2346,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.unbindDeviceFromGateway as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.unbindDeviceFromGateway as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes unbindDeviceFromGateway with error', async () => { @@ -2342,15 +2365,12 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UnbindDeviceFromGatewayRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.unbindDeviceFromGateway = stubSimpleCall( undefined, @@ -2360,11 +2380,14 @@ describe('v1.DeviceManagerClient', () => { client.unbindDeviceFromGateway(request), expectedError ); - assert( - (client.innerApiCalls.unbindDeviceFromGateway as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.unbindDeviceFromGateway as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.unbindDeviceFromGateway as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes unbindDeviceFromGateway with closed client', async () => { @@ -2376,7 +2399,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + 'UnbindDeviceFromGatewayRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -2396,15 +2423,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), @@ -2414,11 +2437,14 @@ describe('v1.DeviceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listDeviceRegistries(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceRegistries as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceRegistries as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceRegistries without error using callback', async () => { @@ -2430,15 +2456,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), @@ -2463,11 +2485,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceRegistries as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceRegistries as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceRegistries with error', async () => { @@ -2479,26 +2504,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listDeviceRegistries = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listDeviceRegistries(request), expectedError); - assert( - (client.innerApiCalls.listDeviceRegistries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeviceRegistries as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeviceRegistries as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeviceRegistriesStream without error', async () => { @@ -2510,8 +2534,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), @@ -2542,11 +2569,12 @@ describe('v1.DeviceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDeviceRegistries, request) ); - assert.strictEqual( - ( - client.descriptors.page.listDeviceRegistries.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2559,8 +2587,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDeviceRegistries.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2586,11 +2617,12 @@ describe('v1.DeviceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDeviceRegistries, request) ); - assert.strictEqual( - ( - client.descriptors.page.listDeviceRegistries.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDeviceRegistries.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2603,8 +2635,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), generateSampleMessage(new protos.google.cloud.iot.v1.DeviceRegistry()), @@ -2624,11 +2659,12 @@ describe('v1.DeviceManagerClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2641,8 +2677,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDeviceRegistries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2659,11 +2698,12 @@ describe('v1.DeviceManagerClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDeviceRegistries.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2678,15 +2718,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), @@ -2695,11 +2731,14 @@ describe('v1.DeviceManagerClient', () => { client.innerApiCalls.listDevices = stubSimpleCall(expectedResponse); const [response] = await client.listDevices(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDevices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDevices as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDevices as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDevices without error using callback', async () => { @@ -2711,15 +2750,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), @@ -2744,11 +2779,14 @@ describe('v1.DeviceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDevices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listDevices as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDevices as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDevices with error', async () => { @@ -2760,26 +2798,25 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listDevices = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listDevices(request), expectedError); - assert( - (client.innerApiCalls.listDevices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDevices as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDevices as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDevicesStream without error', async () => { @@ -2791,8 +2828,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), @@ -2820,11 +2860,12 @@ describe('v1.DeviceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDevices, request) ); - assert.strictEqual( - (client.descriptors.page.listDevices.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDevices.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2837,8 +2878,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDevices.createStream = stubPageStreamingCall( undefined, @@ -2863,11 +2907,12 @@ describe('v1.DeviceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDevices, request) ); - assert.strictEqual( - (client.descriptors.page.listDevices.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDevices.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2880,8 +2925,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.iot.v1.Device()), generateSampleMessage(new protos.google.cloud.iot.v1.Device()), @@ -2901,11 +2949,12 @@ describe('v1.DeviceManagerClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDevices.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2918,8 +2967,11 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDevices.asyncIterate = stubAsyncIterationCall( undefined, @@ -2938,11 +2990,12 @@ describe('v1.DeviceManagerClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listDevices.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDevices.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 04bddc94c3a10408d1918f5f4c8664d2759416fd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:11:32 -0700 Subject: [PATCH 353/370] build: use fully qualified request type name in tests (#588) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_device_manager_v1.ts | 514 ++++++++++-------- 1 file changed, 292 insertions(+), 222 deletions(-) diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 4caa9e4c152..e3c5e121462 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -237,9 +237,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRegistryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -268,9 +269,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRegistryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -314,9 +316,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRegistryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -344,9 +347,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRegistryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRegistryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -364,9 +368,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -394,9 +399,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -440,9 +446,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -470,9 +477,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -491,10 +499,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); request.deviceRegistry ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ - 'deviceRegistry', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRegistryRequest', + ['deviceRegistry', 'name'] + ); request.deviceRegistry.name = defaultValue1; const expectedHeaderRequestParams = `device_registry.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -524,10 +532,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); request.deviceRegistry ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ - 'deviceRegistry', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRegistryRequest', + ['deviceRegistry', 'name'] + ); request.deviceRegistry.name = defaultValue1; const expectedHeaderRequestParams = `device_registry.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -572,10 +580,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); request.deviceRegistry ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ - 'deviceRegistry', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRegistryRequest', + ['deviceRegistry', 'name'] + ); request.deviceRegistry.name = defaultValue1; const expectedHeaderRequestParams = `device_registry.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -604,10 +612,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); request.deviceRegistry ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRegistryRequest', [ - 'deviceRegistry', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRegistryRequest', + ['deviceRegistry', 'name'] + ); request.deviceRegistry.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -625,9 +633,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -656,9 +665,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -702,9 +712,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -732,9 +743,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRegistryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRegistryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -752,9 +764,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -782,9 +795,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -828,9 +842,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -858,9 +873,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDeviceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.CreateDeviceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -878,7 +894,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -906,7 +925,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -950,7 +972,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -975,7 +1000,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeviceRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.GetDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -994,10 +1022,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); request.device ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ - 'device', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRequest', + ['device', 'name'] + ); request.device.name = defaultValue1; const expectedHeaderRequestParams = `device.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1026,10 +1054,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); request.device ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ - 'device', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRequest', + ['device', 'name'] + ); request.device.name = defaultValue1; const expectedHeaderRequestParams = `device.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1074,10 +1102,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); request.device ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ - 'device', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRequest', + ['device', 'name'] + ); request.device.name = defaultValue1; const expectedHeaderRequestParams = `device.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1106,10 +1134,10 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); request.device ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDeviceRequest', [ - 'device', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.UpdateDeviceRequest', + ['device', 'name'] + ); request.device.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1127,9 +1155,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1157,9 +1186,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1203,9 +1233,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1233,9 +1264,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.DeleteDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1254,7 +1286,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ModifyCloudToDeviceConfigRequest', + '.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest', ['name'] ); request.name = defaultValue1; @@ -1286,7 +1318,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ModifyCloudToDeviceConfigRequest', + '.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest', ['name'] ); request.name = defaultValue1; @@ -1333,7 +1365,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ModifyCloudToDeviceConfigRequest', + '.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest', ['name'] ); request.name = defaultValue1; @@ -1367,7 +1399,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ModifyCloudToDeviceConfigRequest', + '.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest', ['name'] ); request.name = defaultValue1; @@ -1391,7 +1423,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeviceConfigVersionsRequest', + '.google.cloud.iot.v1.ListDeviceConfigVersionsRequest', ['name'] ); request.name = defaultValue1; @@ -1423,7 +1455,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeviceConfigVersionsRequest', + '.google.cloud.iot.v1.ListDeviceConfigVersionsRequest', ['name'] ); request.name = defaultValue1; @@ -1470,7 +1502,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeviceConfigVersionsRequest', + '.google.cloud.iot.v1.ListDeviceConfigVersionsRequest', ['name'] ); request.name = defaultValue1; @@ -1504,7 +1536,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeviceConfigVersionsRequest', + '.google.cloud.iot.v1.ListDeviceConfigVersionsRequest', ['name'] ); request.name = defaultValue1; @@ -1527,9 +1559,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceStatesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1557,9 +1590,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceStatesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1603,9 +1637,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceStatesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1633,9 +1668,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceStatesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceStatesRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1653,9 +1689,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1683,9 +1720,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1729,9 +1767,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1759,9 +1798,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('SetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1779,9 +1819,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1809,9 +1850,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1855,9 +1897,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1885,9 +1928,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue('GetIamPolicyRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1905,9 +1949,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1936,9 +1981,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1982,9 +2028,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2012,9 +2059,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); - const defaultValue1 = getTypeDefaultValue('TestIamPermissionsRequest', [ - 'resource', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); request.resource = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2032,9 +2080,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.SendCommandToDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2063,9 +2112,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.SendCommandToDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2109,9 +2159,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.SendCommandToDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2139,9 +2190,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); - const defaultValue1 = getTypeDefaultValue('SendCommandToDeviceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.SendCommandToDeviceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2159,9 +2211,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.BindDeviceToGatewayRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2190,9 +2243,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.BindDeviceToGatewayRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2236,9 +2290,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.BindDeviceToGatewayRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2266,9 +2321,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); - const defaultValue1 = getTypeDefaultValue('BindDeviceToGatewayRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.BindDeviceToGatewayRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2287,7 +2343,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UnbindDeviceFromGatewayRequest', + '.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest', ['parent'] ); request.parent = defaultValue1; @@ -2319,7 +2375,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UnbindDeviceFromGatewayRequest', + '.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest', ['parent'] ); request.parent = defaultValue1; @@ -2366,7 +2422,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UnbindDeviceFromGatewayRequest', + '.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest', ['parent'] ); request.parent = defaultValue1; @@ -2400,7 +2456,7 @@ describe('v1.DeviceManagerClient', () => { new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UnbindDeviceFromGatewayRequest', + '.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest', ['parent'] ); request.parent = defaultValue1; @@ -2423,9 +2479,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2456,9 +2513,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2504,9 +2562,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2534,9 +2593,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2587,9 +2647,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2635,9 +2696,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2677,9 +2739,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDeviceRegistriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDeviceRegistriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2718,9 +2781,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2750,9 +2814,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2798,9 +2863,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2828,9 +2894,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2878,9 +2945,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2925,9 +2993,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2967,9 +3036,10 @@ describe('v1.DeviceManagerClient', () => { const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDevicesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.iot.v1.ListDevicesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From 1f2242aa533a90b1f01b9d95d428570b07fd6ae9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 18:26:21 +0000 Subject: [PATCH 354/370] chore(main): release 3.1.1 (#578) :robot: I have created a release *beep* *boop* --- ## [3.1.1](https://github.com/googleapis/nodejs-iot/compare/v3.1.0...v3.1.1) (2022-09-22) ### Bug Fixes * Allow passing gax instance to client constructor ([#584](https://github.com/googleapis/nodejs-iot/issues/584)) ([4bbcd42](https://github.com/googleapis/nodejs-iot/commit/4bbcd422ea06028139f416d1a1a1cf9b48ff3909)) * Better support for fallback mode ([#580](https://github.com/googleapis/nodejs-iot/issues/580)) ([8a387d0](https://github.com/googleapis/nodejs-iot/commit/8a387d06c3cf806644c78552c286d7893e73eb74)) * Change import long to require ([#581](https://github.com/googleapis/nodejs-iot/issues/581)) ([2ad4aac](https://github.com/googleapis/nodejs-iot/commit/2ad4aac2aca20dc61fe9e85c5d12fb1631c266de)) * **deps:** Update dependency @google-cloud/iot to v3 ([#576](https://github.com/googleapis/nodejs-iot/issues/576)) ([12bf4a7](https://github.com/googleapis/nodejs-iot/commit/12bf4a77880200f564c26224f2d4aecaacbf6a03)) * Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-iot/issues/1553)) ([#583](https://github.com/googleapis/nodejs-iot/issues/583)) ([24729a5](https://github.com/googleapis/nodejs-iot/commit/24729a57621676b297aa4cdcc32fe536a468b580)) * Preserve default values in x-goog-request-params header ([#586](https://github.com/googleapis/nodejs-iot/issues/586)) ([cced8e7](https://github.com/googleapis/nodejs-iot/commit/cced8e788357647819aee81589b776f962e67289)) * Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-iot/issues/1546)) ([#582](https://github.com/googleapis/nodejs-iot/issues/582)) ([c6bb3f9](https://github.com/googleapis/nodejs-iot/commit/c6bb3f9b0b60009873f5d4b7f06fb47c9d8f6cc8)) * use google-gax v3.3.0 ([24729a5](https://github.com/googleapis/nodejs-iot/commit/24729a57621676b297aa4cdcc32fe536a468b580)) --- 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-iot/CHANGELOG.md | 14 ++++++++++++++ packages/google-cloud-iot/package.json | 2 +- .../v1/snippet_metadata.google.cloud.iot.v1.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 397836fadaf..13a056ee4ab 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [3.1.1](https://github.com/googleapis/nodejs-iot/compare/v3.1.0...v3.1.1) (2022-09-22) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#584](https://github.com/googleapis/nodejs-iot/issues/584)) ([4bbcd42](https://github.com/googleapis/nodejs-iot/commit/4bbcd422ea06028139f416d1a1a1cf9b48ff3909)) +* Better support for fallback mode ([#580](https://github.com/googleapis/nodejs-iot/issues/580)) ([8a387d0](https://github.com/googleapis/nodejs-iot/commit/8a387d06c3cf806644c78552c286d7893e73eb74)) +* Change import long to require ([#581](https://github.com/googleapis/nodejs-iot/issues/581)) ([2ad4aac](https://github.com/googleapis/nodejs-iot/commit/2ad4aac2aca20dc61fe9e85c5d12fb1631c266de)) +* **deps:** Update dependency @google-cloud/iot to v3 ([#576](https://github.com/googleapis/nodejs-iot/issues/576)) ([12bf4a7](https://github.com/googleapis/nodejs-iot/commit/12bf4a77880200f564c26224f2d4aecaacbf6a03)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-iot/issues/1553)) ([#583](https://github.com/googleapis/nodejs-iot/issues/583)) ([24729a5](https://github.com/googleapis/nodejs-iot/commit/24729a57621676b297aa4cdcc32fe536a468b580)) +* Preserve default values in x-goog-request-params header ([#586](https://github.com/googleapis/nodejs-iot/issues/586)) ([cced8e7](https://github.com/googleapis/nodejs-iot/commit/cced8e788357647819aee81589b776f962e67289)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-iot/issues/1546)) ([#582](https://github.com/googleapis/nodejs-iot/issues/582)) ([c6bb3f9](https://github.com/googleapis/nodejs-iot/commit/c6bb3f9b0b60009873f5d4b7f06fb47c9d8f6cc8)) +* use google-gax v3.3.0 ([24729a5](https://github.com/googleapis/nodejs-iot/commit/24729a57621676b297aa4cdcc32fe536a468b580)) + ## [3.1.0](https://github.com/googleapis/nodejs-iot/compare/v3.0.0...v3.1.0) (2022-07-05) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 35c7cd3125f..96f712c4eec 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "3.1.0", + "version": "3.1.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index f3a41c0f895..82207c4b578 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "3.1.0", + "version": "3.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index a9e10723b4c..06bf91c7e85 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^3.1.0", + "@google-cloud/iot": "^3.1.1", "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^6.0.0" }, From decdb85aae018a2ed331f6431c010c1240ea899d Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:48:53 -0700 Subject: [PATCH 355/370] fix(deps): use google-gax v3.5.2 (#593) --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 96f712c4eec..5a66483a061 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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 db33a1c5df6da83b0e64624b5d35913d34e04111 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:19:32 -0800 Subject: [PATCH 356/370] fix: update protos (#597) fix: update protos 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 --- packages/google-cloud-iot/protos/protos.d.ts | 2 +- packages/google-cloud-iot/protos/protos.js | 172 ++++++++++++++++--- 2 files changed, 151 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-iot/protos/protos.d.ts b/packages/google-cloud-iot/protos/protos.d.ts index c444bd50904..5cf842a51e0 100644 --- a/packages/google-cloud-iot/protos/protos.d.ts +++ b/packages/google-cloud-iot/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-iot/protos/protos.js b/packages/google-cloud-iot/protos/protos.js index 36447f3090b..c5223f45778 100644 --- a/packages/google-cloud-iot/protos/protos.js +++ b/packages/google-cloud-iot/protos/protos.js @@ -3626,6 +3626,12 @@ return object; var message = new $root.google.cloud.iot.v1.GatewayListOptions(); switch (object.gatewayType) { + default: + if (typeof object.gatewayType === "number") { + message.gatewayType = object.gatewayType; + break; + } + break; case "GATEWAY_TYPE_UNSPECIFIED": case 0: message.gatewayType = 0; @@ -3660,7 +3666,7 @@ options = {}; var object = {}; if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) { - object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] === undefined ? message.gatewayType : $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; if (options.oneofs) object.filter = "gatewayType"; } @@ -6985,6 +6991,12 @@ message.state = $root.google.cloud.iot.v1.DeviceState.fromObject(object.state); } switch (object.logLevel) { + default: + if (typeof object.logLevel === "number") { + message.logLevel = object.logLevel; + break; + } + break; case "LOG_LEVEL_UNSPECIFIED": case 0: message.logLevel = 0; @@ -7100,7 +7112,7 @@ if (message.lastStateTime != null && message.hasOwnProperty("lastStateTime")) object.lastStateTime = $root.google.protobuf.Timestamp.toObject(message.lastStateTime, options); if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] === undefined ? message.logLevel : $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; if (message.gatewayConfig != null && message.hasOwnProperty("gatewayConfig")) object.gatewayConfig = $root.google.cloud.iot.v1.GatewayConfig.toObject(message.gatewayConfig, options); return object; @@ -7354,6 +7366,12 @@ return object; var message = new $root.google.cloud.iot.v1.GatewayConfig(); switch (object.gatewayType) { + default: + if (typeof object.gatewayType === "number") { + message.gatewayType = object.gatewayType; + break; + } + break; case "GATEWAY_TYPE_UNSPECIFIED": case 0: message.gatewayType = 0; @@ -7368,6 +7386,12 @@ break; } switch (object.gatewayAuthMethod) { + default: + if (typeof object.gatewayAuthMethod === "number") { + message.gatewayAuthMethod = object.gatewayAuthMethod; + break; + } + break; case "GATEWAY_AUTH_METHOD_UNSPECIFIED": case 0: message.gatewayAuthMethod = 0; @@ -7415,9 +7439,9 @@ object.lastAccessedGatewayTime = null; } if (message.gatewayType != null && message.hasOwnProperty("gatewayType")) - object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; + object.gatewayType = options.enums === String ? $root.google.cloud.iot.v1.GatewayType[message.gatewayType] === undefined ? message.gatewayType : $root.google.cloud.iot.v1.GatewayType[message.gatewayType] : message.gatewayType; if (message.gatewayAuthMethod != null && message.hasOwnProperty("gatewayAuthMethod")) - object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; + object.gatewayAuthMethod = options.enums === String ? $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] === undefined ? message.gatewayAuthMethod : $root.google.cloud.iot.v1.GatewayAuthMethod[message.gatewayAuthMethod] : message.gatewayAuthMethod; if (message.lastAccessedGatewayId != null && message.hasOwnProperty("lastAccessedGatewayId")) object.lastAccessedGatewayId = message.lastAccessedGatewayId; if (message.lastAccessedGatewayTime != null && message.hasOwnProperty("lastAccessedGatewayTime")) @@ -7793,6 +7817,12 @@ message.httpConfig = $root.google.cloud.iot.v1.HttpConfig.fromObject(object.httpConfig); } switch (object.logLevel) { + default: + if (typeof object.logLevel === "number") { + message.logLevel = object.logLevel; + break; + } + break; case "LOG_LEVEL_UNSPECIFIED": case 0: message.logLevel = 0; @@ -7873,7 +7903,7 @@ object.eventNotificationConfigs[j] = $root.google.cloud.iot.v1.EventNotificationConfig.toObject(message.eventNotificationConfigs[j], options); } if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; + object.logLevel = options.enums === String ? $root.google.cloud.iot.v1.LogLevel[message.logLevel] === undefined ? message.logLevel : $root.google.cloud.iot.v1.LogLevel[message.logLevel] : message.logLevel; return object; }; @@ -8062,6 +8092,12 @@ return object; var message = new $root.google.cloud.iot.v1.MqttConfig(); switch (object.mqttEnabledState) { + default: + if (typeof object.mqttEnabledState === "number") { + message.mqttEnabledState = object.mqttEnabledState; + break; + } + break; case "MQTT_STATE_UNSPECIFIED": case 0: message.mqttEnabledState = 0; @@ -8094,7 +8130,7 @@ if (options.defaults) object.mqttEnabledState = options.enums === String ? "MQTT_STATE_UNSPECIFIED" : 0; if (message.mqttEnabledState != null && message.hasOwnProperty("mqttEnabledState")) - object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; + object.mqttEnabledState = options.enums === String ? $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] === undefined ? message.mqttEnabledState : $root.google.cloud.iot.v1.MqttState[message.mqttEnabledState] : message.mqttEnabledState; return object; }; @@ -8299,6 +8335,12 @@ return object; var message = new $root.google.cloud.iot.v1.HttpConfig(); switch (object.httpEnabledState) { + default: + if (typeof object.httpEnabledState === "number") { + message.httpEnabledState = object.httpEnabledState; + break; + } + break; case "HTTP_STATE_UNSPECIFIED": case 0: message.httpEnabledState = 0; @@ -8331,7 +8373,7 @@ if (options.defaults) object.httpEnabledState = options.enums === String ? "HTTP_STATE_UNSPECIFIED" : 0; if (message.httpEnabledState != null && message.hasOwnProperty("httpEnabledState")) - object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; + object.httpEnabledState = options.enums === String ? $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] === undefined ? message.httpEnabledState : $root.google.cloud.iot.v1.HttpState[message.httpEnabledState] : message.httpEnabledState; return object; }; @@ -9613,6 +9655,12 @@ return object; var message = new $root.google.cloud.iot.v1.PublicKeyCertificate(); switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; case "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT": case 0: message.format = 0; @@ -9651,7 +9699,7 @@ object.x509Details = null; } if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] === undefined ? message.format : $root.google.cloud.iot.v1.PublicKeyCertificateFormat[message.format] : message.format; if (message.certificate != null && message.hasOwnProperty("certificate")) object.certificate = message.certificate; if (message.x509Details != null && message.hasOwnProperty("x509Details")) @@ -10134,6 +10182,12 @@ return object; var message = new $root.google.cloud.iot.v1.PublicKeyCredential(); switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; case "UNSPECIFIED_PUBLIC_KEY_FORMAT": case 0: message.format = 0; @@ -10178,7 +10232,7 @@ object.key = ""; } if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; + object.format = options.enums === String ? $root.google.cloud.iot.v1.PublicKeyFormat[message.format] === undefined ? message.format : $root.google.cloud.iot.v1.PublicKeyFormat[message.format] : message.format; if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; return object; @@ -12091,6 +12145,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; @@ -12115,6 +12175,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; @@ -12162,7 +12226,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")) @@ -12170,7 +12234,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; }; @@ -14981,6 +15045,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; @@ -14995,6 +15065,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; @@ -15121,9 +15197,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")) @@ -17470,6 +17546,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; @@ -17578,7 +17660,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")) @@ -18380,6 +18462,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; @@ -18396,6 +18484,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; @@ -18434,6 +18528,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; @@ -18504,7 +18602,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")) @@ -18512,7 +18610,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")) @@ -18525,7 +18623,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); @@ -19882,6 +19980,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; @@ -19945,7 +20049,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) @@ -21698,6 +21802,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; @@ -21747,7 +21857,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; }; @@ -25295,6 +25405,12 @@ return object; var message = new $root.google.iam.v1.AuditLogConfig(); switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; case "LOG_TYPE_UNSPECIFIED": case 0: message.logType = 0; @@ -25340,7 +25456,7 @@ if (options.defaults) object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; if (message.exemptedMembers && message.exemptedMembers.length) { object.exemptedMembers = []; for (var j = 0; j < message.exemptedMembers.length; ++j) @@ -25877,6 +25993,12 @@ return object; var message = new $root.google.iam.v1.BindingDelta(); switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; case "ACTION_UNSPECIFIED": case 0: message.action = 0; @@ -25922,7 +26044,7 @@ object.condition = null; } if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; if (message.role != null && message.hasOwnProperty("role")) object.role = message.role; if (message.member != null && message.hasOwnProperty("member")) @@ -26187,6 +26309,12 @@ return object; var message = new $root.google.iam.v1.AuditConfigDelta(); switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; case "ACTION_UNSPECIFIED": case 0: message.action = 0; @@ -26229,7 +26357,7 @@ object.logType = ""; } if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; if (message.service != null && message.hasOwnProperty("service")) object.service = message.service; if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) From 332e994fe1c516b0d9612894fa7ab41313e73de6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 09:32:18 +0100 Subject: [PATCH 357/370] chore(deps): update dependency jsdoc to v4 (#596) 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](https://togithub.com/jsdoc/jsdoc) | [`^3.6.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 5a66483a061..2d934966557 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -51,7 +51,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.2.1", "gts": "^3.1.0", - "jsdoc": "^3.6.2", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From d46b66f449384300d51fb8193856cf9c23394500 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:40:29 +0100 Subject: [PATCH 358/370] chore(deps): update dependency @types/node to v18 (#591) 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 | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-iot). --- packages/google-cloud-iot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2d934966557..fe22718938f 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/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.2.1", "gts": "^3.1.0", From 78dc2775bbcd273d9621197873b7f97fa7e16fce 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:58:15 +0000 Subject: [PATCH 359/370] chore(main): release 3.1.2 (#595) :robot: I have created a release *beep* *boop* --- ## [3.1.2](https://togithub.com/googleapis/nodejs-iot/compare/v3.1.1...v3.1.2) (2022-11-10) ### Bug Fixes * **deps:** Use google-gax v3.5.2 ([#593](https://togithub.com/googleapis/nodejs-iot/issues/593)) ([2f547e1](https://togithub.com/googleapis/nodejs-iot/commit/2f547e1c27006a201c9c7066befd35e043fb43c2)) * update protos ([a8e8800](https://togithub.com/googleapis/nodejs-iot/commit/a8e88006f95594575a70494b1ca5f417e5985765)) * Update protos ([#597](https://togithub.com/googleapis/nodejs-iot/issues/597)) ([a8e8800](https://togithub.com/googleapis/nodejs-iot/commit/a8e88006f95594575a70494b1ca5f417e5985765)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- packages/google-cloud-iot/CHANGELOG.md | 9 +++++++++ packages/google-cloud-iot/package.json | 2 +- .../v1/snippet_metadata.google.cloud.iot.v1.json | 2 +- packages/google-cloud-iot/samples/package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 13a056ee4ab..e4917fe6de5 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [3.1.2](https://github.com/googleapis/nodejs-iot/compare/v3.1.1...v3.1.2) (2022-11-10) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#593](https://github.com/googleapis/nodejs-iot/issues/593)) ([2f547e1](https://github.com/googleapis/nodejs-iot/commit/2f547e1c27006a201c9c7066befd35e043fb43c2)) +* update protos ([a8e8800](https://github.com/googleapis/nodejs-iot/commit/a8e88006f95594575a70494b1ca5f417e5985765)) +* Update protos ([#597](https://github.com/googleapis/nodejs-iot/issues/597)) ([a8e8800](https://github.com/googleapis/nodejs-iot/commit/a8e88006f95594575a70494b1ca5f417e5985765)) + ## [3.1.1](https://github.com/googleapis/nodejs-iot/compare/v3.1.0...v3.1.1) (2022-09-22) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index fe22718938f..f315dd6da5d 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "3.1.1", + "version": "3.1.2", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 82207c4b578..84ed8a09c6c 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 06bf91c7e85..9e6f57f5456 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" }, "dependencies": { - "@google-cloud/iot": "^3.1.1", + "@google-cloud/iot": "^3.1.2", "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^6.0.0" }, From 290d69eab796b3cea70fabe16eb87b375e6b3e2a Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 00:37:16 -0800 Subject: [PATCH 360/370] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- packages/google-cloud-iot/.mocharc.js | 2 +- packages/google-cloud-iot/.prettierrc.js | 2 +- packages/google-cloud-iot/.repo-metadata.json | 2 +- packages/google-cloud-iot/README.md | 34 +- packages/google-cloud-iot/package.json | 13 +- packages/google-cloud-iot/samples/README.md | 372 +++++++++++++++++- packages/google-cloud-iot/src/index.ts | 2 +- release-please-config.json | 3 +- 10 files changed, 411 insertions(+), 26 deletions(-) rename packages/google-cloud-iot/{.github => }/.OwlBot.yaml (80%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 308e8105687..6d4bc5be453 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -20,6 +20,7 @@ "packages/google-cloud-discoveryengine": "0.2.0", "packages/google-cloud-gkeconnect-gateway": "2.0.5", "packages/google-cloud-gkemulticloud": "0.1.4", + "packages/google-cloud-iot": "3.1.2", "packages/google-cloud-language": "5.1.2", "packages/google-cloud-memcache": "2.1.4", "packages/google-cloud-oslogin": "4.0.4", diff --git a/packages/google-cloud-iot/.github/.OwlBot.yaml b/packages/google-cloud-iot/.OwlBot.yaml similarity index 80% rename from packages/google-cloud-iot/.github/.OwlBot.yaml rename to packages/google-cloud-iot/.OwlBot.yaml index 459370d5147..fa708e53d48 100644 --- a/packages/google-cloud-iot/.github/.OwlBot.yaml +++ b/packages/google-cloud-iot/.OwlBot.yaml @@ -11,13 +11,11 @@ # WITHOUT 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/iot/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/iot/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-iot/$1 diff --git a/packages/google-cloud-iot/.mocharc.js b/packages/google-cloud-iot/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-iot/.mocharc.js +++ b/packages/google-cloud-iot/.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-iot/.prettierrc.js b/packages/google-cloud-iot/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-iot/.prettierrc.js +++ b/packages/google-cloud-iot/.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-iot/.repo-metadata.json b/packages/google-cloud-iot/.repo-metadata.json index a53e100f9c4..1c82bf5dbbb 100644 --- a/packages/google-cloud-iot/.repo-metadata.json +++ b/packages/google-cloud-iot/.repo-metadata.json @@ -6,7 +6,7 @@ "release_level": "stable", "language": "nodejs", "name_pretty": "Google Cloud Internet of Things (IoT) Core", - "repo": "googleapis/nodejs-iot", + "repo": "googleapis/google-cloud-node", "product_documentation": "https://cloud.google.com/iot", "requires_billing": true, "name": "iot", diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 05fd841a3ee..8181e8267d6 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Internet of Things (IoT) Core: Node.js Client](https://github.com/googleapis/nodejs-iot) +# [Google Cloud Internet of Things (IoT) Core: 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/iot.svg)](https://www.npmjs.org/package/@google-cloud/iot) @@ -16,11 +16,11 @@ A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-iot/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-iot/CHANGELOG.md). * [Google Cloud Internet of Things (IoT) Core Node.js Client API Reference][client-docs] * [Google Cloud Internet of Things (IoT) Core Documentation][product-docs] -* [github.com/googleapis/nodejs-iot](https://github.com/googleapis/nodejs-iot) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-iot](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-iot) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -79,11 +79,31 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-iot/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 | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-iot/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-iot&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Device_manager.bind_device_to_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) | +| Device_manager.create_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js,samples/README.md) | +| Device_manager.create_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) | +| Device_manager.delete_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js,samples/README.md) | +| Device_manager.delete_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) | +| Device_manager.get_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js,samples/README.md) | +| Device_manager.get_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) | +| Device_manager.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) | +| Device_manager.list_device_config_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) | +| Device_manager.list_device_registries | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) | +| Device_manager.list_device_states | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) | +| Device_manager.list_devices | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js,samples/README.md) | +| Device_manager.modify_cloud_to_device_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) | +| Device_manager.send_command_to_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) | +| Device_manager.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) | +| Device_manager.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) | +| Device_manager.unbind_device_from_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) | +| Device_manager.update_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js,samples/README.md) | +| Device_manager.update_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) | @@ -133,7 +153,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-iot/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`) @@ -145,7 +165,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-iot/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/iot/latest [product-docs]: https://cloud.google.com/iot diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index f315dd6da5d..274dd8604ea 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -7,7 +7,11 @@ "engines": { "node": ">=12.0.0" }, - "repository": "googleapis/nodejs-iot", + "repository": { + "type": "git", + "directory": "packages/google-cloud-iot", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "main": "build/src/index.js", "files": [ "build/protos", @@ -28,10 +32,10 @@ ], "scripts": { "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "lint": "gts check", "docs": "jsdoc -c .jsdoc.js", - "system-test": "mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "fix": "gts fix", "docs-test": "linkinator docs", "predocs-test": "npm run docs", @@ -63,5 +67,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-iot" } diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index 00ce1e112c2..c82ea9f699a 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Internet of Things (IoT) Core: Node.js Samples](https://github.com/googleapis/nodejs-iot) +# [Google Cloud Internet of Things (IoT) Core: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -14,12 +14,32 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Device_manager.bind_device_to_gateway](#device_manager.bind_device_to_gateway) + * [Device_manager.create_device](#device_manager.create_device) + * [Device_manager.create_device_registry](#device_manager.create_device_registry) + * [Device_manager.delete_device](#device_manager.delete_device) + * [Device_manager.delete_device_registry](#device_manager.delete_device_registry) + * [Device_manager.get_device](#device_manager.get_device) + * [Device_manager.get_device_registry](#device_manager.get_device_registry) + * [Device_manager.get_iam_policy](#device_manager.get_iam_policy) + * [Device_manager.list_device_config_versions](#device_manager.list_device_config_versions) + * [Device_manager.list_device_registries](#device_manager.list_device_registries) + * [Device_manager.list_device_states](#device_manager.list_device_states) + * [Device_manager.list_devices](#device_manager.list_devices) + * [Device_manager.modify_cloud_to_device_config](#device_manager.modify_cloud_to_device_config) + * [Device_manager.send_command_to_device](#device_manager.send_command_to_device) + * [Device_manager.set_iam_policy](#device_manager.set_iam_policy) + * [Device_manager.test_iam_permissions](#device_manager.test_iam_permissions) + * [Device_manager.unbind_device_from_gateway](#device_manager.unbind_device_from_gateway) + * [Device_manager.update_device](#device_manager.update_device) + * [Device_manager.update_device_registry](#device_manager.update_device_registry) * [Quickstart](#quickstart) + * [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-iot#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -31,16 +51,356 @@ Before running the samples, make sure you've followed the steps outlined in +### Device_manager.bind_device_to_gateway + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js` + + +----- + + + + +### Device_manager.create_device + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js` + + +----- + + + + +### Device_manager.create_device_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js` + + +----- + + + + +### Device_manager.delete_device + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js` + + +----- + + + + +### Device_manager.delete_device_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js` + + +----- + + + + +### Device_manager.get_device + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js` + + +----- + + + + +### Device_manager.get_device_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js` + + +----- + + + + +### Device_manager.get_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js` + + +----- + + + + +### Device_manager.list_device_config_versions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js` + + +----- + + + + +### Device_manager.list_device_registries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js` + + +----- + + + + +### Device_manager.list_device_states + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js` + + +----- + + + + +### Device_manager.list_devices + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js` + + +----- + + + + +### Device_manager.modify_cloud_to_device_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js` + + +----- + + + + +### Device_manager.send_command_to_device + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js` + + +----- + + + + +### Device_manager.set_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js` + + +----- + + + + +### Device_manager.test_iam_permissions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js` + + +----- + + + + +### Device_manager.unbind_device_from_gateway + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js` + + +----- + + + + +### Device_manager.update_device + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js` + + +----- + + + + +### Device_manager.update_device_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-iot/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/quickstart.js` + + +----- + + + + +### Quickstart.test + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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-iot&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=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node /workspace/google-cloud-node/samples/test/quickstart.test.js` @@ -48,5 +408,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-iot&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/iot diff --git a/packages/google-cloud-iot/src/index.ts b/packages/google-cloud-iot/src/index.ts index 9d70670fc3d..81e29b80c4e 100644 --- a/packages/google-cloud-iot/src/index.ts +++ b/packages/google-cloud-iot/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 31b94480330..235381790e1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -21,6 +21,7 @@ "packages/google-cloud-discoveryengine": {}, "packages/google-cloud-gkeconnect-gateway": {}, "packages/google-cloud-gkemulticloud": {}, + "packages/google-cloud-iot": {}, "packages/google-cloud-language": {}, "packages/google-cloud-memcache": {}, "packages/google-cloud-oslogin": {}, @@ -47,4 +48,4 @@ } ], "release-type": "node" -} \ No newline at end of file +} From e9d9824d2cf68889e9fb3cbc1b9a995646d7e30e Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 11 Nov 2022 00:54:41 -0800 Subject: [PATCH 361/370] Update package.json --- packages/google-cloud-iot/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index 9e6f57f5456..8b448b1a686 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -12,7 +12,7 @@ "repository": "googleapis/nodejs-iot", "private": true, "scripts": { - "test": "cd manager && npm test && cd ../ && cd http_example && npm test && cd ../ && cd mqtt_example && npm test && cd ../ && cd access_token_example && npm test && cd ../" + "test": "mocha test" }, "dependencies": { "@google-cloud/iot": "^3.1.2", From b3fa71c5a021b9733594b8c5a8d553c137da28e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 08:57:59 +0000 Subject: [PATCH 362/370] =?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-iot/README.md | 46 ++++--- packages/google-cloud-iot/samples/README.md | 128 ++++++++++---------- release-please-config.json | 2 +- 3 files changed, 86 insertions(+), 90 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 8181e8267d6..71aa033c771 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -10,9 +10,7 @@ -> Node.js idiomatic client for [Cloud IoT Core][product-docs]. - -[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. +Cloud IoT API client for Node.js A comprehensive list of changes in each version may be found in @@ -83,27 +81,27 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Device_manager.bind_device_to_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) | -| Device_manager.create_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js,samples/README.md) | -| Device_manager.create_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) | -| Device_manager.delete_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js,samples/README.md) | -| Device_manager.delete_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) | -| Device_manager.get_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js,samples/README.md) | -| Device_manager.get_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) | -| Device_manager.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) | -| Device_manager.list_device_config_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) | -| Device_manager.list_device_registries | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) | -| Device_manager.list_device_states | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) | -| Device_manager.list_devices | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js,samples/README.md) | -| Device_manager.modify_cloud_to_device_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) | -| Device_manager.send_command_to_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) | -| Device_manager.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) | -| Device_manager.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) | -| Device_manager.unbind_device_from_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) | -| Device_manager.update_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js,samples/README.md) | -| Device_manager.update_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) | +| Device_manager.bind_device_to_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.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-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) | +| Device_manager.create_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.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-iot/samples/generated/v1/device_manager.create_device.js,samples/README.md) | +| Device_manager.create_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.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-iot/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) | +| Device_manager.delete_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.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-iot/samples/generated/v1/device_manager.delete_device.js,samples/README.md) | +| Device_manager.delete_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.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-iot/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) | +| Device_manager.get_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.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-iot/samples/generated/v1/device_manager.get_device.js,samples/README.md) | +| Device_manager.get_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.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-iot/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) | +| Device_manager.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.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-iot/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) | +| Device_manager.list_device_config_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.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-iot/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) | +| Device_manager.list_device_registries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.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-iot/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) | +| Device_manager.list_device_states | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.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-iot/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) | +| Device_manager.list_devices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.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-iot/samples/generated/v1/device_manager.list_devices.js,samples/README.md) | +| Device_manager.modify_cloud_to_device_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.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-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) | +| Device_manager.send_command_to_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.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-iot/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) | +| Device_manager.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.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-iot/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) | +| Device_manager.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.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-iot/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) | +| Device_manager.unbind_device_from_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.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-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) | +| Device_manager.update_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.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-iot/samples/generated/v1/device_manager.update_device.js,samples/README.md) | +| Device_manager.update_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.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-iot/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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-iot/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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-iot/samples/test/quickstart.test.js,samples/README.md) | diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index c82ea9f699a..95c0380012a 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -6,9 +6,7 @@ [![Open in Cloud Shell][shell_img]][shell_link] -> Node.js idiomatic client for [Cloud IoT Core][product-docs]. -[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. ## Table of Contents @@ -53,14 +51,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Device_manager.bind_device_to_gateway -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.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-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js` ----- @@ -70,14 +68,14 @@ __Usage:__ ### Device_manager.create_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.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-iot/samples/generated/v1/device_manager.create_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js` ----- @@ -87,14 +85,14 @@ __Usage:__ ### Device_manager.create_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.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-iot/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js` ----- @@ -104,14 +102,14 @@ __Usage:__ ### Device_manager.delete_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.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-iot/samples/generated/v1/device_manager.delete_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js` ----- @@ -121,14 +119,14 @@ __Usage:__ ### Device_manager.delete_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.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-iot/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js` ----- @@ -138,14 +136,14 @@ __Usage:__ ### Device_manager.get_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.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-iot/samples/generated/v1/device_manager.get_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js` ----- @@ -155,14 +153,14 @@ __Usage:__ ### Device_manager.get_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.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-iot/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js` ----- @@ -172,14 +170,14 @@ __Usage:__ ### Device_manager.get_iam_policy -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.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-iot/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js` ----- @@ -189,14 +187,14 @@ __Usage:__ ### Device_manager.list_device_config_versions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.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-iot/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js` ----- @@ -206,14 +204,14 @@ __Usage:__ ### Device_manager.list_device_registries -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.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-iot/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js` ----- @@ -223,14 +221,14 @@ __Usage:__ ### Device_manager.list_device_states -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.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-iot/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js` ----- @@ -240,14 +238,14 @@ __Usage:__ ### Device_manager.list_devices -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.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-iot/samples/generated/v1/device_manager.list_devices.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js` ----- @@ -257,14 +255,14 @@ __Usage:__ ### Device_manager.modify_cloud_to_device_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.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-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js` ----- @@ -274,14 +272,14 @@ __Usage:__ ### Device_manager.send_command_to_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.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-iot/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js` ----- @@ -291,14 +289,14 @@ __Usage:__ ### Device_manager.set_iam_policy -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.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-iot/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js` ----- @@ -308,14 +306,14 @@ __Usage:__ ### Device_manager.test_iam_permissions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.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-iot/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js` ----- @@ -325,14 +323,14 @@ __Usage:__ ### Device_manager.unbind_device_from_gateway -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.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-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js` ----- @@ -342,14 +340,14 @@ __Usage:__ ### Device_manager.update_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.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-iot/samples/generated/v1/device_manager.update_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js` ----- @@ -359,14 +357,14 @@ __Usage:__ ### Device_manager.update_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.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-iot/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js` ----- @@ -376,14 +374,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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=/workspace/google-cloud-node/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-iot/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-cloud-iot/samples/quickstart.js` ----- @@ -393,14 +391,14 @@ __Usage:__ ### Quickstart.test -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.test.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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=/workspace/google-cloud-node/samples/test/quickstart.test.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-iot/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/test/quickstart.test.js` +`node packages/google-cloud-iot/samples/test/quickstart.test.js` diff --git a/release-please-config.json b/release-please-config.json index 235381790e1..cf3ccda5411 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 9e8887ae04a0072c17333d1a666f0d99a1e69ad3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 09:14:42 +0000 Subject: [PATCH 363/370] =?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-iot/README.md | 46 ++++--- packages/google-cloud-iot/samples/README.md | 128 ++++++++++---------- release-please-config.json | 2 +- 3 files changed, 86 insertions(+), 90 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 8181e8267d6..71aa033c771 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -10,9 +10,7 @@ -> Node.js idiomatic client for [Cloud IoT Core][product-docs]. - -[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. +Cloud IoT API client for Node.js A comprehensive list of changes in each version may be found in @@ -83,27 +81,27 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Device_manager.bind_device_to_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) | -| Device_manager.create_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js,samples/README.md) | -| Device_manager.create_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) | -| Device_manager.delete_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js,samples/README.md) | -| Device_manager.delete_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) | -| Device_manager.get_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js,samples/README.md) | -| Device_manager.get_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) | -| Device_manager.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) | -| Device_manager.list_device_config_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) | -| Device_manager.list_device_registries | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) | -| Device_manager.list_device_states | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) | -| Device_manager.list_devices | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js,samples/README.md) | -| Device_manager.modify_cloud_to_device_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) | -| Device_manager.send_command_to_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) | -| Device_manager.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) | -| Device_manager.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) | -| Device_manager.unbind_device_from_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) | -| Device_manager.update_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js,samples/README.md) | -| Device_manager.update_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) | +| Device_manager.bind_device_to_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.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-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) | +| Device_manager.create_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.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-iot/samples/generated/v1/device_manager.create_device.js,samples/README.md) | +| Device_manager.create_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.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-iot/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) | +| Device_manager.delete_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.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-iot/samples/generated/v1/device_manager.delete_device.js,samples/README.md) | +| Device_manager.delete_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.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-iot/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) | +| Device_manager.get_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.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-iot/samples/generated/v1/device_manager.get_device.js,samples/README.md) | +| Device_manager.get_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.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-iot/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) | +| Device_manager.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.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-iot/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) | +| Device_manager.list_device_config_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.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-iot/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) | +| Device_manager.list_device_registries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.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-iot/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) | +| Device_manager.list_device_states | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.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-iot/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) | +| Device_manager.list_devices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.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-iot/samples/generated/v1/device_manager.list_devices.js,samples/README.md) | +| Device_manager.modify_cloud_to_device_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.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-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) | +| Device_manager.send_command_to_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.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-iot/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) | +| Device_manager.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.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-iot/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) | +| Device_manager.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.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-iot/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) | +| Device_manager.unbind_device_from_gateway | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.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-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) | +| Device_manager.update_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.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-iot/samples/generated/v1/device_manager.update_device.js,samples/README.md) | +| Device_manager.update_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.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-iot/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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-iot/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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-iot/samples/test/quickstart.test.js,samples/README.md) | diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index c82ea9f699a..95c0380012a 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -6,9 +6,7 @@ [![Open in Cloud Shell][shell_img]][shell_link] -> Node.js idiomatic client for [Cloud IoT Core][product-docs]. -[Google Cloud Internet of Things (IoT) Core](https://cloud.google.com/iot/docs) is a fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform. ## Table of Contents @@ -53,14 +51,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Device_manager.bind_device_to_gateway -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.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-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.bind_device_to_gateway.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.bind_device_to_gateway.js` ----- @@ -70,14 +68,14 @@ __Usage:__ ### Device_manager.create_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.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-iot/samples/generated/v1/device_manager.create_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.create_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.create_device.js` ----- @@ -87,14 +85,14 @@ __Usage:__ ### Device_manager.create_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.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-iot/samples/generated/v1/device_manager.create_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.create_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.create_device_registry.js` ----- @@ -104,14 +102,14 @@ __Usage:__ ### Device_manager.delete_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.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-iot/samples/generated/v1/device_manager.delete_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device.js` ----- @@ -121,14 +119,14 @@ __Usage:__ ### Device_manager.delete_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.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-iot/samples/generated/v1/device_manager.delete_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.delete_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.delete_device_registry.js` ----- @@ -138,14 +136,14 @@ __Usage:__ ### Device_manager.get_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.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-iot/samples/generated/v1/device_manager.get_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.get_device.js` ----- @@ -155,14 +153,14 @@ __Usage:__ ### Device_manager.get_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.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-iot/samples/generated/v1/device_manager.get_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.get_device_registry.js` ----- @@ -172,14 +170,14 @@ __Usage:__ ### Device_manager.get_iam_policy -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.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-iot/samples/generated/v1/device_manager.get_iam_policy.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.get_iam_policy.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.get_iam_policy.js` ----- @@ -189,14 +187,14 @@ __Usage:__ ### Device_manager.list_device_config_versions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.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-iot/samples/generated/v1/device_manager.list_device_config_versions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_config_versions.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_config_versions.js` ----- @@ -206,14 +204,14 @@ __Usage:__ ### Device_manager.list_device_registries -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.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-iot/samples/generated/v1/device_manager.list_device_registries.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_registries.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_registries.js` ----- @@ -223,14 +221,14 @@ __Usage:__ ### Device_manager.list_device_states -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.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-iot/samples/generated/v1/device_manager.list_device_states.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_device_states.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_device_states.js` ----- @@ -240,14 +238,14 @@ __Usage:__ ### Device_manager.list_devices -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.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-iot/samples/generated/v1/device_manager.list_devices.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.list_devices.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.list_devices.js` ----- @@ -257,14 +255,14 @@ __Usage:__ ### Device_manager.modify_cloud_to_device_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.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-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.modify_cloud_to_device_config.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.modify_cloud_to_device_config.js` ----- @@ -274,14 +272,14 @@ __Usage:__ ### Device_manager.send_command_to_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.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-iot/samples/generated/v1/device_manager.send_command_to_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.send_command_to_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.send_command_to_device.js` ----- @@ -291,14 +289,14 @@ __Usage:__ ### Device_manager.set_iam_policy -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.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-iot/samples/generated/v1/device_manager.set_iam_policy.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.set_iam_policy.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.set_iam_policy.js` ----- @@ -308,14 +306,14 @@ __Usage:__ ### Device_manager.test_iam_permissions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.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-iot/samples/generated/v1/device_manager.test_iam_permissions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.test_iam_permissions.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.test_iam_permissions.js` ----- @@ -325,14 +323,14 @@ __Usage:__ ### Device_manager.unbind_device_from_gateway -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.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-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.unbind_device_from_gateway.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.unbind_device_from_gateway.js` ----- @@ -342,14 +340,14 @@ __Usage:__ ### Device_manager.update_device -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.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-iot/samples/generated/v1/device_manager.update_device.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.update_device.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js` ----- @@ -359,14 +357,14 @@ __Usage:__ ### Device_manager.update_device_registry -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.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=/workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.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-iot/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/device_manager.update_device_registry.js` +`node packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js` ----- @@ -376,14 +374,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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=/workspace/google-cloud-node/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-iot/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-cloud-iot/samples/quickstart.js` ----- @@ -393,14 +391,14 @@ __Usage:__ ### Quickstart.test -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.test.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/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=/workspace/google-cloud-node/samples/test/quickstart.test.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-iot/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/test/quickstart.test.js` +`node packages/google-cloud-iot/samples/test/quickstart.test.js` diff --git a/release-please-config.json b/release-please-config.json index 235381790e1..cf3ccda5411 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 489d82e9c4194975167486571ba2e43a091cd038 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:22:27 -0800 Subject: [PATCH 364/370] Update quickstart.js --- packages/google-cloud-iot/samples/quickstart.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 01cd81a0329..cd29e0a33f7 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -14,13 +14,12 @@ 'use strict'; -async function main() { +async function main(projectId) { // [START iot_quickstart] const iot = require('@google-cloud/iot'); const client = new iot.v1.DeviceManagerClient(); async function quickstart() { - const projectId = await client.getProjectId(); const parent = client.locationPath(projectId, 'us-central1'); const [resources] = await client.listDeviceRegistries({parent}); console.log(`${resources.length} resource(s) found.`); From c946586800c3fd1a4acd6de47352aaff990fe339 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:24:18 -0800 Subject: [PATCH 365/370] Update quickstart.test.js --- .../samples/test/quickstart.test.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 90b3516114b..9f54f6acfc0 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -15,14 +15,21 @@ 'use strict'; const {assert} = require('chai'); -const {describe, it} = require('mocha'); +const {describe, it, before} = require('mocha'); const cp = require('child_process'); - +const iot = require('@google-cloud/iot'); +const client = new iot.v1.DeviceManagerClient(); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); describe('iot samples', () => { + let projectId; + + before(async () => { + projectId = await client.getProjectId(); + }); + it('should run the quickstart', async () => { - const stdout = execSync('node quickstart'); + const stdout = execSync(`node quickstart ${projectId}`); assert.match(stdout, /\d resource\(s\) found./); }); }); From c3fa79c77953e39c8b894c2fc123618cb32d53a1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 09:39:20 +0000 Subject: [PATCH 366/370] =?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-iot/README.md | 1 - packages/google-cloud-iot/samples/test/quickstart.test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 71aa033c771..2610e202ef2 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -61,7 +61,6 @@ const iot = require('@google-cloud/iot'); const client = new iot.v1.DeviceManagerClient(); async function quickstart() { - const projectId = await client.getProjectId(); const parent = client.locationPath(projectId, 'us-central1'); const [resources] = await client.listDeviceRegistries({parent}); console.log(`${resources.length} resource(s) found.`); diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 9f54f6acfc0..830b226210d 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -27,7 +27,7 @@ describe('iot samples', () => { before(async () => { projectId = await client.getProjectId(); }); - + it('should run the quickstart', async () => { const stdout = execSync(`node quickstart ${projectId}`); assert.match(stdout, /\d resource\(s\) found./); From 80982ed6b70e48a7531e8f3f72fabc8b3913a7f4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 09:45:20 +0000 Subject: [PATCH 367/370] =?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-iot/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 71aa033c771..2610e202ef2 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -61,7 +61,6 @@ const iot = require('@google-cloud/iot'); const client = new iot.v1.DeviceManagerClient(); async function quickstart() { - const projectId = await client.getProjectId(); const parent = client.locationPath(projectId, 'us-central1'); const [resources] = await client.listDeviceRegistries({parent}); console.log(`${resources.length} resource(s) found.`); From ab34e56247816cc1d3a96b807c2d7825ba23a1d0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 09:51:40 +0000 Subject: [PATCH 368/370] =?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-iot/README.md | 1 - packages/google-cloud-iot/samples/test/quickstart.test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 71aa033c771..2610e202ef2 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -61,7 +61,6 @@ const iot = require('@google-cloud/iot'); const client = new iot.v1.DeviceManagerClient(); async function quickstart() { - const projectId = await client.getProjectId(); const parent = client.locationPath(projectId, 'us-central1'); const [resources] = await client.listDeviceRegistries({parent}); console.log(`${resources.length} resource(s) found.`); diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 9f54f6acfc0..830b226210d 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -27,7 +27,7 @@ describe('iot samples', () => { before(async () => { projectId = await client.getProjectId(); }); - + it('should run the quickstart', async () => { const stdout = execSync(`node quickstart ${projectId}`); assert.match(stdout, /\d resource\(s\) found./); From 14438aa71755adfb3d0172995fa762e73541176b Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 11:55:21 -0800 Subject: [PATCH 369/370] fix: broken list samples --- .../google-cloud-iot/samples/quickstart.js | 74 +++++++++++++++---- .../samples/test/quickstart.test.js | 8 +- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index cd29e0a33f7..344f409e391 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -1,4 +1,4 @@ -// Copyright 2018 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. @@ -11,23 +11,67 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; -async function main(projectId) { - // [START iot_quickstart] - const iot = require('@google-cloud/iot'); - const client = new iot.v1.DeviceManagerClient(); - - async function quickstart() { - const parent = client.locationPath(projectId, 'us-central1'); - const [resources] = await client.listDeviceRegistries({parent}); - console.log(`${resources.length} resource(s) found.`); - for (const resource of resources) { - console.log(resource); +function main(parent) { + // [START cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + */ + // const parent = 'abc123' + /** + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Iot library + const {DeviceManagerClient} = require('@google-cloud/iot').v1; + + // Instantiates a client + const iotClient = new DeviceManagerClient(); + + async function callListDeviceRegistries() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await iotClient.listDeviceRegistriesAsync(request); + for await (const response of iterable) { + console.log(response); } } - quickstart(); - // [END iot_quickstart] + + callListDeviceRegistries(); + // [END cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_async] } -main(); + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 830b226210d..87707e035e0 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -14,12 +14,14 @@ 'use strict'; -const {assert} = require('chai'); +const assert = require('assert'); +const path = require('path'); const {describe, it, before} = require('mocha'); const cp = require('child_process'); const iot = require('@google-cloud/iot'); const client = new iot.v1.DeviceManagerClient(); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); +const cwd = path.join(__dirname, '..'); describe('iot samples', () => { let projectId; @@ -29,7 +31,7 @@ describe('iot samples', () => { }); it('should run the quickstart', async () => { - const stdout = execSync(`node quickstart ${projectId}`); - assert.match(stdout, /\d resource\(s\) found./); + const stdout = execSync(`node quickstart projects/${projectId}/locations/us-central1`, {cwd}); + assert(stdout !== null); }); }); From e7b423be8bae3f8b6d5406ed8d8b8f33240de055 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 20:16:54 +0000 Subject: [PATCH 370/370] =?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-iot/README.md | 20 +------------------ .../google-cloud-iot/samples/quickstart.js | 4 +--- .../samples/test/quickstart.test.js | 5 ++++- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index 2610e202ef2..aeb3eeb79e1 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -31,7 +31,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - * [Using the client library](#using-the-client-library) + * [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) @@ -54,24 +54,6 @@ npm install @google-cloud/iot ``` -### Using the client library - -```javascript -const iot = require('@google-cloud/iot'); -const client = new iot.v1.DeviceManagerClient(); - -async function quickstart() { - const parent = client.locationPath(projectId, 'us-central1'); - const [resources] = await client.listDeviceRegistries({parent}); - console.log(`${resources.length} resource(s) found.`); - for (const resource of resources) { - console.log(resource); - } -} -quickstart(); - -``` - ## Samples diff --git a/packages/google-cloud-iot/samples/quickstart.js b/packages/google-cloud-iot/samples/quickstart.js index 344f409e391..48a03b5c07c 100644 --- a/packages/google-cloud-iot/samples/quickstart.js +++ b/packages/google-cloud-iot/samples/quickstart.js @@ -16,8 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - - 'use strict'; function main(parent) { @@ -62,7 +60,7 @@ function main(parent) { // Run request const iterable = await iotClient.listDeviceRegistriesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js index 87707e035e0..823ea9d7cb2 100644 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ b/packages/google-cloud-iot/samples/test/quickstart.test.js @@ -31,7 +31,10 @@ describe('iot samples', () => { }); it('should run the quickstart', async () => { - const stdout = execSync(`node quickstart projects/${projectId}/locations/us-central1`, {cwd}); + const stdout = execSync( + `node quickstart projects/${projectId}/locations/us-central1`, + {cwd} + ); assert(stdout !== null); }); });